Unit 6, lesson 34

Step Functions, Time Shifts, and Periodic Inputs

How the Heaviside step function switches an input on, how to write piecewise inputs with steps, why the second shifting theorem needs a true time shift, and how to find the Laplace transform of a periodic function.

  • Video 34
  • Initial-Value Problems and Switched Inputs

Suppose an input stays off for two seconds and then starts to rise like a ramp. In words the input is easy to describe, but Laplace transforms are easiest to use with a single formula valid for all t≥0t \ge 0, and it matters whether the ramp starts from zero at the switch or jumps straight to the height it would have had all along. This lesson writes switched inputs with the Heaviside step function, rewrites each piece in the time elapsed since its switch, and uses the second shifting theorem and a formula for periodic inputs. Throughout, t≥0t \ge 0 is time, a prime means a derivative with respect to tt, and ss is a complex number.

Key terms

Heaviside step function

Definition For a real number aa, the Heaviside step function at aa is

u(t−a)={0,t<a,1,t>a.u(t - a) = \begin{cases} 0, & t < a, \\ 1, & t > a. \end{cases}

Its value at t=at = a is a matter of convention, and 00, 11 and 12\tfrac{1}{2} are all in use. That value changes no integral, so it changes no Laplace transform. When the behavior of a solution at the switch matters, the differential equation decides it, not the value assigned to the step. Multiplying a function gg by u(t−a)u(t - a) gives a function equal to 00 for t<at < a and to g(t)g(t) for t>at > a. For a≤0a \le 0 the step equals 11 at every t>0t > 0, so only a>0a > 0 produces a real switch in a one-sided signal. For a≥0a \ge 0 and Re⁡s>0\operatorname{Re} s > 0,

L{u(t−a)}(s)=∫a∞e−st dt=e−ass.\begin{aligned} &\mathcal{L}\{u(t - a)\}(s) \\[0.4em] &\quad = \int_a^\infty e^{-st}\,dt = \frac{e^{-as}}{s}. \end{aligned}

In plain words The step is a switch that is off before time aa and on after it. Multiplying by it keeps a formula only from the switching time onward.

Example The step u(t−2)u(t - 2) is 00 for 0≤t<20 \le t < 2 and 11 for t>2t > 2, and its Laplace transform is e−2s/se^{-2s}/s for Re⁡s>0\operatorname{Re} s > 0. A difference of two steps makes a window. The function u(t−1)−u(t−3)u(t - 1) - u(t - 3) equals 11 for 1<t<31 < t < 3 and 00 for 0≤t<10 \le t < 1 and for t>3t > 3, so multiplying a signal by it keeps the signal only between the times 11 and 33. Its Laplace transform is ∫13e−st dt=(e−s−e−3s)/s\int_1^3 e^{-st}\,dt = (e^{-s} - e^{-3s})/s, valid for every s≠0s \ne 0 because the window is zero after t=3t = 3.

Time shift

Definition Let ff be defined for t≥0t \ge 0 and let a≥0a \ge 0. The signal ff delayed by aa is

u(t−a) f(t−a),u(t - a)\,f(t - a),

which is 00 for 0≤t<a0 \le t < a and f(t−a)f(t - a) for t>at > a. Its graph is the graph of ff moved aa units to the right. It reads ff at the elapsed time τ=t−a\tau = t - a since the switch, so after the switch it repeats the history of ff from its own time 00. The step factor is part of the shift. Without it, the formula f(t−a)f(t - a) on 0≤t<a0 \le t < a would need values of ff at negative times, which a one-sided signal does not have. A delay is different from switching on the original signal, u(t−a) f(t)u(t - a)\,f(t), which reads ff on the original clock. The two coincide only if f(t−a)=f(t)f(t - a) = f(t) for every t>at > a, as for a constant ff, so in general they are different inputs.

In plain words The step decides when the signal is on, and the argument of ff decides which clock it reads. A delayed signal starts its own clock at the switch, while a switched-on signal has been running unseen since time 00.

Example Take f(t)=tf(t) = t and a=2a = 2. The delayed ramp u(t−2)(t−2)u(t - 2)(t - 2) is 00 before t=2t = 2 and rises from height 00 with slope 11 after it, so it equals 11 at t=3t = 3. The switched-on ramp u(t−2) tu(t - 2)\,t is also 00 before t=2t = 2, but just after the switch it already has height 22, and it equals 33 at t=3t = 3. For t>2t > 2 the two differ by the constant 22, so the switched-on ramp jumps by 22 at the switch and the delayed ramp does not jump at all.

Piecewise inputs written with steps

Definition Let 0<a1<a2<⋯<an0 < a_1 < a_2 < \cdots < a_n be switching times. Suppose an input ff is given by a formula g0(t)g_0(t) for 0≤t<a10 \le t < a_1, by gk(t)g_k(t) for ak<t<ak+1a_k < t < a_{k+1} when 1≤k<n1 \le k < n, and by gn(t)g_n(t) for t>ant > a_n. Then at every t≥0t \ge 0 other than the switching times

f(t)=g0(t)+∑k=1nu(t−ak) ck(t),\begin{aligned} &f(t) = g_0(t) \\[0.4em] &\quad + \sum_{k=1}^{n} u(t - a_k)\,c_k(t), \end{aligned}

where ck(t)=gk(t)−gk−1(t)c_k(t) = g_k(t) - g_{k-1}(t) is the correction at the kkth switch, the new formula minus the old one. For aj<t<aj+1a_j < t < a_{j+1}, or for t>ant > a_n when j=nj = n, exactly the first jj corrections are on, and their sum telescopes to gj(t)−g0(t)g_j(t) - g_0(t), which is why the formula is right. Before taking the Laplace transform, rewrite each correction in its own elapsed time, as ck(t)=dk(t−ak)c_k(t) = d_k(t - a_k) with dk(τ)=ck(τ+ak)d_k(\tau) = c_k(\tau + a_k). Then every term has the form of a delayed signal.

In plain words Start with the first formula. At each switch, add a step times what has to change, the new formula minus the old one. Then express each change in the time since its own switch.

Example An input is 00 for 0≤t<20 \le t < 2, equals t−2t - 2 for 2≤t<42 \le t < 4 and stays at 22 for t≥4t \ge 4, a ramp that levels off. The corrections are (t−2)−0(t - 2) - 0 at t=2t = 2 and 2−(t−2)=−(t−4)2 - (t - 2) = -(t - 4) at t=4t = 4, so

f(t)=u(t−2)(t−2)−u(t−4)(t−4).\begin{aligned} f(t) &= u(t - 2)(t - 2) \\[0.4em] &\quad - u(t - 4)(t - 4). \end{aligned}

Both corrections are already written in their elapsed times. For t>4t > 4 the formula gives (t−2)−(t−4)=2(t - 2) - (t - 4) = 2, as it should. The second shifting theorem below then gives

F(s)=e−2s−e−4ss2,Re⁡s>0.\begin{gathered} F(s) = \frac{e^{-2s} - e^{-4s}}{s^2}, \\[0.4em] \operatorname{Re} s > 0. \end{gathered}

Second shifting theorem

Definition Let ff be defined for t≥0t \ge 0 and integrable on every bounded interval, let F=L{f}F = \mathcal{L}\{f\}, and let a≥0a \ge 0. At every ss where F(s)F(s) exists,

L{u(t−a) f(t−a)}=e−asF(s).\begin{aligned} &\mathcal{L}\{u(t - a)\,f(t - a)\} \\[0.4em] &\quad = e^{-as}F(s). \end{aligned}

The integrand vanishes for t<at < a. On [a,a+b][a, a + b] substitute τ=t−a\tau = t - a, which splits the weight as e−st=e−ase−sτe^{-st} = e^{-as}e^{-s\tau},

∫aa+be−stf(t−a) dt=e−as∫0be−sτf(τ) dτ,\begin{aligned} &\int_a^{a + b} e^{-st} f(t - a)\,dt \\[0.4em] &\quad = e^{-as}\int_0^{b} e^{-s\tau} f(\tau)\,d\tau, \end{aligned}

and let b→∞b \to \infty. Read from right to left, the theorem inverts delays. If f=L−1{F}f = \mathcal{L}^{-1}\{F\}, then L−1{e−asF(s)}=u(t−a) f(t−a)\mathcal{L}^{-1}\{e^{-as}F(s)\} = u(t - a)\,f(t - a), so invert FF first and then delay the whole function. For a signal that is switched on rather than delayed, the same substitution gives L{u(t−a) g(t)}=e−as L{g(t+a)}\mathcal{L}\{u(t - a)\,g(t)\} = e^{-as}\,\mathcal{L}\{g(t + a)\}, which is the rewriting step done in one line.

In plain words Delaying a signal by aa multiplies its Laplace transform by e−ase^{-as}, but only when the signal is written in the time elapsed since the switch. The exponential factor records when the signal starts, and FF records what it does after that.

Example The delayed ramp u(t−2)(t−2)u(t - 2)(t - 2) is the ramp f(t)=tf(t) = t, with F(s)=1/s2F(s) = 1/s^2, delayed by 22. Its Laplace transform is e−2s/s2e^{-2s}/s^2 for Re⁡s>0\operatorname{Re} s > 0. The switched-on ramp u(t−2) tu(t - 2)\,t is not of this form yet. Writing t=(t−2)+2t = (t - 2) + 2 gives

L{u(t−2) t}=e−2s L{t+2}=e−2s(1s2+2s).\begin{aligned} &\mathcal{L}\{u(t - 2)\,t\} \\[0.4em] &\quad = e^{-2s}\,\mathcal{L}\{t + 2\} \\[0.4em] &\quad = e^{-2s}\left(\frac{1}{s^2} + \frac{2}{s}\right). \end{aligned}

The extra term 2e−2s/s2e^{-2s}/s is the Laplace transform of 2u(t−2)2u(t - 2), the jump to height 22 that the switched-on ramp starts with. Using e−2s/s2e^{-2s}/s^2 for this input would describe the delayed ramp instead. Read backward, the theorem gives for instance L−1{e−3s/(s+1)}=u(t−3) e−(t−3)\mathcal{L}^{-1}\{e^{-3s}/(s + 1)\} = u(t - 3)\,e^{-(t - 3)}.

Laplace transform of a periodic function

Definition Let ff be piecewise continuous on [0,∞)[0, \infty) and periodic with period T>0T > 0, so f(t+T)=f(t)f(t + T) = f(t) for all t≥0t \ge 0. Then for Re⁡s>0\operatorname{Re} s > 0

F(s)=FT(s)1−e−sT,FT(s)=∫0Te−stf(t) dt.\begin{aligned} F(s) &= \frac{F_T(s)}{1 - e^{-sT}}, \\[0.4em] F_T(s) &= \int_0^T e^{-st} f(t)\,dt. \end{aligned}

The function ff is bounded, because it repeats its values on [0,T][0, T], where it is bounded. So it is of exponential order 00, and F(s)F(s) exists for Re⁡s>0\operatorname{Re} s > 0. Split [0,∞)[0, \infty) into the blocks [nT,(n+1)T][nT, (n + 1)T] and substitute t=τ+nTt = \tau + nT in the nnth block. That block then contributes e−nsTFT(s)e^{-nsT}F_T(s), and the blocks form a geometric series with ratio e−sTe^{-sT}, whose modulus e−TRe⁡se^{-T\operatorname{Re} s} is less than 11. Summing the series gives the formula. Only one period enters the numerator, and the denominator accounts for all the repeats.

In plain words A periodic input is one block repeated forever. Each repeat is the first block delayed by another period, so it contributes the same integral times another factor e−sTe^{-sT}, and these factors add up to 1/(1−e−sT)1/(1 - e^{-sT}).

Example Let ff have period 22, with f(t)=1f(t) = 1 for 0≤t<10 \le t < 1 and f(t)=0f(t) = 0 for 1≤t<21 \le t < 2, a train of square pulses. One period gives F2(s)=∫01e−st dt=(1−e−s)/sF_2(s) = \int_0^1 e^{-st}\,dt = (1 - e^{-s})/s. Since 1−e−2s=(1−e−s)(1+e−s)1 - e^{-2s} = (1 - e^{-s})(1 + e^{-s}), for Re⁡s>0\operatorname{Re} s > 0

F(s)=1−e−ss (1−e−2s)=1s (1+e−s).\begin{aligned} F(s) &= \frac{1 - e^{-s}}{s\,(1 - e^{-2s})} \\[0.4em] &= \frac{1}{s\,(1 + e^{-s})}. \end{aligned}

A single pulse u(t)−u(t−1)u(t) - u(t - 1) has the Laplace transform (1−e−s)/s(1 - e^{-s})/s, so the division by 1−e−2s1 - e^{-2s} is exactly what the repetition adds. As s→0+s \to 0^+ the product sF(s)sF(s) tends to 12\tfrac{1}{2}, the average value of the pulse train. The same formula applied to sin⁡t\sin t with period 2π2\pi uses the one-period integral (1−e−2πs)/(s2+1)(1 - e^{-2\pi s})/(s^2 + 1) and returns the familiar L{sin⁡t}=1/(s2+1)\mathcal{L}\{\sin t\} = 1/(s^2 + 1).

Check yourself

  1. Write the input that is 00 for 0≤t<10 \le t < 1, equals 33 for 1<t<41 < t < 4 and is 00 for t>4t > 4 with step functions, and find its Laplace transform.
Show the answer

The corrections are 3−0=33 - 0 = 3 at t=1t = 1 and 0−3=−30 - 3 = -3 at t=4t = 4, so f(t)=3u(t−1)−3u(t−4)f(t) = 3u(t - 1) - 3u(t - 4). Each step u(t−a)u(t - a) has the Laplace transform e−as/se^{-as}/s, so

F(s)=3 (e−s−e−4s)s.F(s) = \frac{3\,(e^{-s} - e^{-4s})}{s}.

Linearity gives this for Re⁡s>0\operatorname{Re} s > 0. Because the input is zero after t=4t = 4, the integral ∫143e−st dt\int_1^4 3e^{-st}\,dt in fact converges for every ss, the formula holds for every s≠0s \ne 0, and F(0)=9F(0) = 9 is the area of the pulse.

  1. A classmate writes L{u(t−3) t2}=2e−3s/s3\mathcal{L}\{u(t - 3)\,t^2\} = 2e^{-3s}/s^3. Explain the mistake and find the correct Laplace transform.
Show the answer

The factor e−3se^{-3s} may only multiply the Laplace transform of the active formula written in elapsed time. The classmate’s answer is the Laplace transform of u(t−3)(t−3)2u(t - 3)(t - 3)^2, a parabola that starts from height 00 at t=3t = 3, whereas u(t−3) t2u(t - 3)\,t^2 jumps to 99 there. In the elapsed time τ=t−3\tau = t - 3 we have t=τ+3t = \tau + 3, so the active formula t2t^2 becomes

(τ+3)2=τ2+6τ+9,(\tau + 3)^2 = \tau^2 + 6\tau + 9,

whose Laplace transform is 2/s3+6/s2+9/s2/s^3 + 6/s^2 + 9/s. Hence, for Re⁡s>0\operatorname{Re} s > 0,

L{u(t−3) t2}=e−3s(2s3+6s2+9s).\begin{aligned} &\mathcal{L}\{u(t - 3)\,t^2\} \\[0.4em] &\quad = e^{-3s}\left(\frac{2}{s^3} + \frac{6}{s^2} + \frac{9}{s}\right). \end{aligned}
  1. Solve y′+y=u(t−2)(t−2)y' + y = u(t - 2)(t - 2) with y(0)=0y(0) = 0 by the Laplace transform, and check the solution at the switch.
Show the answer

Since L{y′}=sY−y(0)=sY\mathcal{L}\{y'\} = sY - y(0) = sY, the Laplace transform of the equation is (s+1)Y=e−2s/s2(s + 1)Y = e^{-2s}/s^2, so

Y(s)=e−2s 1s2(s+1).Y(s) = e^{-2s}\,\frac{1}{s^2(s + 1)}.

Invert the undelayed fraction first. Partial fractions give

1s2(s+1)=−1s+1s2+1s+1,\begin{aligned} \frac{1}{s^2(s + 1)} &= -\frac{1}{s} + \frac{1}{s^2} \\[0.4em] &\quad + \frac{1}{s + 1}, \end{aligned}

which is the Laplace transform of g(t)=t−1+e−tg(t) = t - 1 + e^{-t}. Then delay the whole function,

y(t)=u(t−2) g(t−2),y(t) = u(t - 2)\,g(t - 2),

so y(t)=0y(t) = 0 for 0≤t≤20 \le t \le 2 and y(t)=t−3+e2−ty(t) = t - 3 + e^{2 - t} for t>2t > 2. On 0≤t<20 \le t < 2 the zero solution satisfies y′+y=0y' + y = 0 and y(0)=0y(0) = 0. For t>2t > 2 the derivative is y′=1−e2−ty' = 1 - e^{2 - t}, so y′+y=t−2y' + y = t - 2, which is the input. At the switch y(2+)=2−3+1=0y(2^+) = 2 - 3 + 1 = 0 and y′(2+)=1−1=0y'(2^+) = 1 - 1 = 0, so the solution and even its derivative join the zero solution without a jump. Multiplying the undelayed function by the step, as in u(t−2)(t−1+e−t)u(t - 2)(t - 1 + e^{-t}), would put a jump of about 1.1351.135 into the solution at t=2t = 2, which a first-order equation with a bounded input cannot produce.

How this lesson connects