Differential EquationsThe Laplace Transform5 of 8
The Laplace Transform · 5

Step Functions and Piecewise Forcing

When an outside force switches on, shuts off, or changes its formula part of the way through, we need a way to write a piecewise function as a single algebraic expression so the Laplace transform can solve the differential equation in one pass.

1

Writing Piecewise Functions with Step Switches

A unit step function is a mathematical switch that sits at 00 until time t=ct = c, then jumps to 11 and stays at 11 forever:

u(t−c)⏟unit step function={0,t<c1,t≥c\displaystyle \underbrace{\switch{u(t - c)}}_{\text{unit step function}} = \begin{cases} 0, & t < c \\ 1, & t \ge c \end{cases}

(You might also see this written as uc(t)\switch{u_c(t)}; the subscript cc just marks the switch time t=ct = c, not a derivative.)

t\htmlClass{lc-mute}{t}
11
00
c\htmlClass{lc-orange}{c}
u(t−c)\htmlClass{lc-orange}{u(t - c)}

Multiplying any function by u(t−c)\switch{u(t - c)} keeps it at 00 before t=ct = c and turns it on from t=ct = c onward.

Writing Piecewise Functions with Step Switches
y′′+y=sin⁡(t)y'' + \htmlClass{lc-blue}{y} = \htmlClass{lc-green}{\sin(t)}
light\text{light}
3\htmlClass{lc-orange}{3}
thruster\text{thruster}
3\htmlClass{lc-orange}{3}
8\htmlClass{lc-orange}{8}
motor\text{motor}
2\htmlClass{lc-orange}{2}
t\htmlClass{lc-mute}{t}

To rewrite a piecewise function like the ramp that levels off at t=2t = 2,

f(t)={t,0≤t<22,t≥2\displaystyle \force{f(t)} = \begin{cases} \force{t}, & 0 \le t < 2 \\ \force{2}, & t \ge 2 \end{cases}

walk along the timeline from t=0t = 0 and add a step switch wherever the formula changes.

Text solution
Start with the rule at t=0t = 0Write down the formula that is active at the beginning of the timeline.
f(t)\displaystyle \force{f(t)} =t+…\displaystyle = \force{t} + \dots
Flip a switch at t=2t = 2 to cancel the old rule and add the new oneMultiply u(t−2)\switch{u(t - 2)} by (−t+2)(\force{-t + 2}) so the switch subtracts the climbing ramp t\force{t} and replaces it with the flat value 2\force{2}.
f(t)=t+u(t−2)(−t⏟cancel old+2⏟add new)=t−u(t−2)(t−2)\displaystyle \begin{aligned} \force{f(t)} &= \force{t} + \switch{u(t - 2)}(\underbrace{\force{-t}}_{\text{cancel old}} + \underbrace{\force{2}}_{\text{add new}}) \\ &= \force{t} - \switch{u(t - 2)}\elapsed{(t - 2)} \end{aligned}

Before t=2t = 2, the switch is 00 so f(t)=t\force{f(t)} = \force{t}; from t=2t = 2 onward, the switch is 11 so f(t)=t−(t−2)=2\force{f(t)} = \force{t} - \elapsed{(t - 2)} = \force{2}.

In sin⁡(t)[u(t−3)−u(t−c)]\force{\sin(t)}[\switch{u(t - 3)} - \switch{u(t - c)}], the second switch −u(t−c)-\switch{u(t - c)} cancels the first switch u(t−3)\switch{u(t - 3)} from t=ct = c onward, leaving the sine wave active only in the window between 33 and cc.

The first switch stays on forever, so the sine wave only stops when the negative switch turns on and cancels it out.
2

Delayed Functions and the Laplace Transform

Once a force is written with step switches, we want to take its Laplace transform. A delayed function u(t−c)f(t−c)\switch{u(t - c)}\force{f(\elapsed{t - c})} holds f(t)\force{f(t)} at 00 until t=ct = c and then runs it from the beginning using the elapsed time t−c\elapsed{t - c} since the switch flipped.

Delayed Functions and the Laplace Transform
u(t−3) t2\htmlClass{lc-orange}{u(t - 3)}\,\htmlClass{lc-green}{t^2}
0\htmlClass{lc-mute}{0}
1\htmlClass{lc-mute}{1}
2\htmlClass{lc-mute}{2}
3\htmlClass{lc-orange}{3}
4\htmlClass{lc-mute}{4}
5\htmlClass{lc-mute}{5}
6\htmlClass{lc-mute}{6}
t\htmlClass{lc-mute}{t}
u(t−3) (t−3)2\htmlClass{lc-orange}{u(t - 3)}\,\htmlClass{lc-orange}{(t - 3)^{\htmlClass{lc-green}{2}}}
0\htmlClass{lc-mute}{0}
1\htmlClass{lc-mute}{1}
2\htmlClass{lc-mute}{2}
3\htmlClass{lc-orange}{3}
4\htmlClass{lc-mute}{4}
5\htmlClass{lc-mute}{5}
6\htmlClass{lc-mute}{6}
t\htmlClass{lc-mute}{t}

Notice the difference at the switch time t=ct = c: u(t−c)t2\switch{u(t - c)}\force{t^2} turns on an unshifted parabola that has already climbed to height c2c^2, while u(t−c)(t−c)2\switch{u(t - c)}\force{\elapsed{(t - c)}^2} slides the vertex to t=ct = c so the curve starts from height 00 right at the switch.

A switch on its own just uncovers a fixed curve mid-climb, while using elapsed time moves the start of the curve along with the switch.

When the switch and the function are both written in terms of the same elapsed time t−c\elapsed{t - c}, the time delay becomes an exponential factor e−cs\switch{e^{-cs}} when we take the Laplace transform:

L{u(t−c)⏟switch at cf(t−c)⏟elapsed time t−c}\displaystyle \mathcal{L}\Big\{\underbrace{\switch{u(t - c)}}_{\text{switch at } c}\underbrace{\force{f(\elapsed{t - c})}}_{\text{elapsed time } \elapsed{t - c}}\Big\} =e−csF(s)\displaystyle = \switch{e^{-cs}}\force{F(s)}

First, let's take a forward transform where the shift already matches the switch: L{u(t−4)(t−4)3}\mathcal{L}\{\switch{u(t - 4)}\force{\elapsed{(t - 4)}^3}\}.

Text solution
Transform the unshifted functionIgnore the shift of 44 first and take the Laplace transform of t3\force{t^3}.
L{t3}\displaystyle \mathcal{L}\{\force{t^3}\} =3!s4\displaystyle = \force{\frac{3!}{s^4}} =6s4\displaystyle = \force{\frac{6}{s^4}}
Attach the delay exponentialBecause both factors use t−4\elapsed{t - 4}, the switch at t=4t = 4 multiplies the transform by e−4s\switch{e^{-4s}}.
L{u(t−4)(t−4)3}\displaystyle \mathcal{L}\{\switch{u(t - 4)}\force{\elapsed{(t - 4)}^3}\} =e−4s6s4\displaystyle = \switch{e^{-4s}}\force{\frac{6}{s^4}}

So e−4s\switch{e^{-4s}} records the 44-second wait, while 6s4\force{\tfrac{6}{s^4}} comes from the cubic function t3\force{t^3}.

Now going backward, let's find the inverse transform of e−5s1s2+9\switch{e^{-5s}}\force{\frac{1}{s^2 + 9}}.

Text solution
Invert the fraction without the exponentialSet e−5s\switch{e^{-5s}} aside and find the inverse transform of 1s2+9\force{\frac{1}{s^2 + 9}}.
L−1 ⁣{1s2+9}\displaystyle \mathcal{L}^{-1}\!\left\{\force{\frac{1}{s^2 + 9}}\right\} =13sin⁡(3t)\displaystyle = \force{\frac{1}{3}\sin(3t)}
Turn on the switch and shift tt to t−5\elapsed{t - 5}Multiply by u(t−5)\switch{u(t - 5)} and replace tt inside the sine wave with elapsed time t−5\elapsed{t - 5}.
L−1 ⁣{e−5s1s2+9}\displaystyle \mathcal{L}^{-1}\!\left\{\switch{e^{-5s}}\force{\frac{1}{s^2 + 9}}\right\} =u(t−5) 13sin⁡(3(t−5))\displaystyle = \switch{u(t - 5)}\,\force{\frac{1}{3}\sin(3(\elapsed{t - 5}))}

This gives a sine wave that stays at 00 until t=5t = 5 and starts its first cycle at t=5t = 5.

3

Matching the Shift When Functions Aren't Delayed

Often a piecewise force gives a product like u(t−3)t2\switch{u(t - 3)}\force{t^2}, where the switch has t−3\elapsed{t - 3} but the function has a plain tt. To take the Laplace transform L{u(t−c)g(t)}\mathcal{L}\{\switch{u(t - c)}\force{g(t)}\}, we rewrite every unshifted tt in terms of (t−c)\elapsed{(t - c)} by subtracting and adding cc:

t\displaystyle t =(t−c)+c\displaystyle = \elapsed{(t - c)} + c
Matching the Shift When Functions Aren't Delayed
L{u(t−3) t2}\displaystyle \mathcal{L}\{\htmlClass{lc-orange}{u(t - 3)}\,\htmlClass{lc-green}{t^2}\} =  ?\displaystyle = \;?

How we separate the extra +c+c from (t−c)\elapsed{(t - c)} depends on whether tt sits inside a polynomial, an exponential, or a trig function. First, a polynomial: find L{u(t−3)t2}\mathcal{L}\{\switch{u(t - 3)}\force{t^2}\}.

Text solution
Replace tt with (t−3)+3\elapsed{(t - 3)} + 3 and expand in powers of (t−3)\elapsed{(t - 3)}Keep parentheses around (t−3)\elapsed{(t - 3)} while squaring so (t−3)\elapsed{(t - 3)} stays grouped together.
u(t−3)t2=u(t−3)((t−3)+3)2=u(t−3)[(t−3)2+6(t−3)+9]\displaystyle \begin{aligned} \switch{u(t - 3)}\force{t^2} &= \switch{u(t - 3)}\force{\big(\elapsed{(t - 3)} + 3\big)^2} \\ &= \switch{u(t - 3)}\big[\force{\elapsed{(t - 3)}^2 + 6\elapsed{(t - 3)} + 9}\big] \end{aligned}
Transform term by term with the delayTurn u(t−3)\switch{u(t - 3)} into e−3s\switch{e^{-3s}} and transform the bracket just like t2+6t+9\force{t^2 + 6t + 9}.
L{u(t−3)t2}\displaystyle \mathcal{L}\{\switch{u(t - 3)}\force{t^2}\} =e−3s ⁣(2s3+6s2+9s)\displaystyle = \switch{e^{-3s}}\!\left(\force{\frac{2}{s^3} + \frac{6}{s^2} + \frac{9}{s}}\right)

The extra 6s2\force{\frac{6}{s^2}} and 9s\force{\frac{9}{s}} terms appear because the unshifted parabola t2\force{t^2} is already at height 99 with slope 66 when the switch turns it on at t=3t = 3.

Now an exponential: find L{u(t−2)e5t}\mathcal{L}\{\switch{u(t - 2)}\force{e^{5t}}\}. Remember that addition in an exponent splits into multiplication out front: ea+b=eaebe^{a + b} = e^a e^b.

Text solution
Replace tt with (t−2)+2\elapsed{(t - 2)} + 2 and split off the constant exponentialDistribute the 55 across both parts of the exponent and factor out the constant number e10e^{10}.
u(t−2)e5t=u(t−2)e5((t−2)+2)=u(t−2)e5(t−2)+10=e10u(t−2)e5(t−2)\displaystyle \begin{aligned} \switch{u(t - 2)}\force{e^{5t}} &= \switch{u(t - 2)}\force{e^{5(\elapsed{(t - 2)} + 2)}} \\ &= \switch{u(t - 2)}\force{e^{5\elapsed{(t - 2)} + 10}} \\ &= e^{10}\switch{u(t - 2)}\force{e^{5\elapsed{(t - 2)}}} \end{aligned}
Transform the shifted exponentialLeave the constant e10e^{10} in front and transform u(t−2)e5(t−2)\switch{u(t - 2)}\force{e^{5\elapsed{(t - 2)}}}.
L{u(t−2)e5t}\displaystyle \mathcal{L}\{\switch{u(t - 2)}\force{e^{5t}}\} =e10e−2s1s−5\displaystyle = e^{10}\switch{e^{-2s}}\force{\frac{1}{s - 5}}

Here e10e^{10} is just a constant multiplier, while e−2s\switch{e^{-2s}} marks the switch at t=2t = 2.

Now a trig function: find L{u(t−π6)cos⁡(2t)}\mathcal{L}\{\switch{u(t - \tfrac{\pi}{6})}\force{\cos(2t)}\}. When the shift is a half-period like π\pi, you can see it directly from the wave: shifting a sine wave by π\pi flips it upside down, so sin⁡((t−π)+π)=−sin⁡(t−π)\force{\sin(\elapsed{(t - \pi)} + \pi)} = -\force{\sin(\elapsed{t - \pi})}, which gives L{u(t−π)sin⁡(t)}=−e−πs1s2+1\mathcal{L}\{\switch{u(t - \pi)}\force{\sin(t)}\} = -\switch{e^{-\pi s}}\force{\frac{1}{s^2 + 1}} right away. For any other angle (or if you aren't sure which way the wave flips), split the constant angle BB away from the shifted angle AA using the angle-addition identities:

cos⁡(A+B)=cos⁡(A)cos⁡(B)−sin⁡(A)sin⁡(B)sin⁡(A+B)=sin⁡(A)cos⁡(B)+cos⁡(A)sin⁡(B)\displaystyle \begin{aligned} \cos(A + B) &= \cos(A)\cos(B) - \sin(A)\sin(B) \\ \sin(A + B) &= \sin(A)\cos(B) + \cos(A)\sin(B) \end{aligned}
Text solution
Replace tt with (t−π6)+π6\elapsed{(t - \tfrac{\pi}{6})} + \tfrac{\pi}{6} and distribute the 22Keep (t−π6)\elapsed{(t - \tfrac{\pi}{6})} grouped inside parentheses.
cos⁡(2t)=cos⁡ ⁣(2((t−π6)+π6))=cos⁡ ⁣(2(t−π6)+π3)\displaystyle \begin{aligned} \force{\cos(2t)} &= \force{\cos\!\Big(2\big(\elapsed{(t - \tfrac{\pi}{6})} + \tfrac{\pi}{6}\big)\Big)} \\ &= \force{\cos\!\big(2\elapsed{(t - \tfrac{\pi}{6})} + \tfrac{\pi}{3}\big)} \end{aligned}
Split off π3\tfrac{\pi}{3} using cosine angle additionPlug A=2(t−π6)A = 2\elapsed{(t - \tfrac{\pi}{6})} and B=π3B = \tfrac{\pi}{3} into cos⁡(A+B)\cos(A + B), then evaluate cos⁡(π3)=12\cos(\tfrac{\pi}{3}) = \frac{1}{2} and sin⁡(π3)=32\sin(\tfrac{\pi}{3}) = \frac{\sqrt{3}}{2}.
u(t−π6)cos⁡(2t)=u(t−π6)[cos⁡ ⁣(2(t−π6))cos⁡(π3)−sin⁡ ⁣(2(t−π6))sin⁡(π3)]=u(t−π6) ⁣[12cos⁡ ⁣(2(t−π6))−32sin⁡ ⁣(2(t−π6))]\displaystyle \begin{aligned} \switch{u(t - \tfrac{\pi}{6})}\force{\cos(2t)} &= \switch{u(t - \tfrac{\pi}{6})}\Big[\force{\cos\!\big(2\elapsed{(t - \tfrac{\pi}{6})}\big)}\cos(\tfrac{\pi}{3}) \\ &\qquad - \force{\sin\!\big(2\elapsed{(t - \tfrac{\pi}{6})}\big)}\sin(\tfrac{\pi}{3})\Big] \\ &= \switch{u(t - \tfrac{\pi}{6})}\!\left[\frac{1}{2}\force{\cos\!\big(2(\elapsed{t - \tfrac{\pi}{6}})\big)} - \frac{\sqrt{3}}{2}\force{\sin\!\big(2(\elapsed{t - \tfrac{\pi}{6}})\big)}\right] \end{aligned}
Transform both delayed trig piecesTurn u(t−π6)\switch{u(t - \tfrac{\pi}{6})} into e−(π/6)s\switch{e^{-(\pi/6)s}} and transform the cosine and sine terms.
L{u(t−π6)cos⁡(2t)}\displaystyle \mathcal{L}\{\switch{u(t - \tfrac{\pi}{6})}\force{\cos(2t)}\} =e−(π/6)s ⁣(12⋅ss2+4−32⋅2s2+4)\displaystyle = \switch{e^{-(\pi/6)s}}\!\left(\frac{1}{2}\cdot\force{\frac{s}{s^2 + 4}} - \frac{\sqrt{3}}{2}\cdot\force{\frac{2}{s^2 + 4}}\right)

Splitting the angle rewrites the single unshifted cosine as a combination of a shifted cosine and a shifted sine that both start at t=π6t = \tfrac{\pi}{6}.

4

Solving a Piecewise Initial Value Problem

Now we can solve an initial value problem driven by a piecewise force in a single pass:

y′′+y=f(t),y(0)=1,y′(0)=0,f(t)={t,0≤t<11,t≥1\displaystyle \begin{aligned} y'' + \unknown{y} &= \force{f(t)}, \quad \unknown{y(0)} = 1, \quad \rate{y'(0)} = 0, \\ \force{f(t)} &= \begin{cases} \force{t}, & 0 \le t < 1 \\ \force{1}, & t \ge 1 \end{cases} \end{aligned}
t\htmlClass{lc-mute}{t}
11
1\htmlClass{lc-orange}{1}
t\htmlClass{lc-green}{t}
1\htmlClass{lc-green}{1}
f(t)\htmlClass{lc-green}{f(t)}

Remember how the second derivative transforms using the initial values at t=0t = 0:

L{y′′}\displaystyle \mathcal{L}\{y''\} =s2Y(s)−s y(0)−y′(0)\displaystyle = s^2 \unknown{Y(s)} - s\,\unknown{y(0)} - \rate{y'(0)}
Solving a Piecewise Initial Value Problem
1\htmlClass{lc-blue}{1}
0\htmlClass{lc-mute}{0}
y′′+yy'' + \htmlClass{lc-blue}{y}
=f(t){}= \htmlClass{lc-green}{f(t)}
y(0)\htmlClass{lc-blue}{y(0)}
=1,y′(0)=0{}= 1,\quad \htmlClass{lc-pink}{y'(0)} = 0
{t,0≤t<11,t≥1f(t)\vphantom{\begin{cases} t, & 0 \le t < 1 \\ 1, & t \ge 1 \end{cases}}\htmlClass{lc-green}{f(t)}
={t,0≤t<11,t≥1{}= \begin{cases} \htmlClass{lc-green}{t}, & 0 \le t < 1 \\ \htmlClass{lc-green}{1}, & t \ge 1 \end{cases}
y(t)\htmlClass{lc-blue}{y(t)}
=  ?{}= \;?
Text solution
Rewrite the piecewise force using a step switchStart with the ramp t\force{t} at t=0t = 0, and at t=1t = 1 add u(t−1)\switch{u(t - 1)} times (1−t)(\force{1 - t}) to cancel t\force{t} and level off at 1\force{1}.
y′′+y=t+u(t−1)(1−t)=t−u(t−1)(t−1)\displaystyle \begin{aligned} y'' + \unknown{y} &= \force{t} + \switch{u(t - 1)}(\force{1 - t}) \\ &= \force{t} - \switch{u(t - 1)}\elapsed{(t - 1)} \end{aligned}
Take the Laplace transform and solve for Y(s)\unknown{Y(s)}Plug in y(0)=1\unknown{y(0)} = 1 and y′(0)=0\rate{y'(0)} = 0, and keep the initial-condition fraction and the e−s\switch{e^{-s}} term separate when dividing by s2+1s^2 + 1.
s2Y(s)−s+Y(s)=1s2−e−s1s2(s2+1)Y(s)=s+1s2−e−s1s2Y(s)=ss2+1+1s2(s2+1)−e−s1s2(s2+1)\displaystyle \begin{aligned} s^2 \unknown{Y(s)} \free{- s} + \unknown{Y(s)} &= \force{\frac{1}{s^2}} - \switch{e^{-s}}\force{\frac{1}{s^2}} \\ (s^2 + 1)\unknown{Y(s)} &= \free{s} + \force{\frac{1}{s^2}} - \switch{e^{-s}}\force{\frac{1}{s^2}} \\ \unknown{Y(s)} &= \free{\frac{s}{s^2 + 1}} + \force{\frac{1}{s^2(s^2 + 1)}} - \switch{e^{-s}}\force{\frac{1}{s^2(s^2 + 1)}} \end{aligned}
Split the fraction while keeping e−s\switch{e^{-s}} factored outBreak 1s2(s2+1)\force{\frac{1}{s^2(s^2 + 1)}} into simpler fractions once and reuse it in both forcing terms.
1s2(s2+1)=(s2+1)−s2s2(s2+1)=1s2−1s2+1Y(s)=ss2+1+(1s2−1s2+1)−e−s ⁣(1s2−1s2+1)\displaystyle \begin{aligned} \force{\frac{1}{s^2(s^2 + 1)}} &= \force{\frac{(s^2 + 1) - s^2}{s^2(s^2 + 1)}} \\ &= \force{\frac{1}{s^2} - \frac{1}{s^2 + 1}} \\ \unknown{Y(s)} &= \free{\frac{s}{s^2 + 1}} + \left(\force{\frac{1}{s^2} - \frac{1}{s^2 + 1}}\right) - \switch{e^{-s}}\!\left(\force{\frac{1}{s^2} - \frac{1}{s^2 + 1}}\right) \end{aligned}
Invert term by termTransform the unshifted fractions back to tt, and for the e−s\switch{e^{-s}} term, turn on u(t−1)\switch{u(t - 1)} and shift every tt inside the bracket to t−1\elapsed{t - 1}.
y(t)\displaystyle \unknown{y(t)} =cos⁡(t)+t−sin⁡(t)−u(t−1)[(t−1)−sin⁡(t−1)]\displaystyle = \free{\cos(t)} + \force{t - \sin(t)} - \switch{u(t - 1)}\big[\force{\elapsed{(t - 1)} - \sin(\elapsed{t - 1})}\big]

Before t=1t = 1, the switch is 00 and the spring oscillates around the climbing ramp t\force{t}; from t=1t = 1 onward, the switch is 11 and t−(t−1)=1\force{t} - \elapsed{(t - 1)} = \force{1} holds the center of oscillation at height 11 while starting a new wave sin⁡(t−1)\force{\sin(\elapsed{t - 1})} at t=1t = 1.

When the ramp force f(t)\force{f(t)} levels off, the delayed term in y(t)\unknown{y(t)} cancels the upward climb and smoothly shifts the spring's oscillation to center around the new flat force, with no jump in position or velocity.

Wherever the ramp force levels off, the delayed term turns on at the corner to cancel the upward climb, so the spring’s motion continues smoothly around the new flat level.

Key concepts

To solve a piecewise problem with Laplace transforms, walk the timeline from t=0t = 0. Write the starting rule, and at each switch time t=ct = c, add u(t−c)(new rule−old rule)\switch{u(t - c)}(\force{\text{new rule}} - \force{\text{old rule}}). For example, a ramp t\force{t} that levels off at 2\force{2} when t=2t = 2 becomes t+u(t−2)(2−t)=t−u(t−2)(t−2)\force{t} + \switch{u(t - 2)}(\force{2 - t}) = \force{t} - \switch{u(t - 2)}\elapsed{(t - 2)}. Before doing any algebra, check whether the function next to u(t−c)\switch{u(t - c)} is already written in terms of t−c\elapsed{t - c}. If it already matches, like u(t−4)(t−4)3\switch{u(t - 4)}\force{\elapsed{(t - 4)}^3} or u(t−2)(t−2)\switch{u(t - 2)}\elapsed{(t - 2)}, don't expand or substitute. Just transform it directly with

L{u(t−c)f(t−c)}\displaystyle \mathcal{L}\{\switch{u(t - c)}\force{f(\elapsed{t - c})}\} =e−csF(s).\displaystyle = \switch{e^{-cs}}\force{F(s)}.

If you have an unshifted tt next to u(t−c)\switch{u(t - c)}, substitute t=(t−c)+ct = \elapsed{(t - c)} + c. Keep (t−c)\elapsed{(t - c)} grouped in parentheses while you expand powers (like ((t−3)+3)2\force{(\elapsed{(t - 3)} + 3)^2}), factor out a constant exponential (like e5((t−2)+2)=e10e5(t−2)\force{e^{5(\elapsed{(t - 2)} + 2)}} = e^{10}\force{e^{5\elapsed{(t - 2)}}}), or split a trig angle using angle addition (like cos⁡(2(t−π6)+π3)\force{\cos(2\elapsed{(t - \tfrac{\pi}{6})} + \tfrac{\pi}{3})}). Finally, when solving for Y(s)\unknown{Y(s)} and inverting, keep each e−cs\switch{e^{-cs}} factored out in front while you do partial fractions on F(s)\force{F(s)}. Then turn e−csF(s)\switch{e^{-cs}}\force{F(s)} back into u(t−c)f(t−c)\switch{u(t - c)}\force{f(\elapsed{t - c})} by replacing every tt in f(t)\force{f(t)} with t−c\elapsed{t - c}, like e−5s1s2+9→u(t−5)13sin⁡(3(t−5))\switch{e^{-5s}}\force{\frac{1}{s^2 + 9}} \to \switch{u(t - 5)}\force{\frac{1}{3}\sin(3(\elapsed{t - 5}))}.

5

Practice

1

Write the piecewise function as a single expression using unit step functions: f(t)=4f(t) = 4 for 0≤t<10 \le t < 1, f(t)=2t+2f(t) = 2t + 2 for 1≤t<41 \le t < 4, and f(t)=0f(t) = 0 for t≥4t \ge 4.

Start with the rule at t=0t = 0; at t=1t = 1 and t=4t = 4, what is the old rule currently active on the timeline that you need to subtract, and what is the new rule you need to add?

Walk the timeline at t=0t = 0, t=1t = 1, and t=4t = 4
f(t)=4+u(t−1)((2t+2)−4)+u(t−4)(0−(2t+2))=4+u(t−1)(2t−2)−u(t−4)(2t+2)\displaystyle \begin{aligned} \force{f(t)} &= \force{4} + \switch{u(t - 1)}\big((\force{2t + 2}) - \force{4}\big) + \switch{u(t - 4)}\big(\force{0} - (\force{2t + 2})\big) \\ &= \force{4} + \switch{u(t - 1)}(\force{2t - 2}) - \switch{u(t - 4)}(\force{2t + 2}) \end{aligned}
(Watch out: At t=4t = 4, you must subtract the full active rule 2t+2\force{2t + 2}, not the simplified bracket 2t−22t - 2 from the previous switch. Subtracting 2t−22t - 2 would leave f(t)=4f(t) = 4 instead of 00 for t≥4t \ge 4. Similarly, forgetting to subtract the old rule 4\force{4} at t=1t = 1 gives the wrong expression 4+u(t−1)(2t+2)−u(t−4)(2t+2)4 + u(t - 1)(2t + 2) - u(t - 4)(2t + 2).)
Answerf(t)=4+u(t−1)(2t−2)−u(t−4)(2t+2)\force{f(t)} = \force{4} + \switch{u(t - 1)}(\force{2t - 2}) - \switch{u(t - 4)}(\force{2t + 2})
2

Find the inverse Laplace transform of F(s)=2e−3ss(s+2)+se−5ss2+4F(s) = \frac{2e^{-3s}}{s(s + 2)} + \frac{se^{-5s}}{s^2 + 4}.

Factor e−3s\switch{e^{-3s}} and e−5s\switch{e^{-5s}} out in front of their fractions first; how does 2s(s+2)\force{\frac{2}{s(s + 2)}} split into partial fractions before you apply the shifts?

Split the fraction and invert without the exponentials
2s(s+2)=1s−1s+2  ⟹  L−1 ⁣{2s(s+2)}=1−e−2tL−1 ⁣{ss2+4}=cos⁡(2t)\displaystyle \begin{aligned} \force{\frac{2}{s(s + 2)}} &= \force{\frac{1}{s} - \frac{1}{s + 2}} \implies \mathcal{L}^{-1}\!\left\{\force{\frac{2}{s(s + 2)}}\right\} = \force{1 - e^{-2t}} \\ \mathcal{L}^{-1}\!\left\{\force{\frac{s}{s^2 + 4}}\right\} &= \force{\cos(2t)} \end{aligned}
Apply the time shifts at t=3t = 3 and t=5t = 5 (Watch out: When e−cs\switch{e^{-cs}} turns into u(t−c)\switch{u(t - c)}, remember to replace tt with (t−c)\elapsed{(t - c)} inside the functions. Leaving tt unshifted gives the wrong answer u(t−3)[1−e−2t]+u(t−5)cos⁡(2t)u(t - 3)[1 - e^{-2t}] + u(t - 5)\cos(2t), and failing to put parentheses around (t−5)\elapsed{(t - 5)} inside cos⁡(2t)\cos(2t) gives cos⁡(2t−5)\cos(2t - 5) instead of cos⁡(2(t−5))\force{\cos(2\elapsed{(t - 5)})}.)
f(t)\displaystyle \force{f(t)} =u(t−3)[1−e−2(t−3)]+u(t−5)cos⁡(2(t−5))\displaystyle = \switch{u(t - 3)}\big[\force{1 - e^{-2\elapsed{(t - 3)}}}\big] + \switch{u(t - 5)}\force{\cos(2\elapsed{(t - 5)})}
Answerf(t)=u(t−3)[1−e−2(t−3)]+u(t−5)cos⁡(2(t−5))\force{f(t)} = \switch{u(t - 3)}\big[\force{1 - e^{-2\elapsed{(t - 3)}}}\big] + \switch{u(t - 5)}\force{\cos(2\elapsed{(t - 5)})}
3

Find the Laplace transform of f(t)=u(t−2)(t2+1)f(t) = u(t - 2)(t^2 + 1).

Does t2+1\force{t^2 + 1} match the switch u(t−2)\switch{u(t - 2)}? Substitute t=(t−2)+2t = \elapsed{(t - 2)} + 2 and expand in powers of (t−2)\elapsed{(t - 2)} before transforming.

Rewrite tt as (t−2)+2\elapsed{(t - 2)} + 2 and expand (Watch out: Don't transform t2+1t^2 + 1 directly or just swap tt for t−2t - 2 to write (t−2)2+1(t - 2)^2 + 1. Doing that misses the middle term 4(t−2)\force{4\elapsed{(t - 2)}} and the +4+4 from squaring, which leads to the wrong answer e−2s(2s3+1s)e^{-2s}(\tfrac{2}{s^3} + \tfrac{1}{s}).)
u(t−2)(t2+1)=u(t−2)[((t−2)+2)2+1]=u(t−2)[(t−2)2+4(t−2)+5]\displaystyle \begin{aligned} \switch{u(t - 2)}\force{(t^2 + 1)} &= \switch{u(t - 2)}\force{\Big[\big(\elapsed{(t - 2)} + 2\big)^2 + 1\Big]} \\ &= \switch{u(t - 2)}\big[\force{\elapsed{(t - 2)}^2 + 4\elapsed{(t - 2)} + 5}\big] \end{aligned}
Transform term by term
F(s)\displaystyle \force{F(s)} =e−2s ⁣(2s3+4s2+5s)\displaystyle = \switch{e^{-2s}}\!\left(\force{\frac{2}{s^3} + \frac{4}{s^2} + \frac{5}{s}}\right)
AnswerF(s)=e−2s ⁣(2s3+4s2+5s)\force{F(s)} = \switch{e^{-2s}}\!\left(\force{\frac{2}{s^3} + \frac{4}{s^2} + \frac{5}{s}}\right)
4

Find the Laplace transform of f(t)=u(t−3)e−2tf(t) = u(t - 3)e^{-2t}.

Replace tt in the exponent with (t−3)+3\elapsed{(t - 3)} + 3 and distribute the −2-2; which part of the exponential splits off as a constant number?

Match the shift in the exponent (Watch out: Transforming e−2te^{-2t} without shifting tt drops the constant factor e−6e^{-6} and gives the wrong answer e−3ss+2\frac{e^{-3s}}{s + 2}; also be sure to distribute −2-2 to +3+3, or you'll get e3e^3 instead of e−6e^{-6}.)
u(t−3)e−2t=u(t−3)e−2((t−3)+3)=u(t−3)e−2(t−3)−6=e−6u(t−3)e−2(t−3)\displaystyle \begin{aligned} \switch{u(t - 3)}\force{e^{-2t}} &= \switch{u(t - 3)}\force{e^{-2(\elapsed{(t - 3)} + 3)}} \\ &= \switch{u(t - 3)}\force{e^{-2\elapsed{(t - 3)} - 6}} \\ &= e^{-6}\switch{u(t - 3)}\force{e^{-2\elapsed{(t - 3)}}} \end{aligned}
Transform the delayed exponential
F(s)\displaystyle \force{F(s)} =e−6e−3ss+2\displaystyle = \frac{e^{-6}\switch{e^{-3s}}}{\force{s + 2}}
AnswerF(s)=e−6e−3ss+2\force{F(s)} = \frac{e^{-6}\switch{e^{-3s}}}{\force{s + 2}}
5

Find the Laplace transform of f(t)=u(t−π3)sin⁡(t)f(t) = u(t - \tfrac{\pi}{3})\sin(t).

Rewrite sin⁡(t)\force{\sin(t)} as sin⁡((t−π3)+π3)\force{\sin(\elapsed{(t - \tfrac{\pi}{3})} + \tfrac{\pi}{3})}; which angle-addition identity splits (t−π3)\elapsed{(t - \tfrac{\pi}{3})} from π3\tfrac{\pi}{3}?

Rewrite tt and expand with sine angle addition (Watch out: Treating sin⁡(t)\sin(t) as if it were already delayed to sin⁡(t−π3)\sin(t - \tfrac{\pi}{3}) gives the wrong answer e−(π/3)ss2+1\frac{e^{-(\pi/3)s}}{s^2 + 1}, and swapping cos⁡(π3)=12\cos(\tfrac{\pi}{3}) = \frac{1}{2} with sin⁡(π3)=32\sin(\tfrac{\pi}{3}) = \frac{\sqrt{3}}{2} swaps the coefficients on the two fractions.)
u(t−π3)sin⁡(t)=u(t−π3)sin⁡ ⁣((t−π3)+π3)=u(t−π3)[sin⁡(t−π3)cos⁡(π3)+cos⁡(t−π3)sin⁡(π3)]=u(t−π3) ⁣[12sin⁡(t−π3)+32cos⁡(t−π3)]\displaystyle \begin{aligned} \switch{u(t - \tfrac{\pi}{3})}\force{\sin(t)} &= \switch{u(t - \tfrac{\pi}{3})}\force{\sin\!\big(\elapsed{(t - \tfrac{\pi}{3})} + \tfrac{\pi}{3}\big)} \\ &= \switch{u(t - \tfrac{\pi}{3})}\Big[\force{\sin(\elapsed{t - \tfrac{\pi}{3}})}\cos(\tfrac{\pi}{3}) \\ &\qquad + \force{\cos(\elapsed{t - \tfrac{\pi}{3}})}\sin(\tfrac{\pi}{3})\Big] \\ &= \switch{u(t - \tfrac{\pi}{3})}\!\left[\frac{1}{2}\force{\sin(\elapsed{t - \tfrac{\pi}{3}})} + \frac{\sqrt{3}}{2}\force{\cos(\elapsed{t - \tfrac{\pi}{3}})}\right] \end{aligned}
Transform both delayed trig terms
F(s)\displaystyle \force{F(s)} =e−(π/3)s ⁣[12⋅1s2+1+32⋅ss2+1]\displaystyle = \switch{e^{-(\pi/3)s}}\!\left[\frac{1}{2}\cdot\force{\frac{1}{s^2 + 1}} + \frac{\sqrt{3}}{2}\cdot\force{\frac{s}{s^2 + 1}}\right]
AnswerF(s)=e−(π/3)s ⁣[12⋅1s2+1+32⋅ss2+1]\force{F(s)} = \switch{e^{-(\pi/3)s}}\!\left[\frac{1}{2}\cdot\force{\frac{1}{s^2 + 1}} + \frac{\sqrt{3}}{2}\cdot\force{\frac{s}{s^2 + 1}}\right]
6

Solve the initial value problem y′′+y=f(t)y'' + y = f(t), y(0)=0y(0) = 0, y′(0)=1y'(0) = 1, where f(t)=0f(t) = 0 for 0≤t<π0 \le t < \pi, f(t)=2f(t) = 2 for π≤t<2π\pi \le t < 2\pi, and f(t)=0f(t) = 0 for t≥2πt \ge 2\pi.

Write the pulse f(t)\force{f(t)} using two step switches at t=πt = \pi and t=2πt = 2\pi; after solving for Y(s)\unknown{Y(s)}, notice which fraction repeats next to both e−πs\switch{e^{-\pi s}} and e−2πs\switch{e^{-2\pi s}}.

Write the force with step switches and transform the equation
y′′+y=2u(t−π)−2u(t−2π)s2Y(s)−1+Y(s)=e−πs2s−e−2πs2sY(s)=1s2+1+2e−πs1s(s2+1)−2e−2πs1s(s2+1)\displaystyle \begin{aligned} y'' + \unknown{y} &= \force{2} \switch{u(t - \pi)} - \force{2} \switch{u(t - 2\pi)} \\ s^2 \unknown{Y(s)} \free{- 1} + \unknown{Y(s)} &= \switch{e^{-\pi s}}\force{\frac{2}{s}} - \switch{e^{-2\pi s}}\force{\frac{2}{s}} \\ \unknown{Y(s)} &= \free{\frac{1}{s^2 + 1}} + \force{2} \switch{e^{-\pi s}}\force{\frac{1}{s(s^2 + 1)}} - \force{2} \switch{e^{-2\pi s}}\force{\frac{1}{s(s^2 + 1)}} \end{aligned}
Split 1s(s2+1)\force{\frac{1}{s(s^2 + 1)}} and invert term by term
1s(s2+1)=(s2+1)−s2s(s2+1)=1s−ss2+1Y(s)=1s2+1+2e−πs ⁣(1s−ss2+1)−2e−2πs ⁣(1s−ss2+1)\displaystyle \begin{aligned} \force{\frac{1}{s(s^2 + 1)}} &= \force{\frac{(s^2 + 1) - s^2}{s(s^2 + 1)}} \\ &= \force{\frac{1}{s} - \frac{s}{s^2 + 1}} \\ \unknown{Y(s)} &= \free{\frac{1}{s^2 + 1}} + \force{2} \switch{e^{-\pi s}}\!\left(\force{\frac{1}{s} - \frac{s}{s^2 + 1}}\right) \\ &\qquad - \force{2} \switch{e^{-2\pi s}}\!\left(\force{\frac{1}{s} - \frac{s}{s^2 + 1}}\right) \end{aligned}
(Watch out: Don't forget to shift tt inside cos⁡(t)\cos(t) to t−π\elapsed{t - \pi} and t−2π\elapsed{t - 2\pi} when inverting the two delayed terms. Leaving cos⁡(t)\cos(t) unshifted gives the wrong answer sin⁡(t)+2u(t−π)[1−cos⁡(t)]−2u(t−2π)[1−cos⁡(t)]\sin(t) + 2u(t - \pi)[1 - \cos(t)] - 2u(t - 2\pi)[1 - \cos(t)].)
y(t)=sin⁡(t)+2u(t−π)[1−cos⁡(t−π)]−2u(t−2π)[1−cos⁡(t−2π)]\displaystyle \begin{aligned} \unknown{y(t)} &= \free{\sin(t)} + \force{2} \switch{u(t - \pi)}\big[\force{1 - \cos(\elapsed{t - \pi})}\big] \\ &\qquad - \force{2} \switch{u(t - 2\pi)}\big[\force{1 - \cos(\elapsed{t - 2\pi})}\big] \end{aligned}
Answery(t)=sin⁡(t)+2u(t−π)[1−cos⁡(t−π)]−2u(t−2π)[1−cos⁡(t−2π)]\unknown{y(t)} = \free{\sin(t)} + \force{2} \switch{u(t - \pi)}\big[\force{1 - \cos(\elapsed{t - \pi})}\big] - \force{2} \switch{u(t - 2\pi)}\big[\force{1 - \cos(\elapsed{t - 2\pi})}\big]
7

Solve the initial value problem y′′+4y=f(t)y'' + 4y = f(t), y(0)=0y(0) = 0, y′(0)=0y'(0) = 0, where f(t)=tf(t) = t for 0≤t<20 \le t < 2 and f(t)=0f(t) = 0 for t≥2t \ge 2.

When you write f(t)=t−u(t−2)t\force{f(t)} = \force{t} - \switch{u(t - 2)}\force{t}, does the t\force{t} next to u(t−2)\switch{u(t - 2)} match the switch? Rewrite that tt as (t−2)+2\elapsed{(t - 2)} + 2 before you take the Laplace transform.

Rewrite the piecewise force and match the shift at t=2t = 2 (Watch out: Because f(t)f(t) drops to 00 at t=2t = 2 instead of leveling off at 22, the switch term is −u(t−2)t-\switch{u(t - 2)}\force{t}, not −u(t−2)(t−2)-u(t - 2)(t - 2). Treating it as −u(t−2)(t−2)-u(t - 2)(t - 2) drops the +2+2 from t=(t−2)+2t = \elapsed{(t - 2)} + 2 and gives the wrong answer 14t−18sin⁡(2t)−u(t−2)[14(t−2)−18sin⁡(2(t−2))]\frac{1}{4}t - \frac{1}{8}\sin(2t) - u(t - 2)[\frac{1}{4}(t - 2) - \frac{1}{8}\sin(2(t - 2))].)
f(t)=t+u(t−2)(0−t)=t−u(t−2)[(t−2)+2]\displaystyle \begin{aligned} \force{f(t)} &= \force{t} + \switch{u(t - 2)}(\force{0 - t}) \\ &= \force{t} - \switch{u(t - 2)}\big[\force{\elapsed{(t - 2)} + 2}\big] \end{aligned}
Transform the equation and solve for Y(s)\unknown{Y(s)}
s2Y(s)+4Y(s)=1s2−e−2s ⁣(1s2+2s)Y(s)=1s2(s2+4)−e−2s ⁣[1s2(s2+4)+2s(s2+4)]\displaystyle \begin{aligned} s^2 \unknown{Y(s)} + 4\unknown{Y(s)} &= \force{\frac{1}{s^2}} - \switch{e^{-2s}}\!\left(\force{\frac{1}{s^2} + \frac{2}{s}}\right) \\ \unknown{Y(s)} &= \force{\frac{1}{s^2(s^2 + 4)}} - \switch{e^{-2s}}\!\left[\force{\frac{1}{s^2(s^2 + 4)} + \frac{2}{s(s^2 + 4)}}\right] \end{aligned}
Split both fractions and invert term by term
1s2(s2+4)=14 ⁣(1s2−1s2+4),2s(s2+4)=12 ⁣(1s−ss2+4)Y(s)=(14s2−14(s2+4))−e−2s ⁣[14s2−14(s2+4)+12s−s2(s2+4)]y(t)=14t−18sin⁡(2t)−u(t−2) ⁣[14(t−2)−18sin⁡(2(t−2))+12−12cos⁡(2(t−2))]\displaystyle \begin{aligned} \force{\frac{1}{s^2(s^2 + 4)}} &= \force{\frac{1}{4}\!\left(\frac{1}{s^2} - \frac{1}{s^2 + 4}\right)}, \\ \force{\frac{2}{s(s^2 + 4)}} &= \force{\frac{1}{2}\!\left(\frac{1}{s} - \frac{s}{s^2 + 4}\right)} \\ \unknown{Y(s)} &= \force{\left(\frac{1}{4s^2} - \frac{1}{4(s^2 + 4)}\right)} \\ &\qquad - \switch{e^{-2s}}\!\left[\force{\frac{1}{4s^2} - \frac{1}{4(s^2 + 4)} + \frac{1}{2s} - \frac{s}{2(s^2 + 4)}}\right] \\ \unknown{y(t)} &= \force{\frac{1}{4}t - \frac{1}{8}\sin(2t)} - \switch{u(t - 2)}\!\Bigg[\force{\frac{1}{4}\elapsed{(t - 2)} - \frac{1}{8}\sin(2\elapsed{(t - 2)})} \\ &\qquad \force{+ \frac{1}{2} - \frac{1}{2}\cos(2\elapsed{(t - 2)})}\Bigg] \end{aligned}
Answery(t)=14t−18sin⁡(2t)−u(t−2) ⁣[14(t−2)−18sin⁡(2(t−2))+12−12cos⁡(2(t−2))]\unknown{y(t)} = \force{\frac{1}{4}t - \frac{1}{8}\sin(2t)} - \switch{u(t - 2)}\!\left[\force{\frac{1}{4}\elapsed{(t - 2)} - \frac{1}{8}\sin(2\elapsed{(t - 2)}) + \frac{1}{2} - \frac{1}{2}\cos(2\elapsed{(t - 2)})}\right]