1 / 26
Chapter 3 · Laplace Transforms

Solving Differential Equations with Laplace

Two full problems, every step named
Dr. Mohamed Mabrok · Qatar University

Today: Two Problems, Nothing Hidden

Problem A — a forcing that switches
$$y'' + 3y' + 2y = f(t)$$
with $f$ switched on at $t=1$ and off again at $t=4$, and the system already displaced: $y(0)=1$, $y'(0)=0$.
Problem B — a forcing we are not told
$$y'' + 2y' + 5y = f(t)$$
$f$ stays unknown. We solve it as $F(s)$, invert with convolution, and only at the end choose a particular $f$.
The discipline for today
At every transformation I will say which rule I am using and why it applies. If you cannot name the rule, you are pattern-matching, not solving.

The Four Rules We Will Use Today

1 · Linearity — works on every line, barely noticed
$$\mathcal{L}\{a f + b g\} = a F(s) + b G(s)$$
2 · Transform of derivatives — kills the calculus
$$\mathcal{L}\{y'\} = sY - y(0), \qquad \mathcal{L}\{y''\} = s^2Y - sy(0) - y'(0)$$
3 · Second shifting theorem — handles switching
$$\mathcal{L}\{u(t-a)\,g(t-a)\} = e^{-as}G(s)$$
4 · Convolution theorem — handles an unknown input
$$\mathcal{L}^{-1}\{F(s)G(s)\} = \int_0^t f(\tau)\,g(t-\tau)\,d\tau$$

Problem A — The Statement

$$y'' + 3y' + 2y = f(t), \qquad y(0) = 1, \quad y'(0) = 0$$
$$f(t) = \begin{cases} 0, & 0 \le t \lt 1 \\ 1, & 1 \le t \lt 4 \\ 0, & t \ge 4 \end{cases}$$
1 4 t a pulse
Why Chapter 2 cannot start this
Undetermined coefficients needs a shape to guess. A pulse has three shapes, and the system is already in motion when it arrives. Laplace does not care.

Step 1 — Write the Pulse as Switches

The unit step $u(t-a)$ is zero before $a$ and one after it. A pulse is one switch on, and a second switch that cancels the first.
$$f(t) = u(t-1) - u(t-4)$$
For $t \lt 1$: both are zero, so $f = 0$. ✓
For $1 \le t \lt 4$: the first is one, the second still zero, so $f = 1$. ✓
For $t \ge 4$: both are one, so $f = 1 - 1 = 0$. ✓
Check it before you transform it
Always test your step expression on each interval. A sign error here poisons everything downstream, and it is invisible later.

Step 2 — Transform the Right-Hand Side

Rule used — second shifting theorem, with g = 1
$$\mathcal{L}\{u(t-a)\} = \frac{e^{-as}}{s}$$
$$\mathcal{L}\{f(t)\} = \mathcal{L}\{u(t-1)\} - \mathcal{L}\{u(t-4)\} = \frac{e^{-s}}{s} - \frac{e^{-4s}}{s}$$
Where the exponential comes from
A delay in time becomes a factor $e^{-as}$ in $s$. Nothing else changes. Every switch in the problem leaves its own exponential fingerprint, and you will read them backwards at the end.
Linearity is doing quiet work here too: the transform of a difference is the difference of the transforms.

Step 3 — Transform the Left-Hand Side

Rule used — transform of derivatives
$$\mathcal{L}\{y''\} = s^2Y - sy(0) - y'(0)$$
1 $\mathcal{L}\{y''\} = s^2Y - s\,y(0) - y'(0) = s^2Y - s$  (since $y(0)=1$, $y'(0)=0$)
2 $\mathcal{L}\{3y'\} = 3\big(sY - y(0)\big) = 3sY - 3$
3 $\mathcal{L}\{2y\} = 2Y$
Notice what just happened
The initial conditions are already in the equation. In Chapter 2 they waited until the end. Here they arrive in line one, carried in by the derivative rule.

Step 4 — Now It Is Algebra

$$\big(s^2Y - s\big) + \big(3sY - 3\big) + 2Y = \frac{e^{-s} - e^{-4s}}{s}$$
Collect every $Y$ on the left, everything else on the right:
$$Y\big(s^2 + 3s + 2\big) = s + 3 + \frac{e^{-s} - e^{-4s}}{s}$$
$$Y(s) = \underbrace{\frac{s+3}{(s+1)(s+2)}}_{\text{from the initial state}} + \underbrace{\frac{e^{-s} - e^{-4s}}{s(s+1)(s+2)}}_{\text{from the pulse}}$$
Read the split
What the system does because of where it started, plus what it does because of what we did to it. Superposition, for free.

A Note on the Denominator

$$s^2 + 3s + 2 = (s+1)(s+2)$$
This is the characteristic polynomial
The same $r^2 + 3r + 2$ you would have written in Chapter 2. Laplace did not replace that idea — it carried it along automatically.
So the poles are at $-1$ and $-2$
Both negative, so every natural mode decays. Whatever we force this system with, it will settle. We know that before solving anything.

Step 5 — Partial Fractions, First Piece

$$\frac{s+3}{(s+1)(s+2)} = \frac{A}{s+1} + \frac{B}{s+2}$$
The cover-up method
To find $A$: cover $(s+1)$ in the original and put $s=-1$ into what is left.
$A = \left.\dfrac{s+3}{s+2}\right|_{s=-1} = \dfrac{2}{1} = 2$
$B = \left.\dfrac{s+3}{s+1}\right|_{s=-2} = \dfrac{1}{-1} = -1$
$$\frac{s+3}{(s+1)(s+2)} = \frac{2}{s+1} - \frac{1}{s+2}$$

Step 6 — Invert the First Piece

Rule used — table entry
$$\mathcal{L}^{-1}\left\{\frac{1}{s-a}\right\} = e^{at}$$
$$\mathcal{L}^{-1}\left\{\frac{2}{s+1} - \frac{1}{s+2}\right\} = 2e^{-t} - e^{-2t}$$
Sanity check, now rather than later
At $t=0$ this gives $2 - 1 = 1$, which is exactly $y(0)$. The piece that came from the initial state reproduces the initial state. If it did not, we would stop here and find the error.

Step 7 — Partial Fractions, Second Piece

Set the exponentials aside for a moment — they are delays, not algebra. Work on what they multiply:
$$G(s) = \frac{1}{s(s+1)(s+2)} = \frac{A}{s} + \frac{B}{s+1} + \frac{C}{s+2}$$
$A = \left.\dfrac{1}{(s+1)(s+2)}\right|_{s=0} = \dfrac{1}{2}$
$B = \left.\dfrac{1}{s(s+2)}\right|_{s=-1} = \dfrac{1}{(-1)(1)} = -1$
$C = \left.\dfrac{1}{s(s+1)}\right|_{s=-2} = \dfrac{1}{(-2)(-1)} = \dfrac{1}{2}$
$$g(t) = \mathcal{L}^{-1}\{G(s)\} = \frac{1}{2} - e^{-t} + \frac{1}{2}e^{-2t}$$

Step 8 — Put the Delays Back

Rule used — second shifting theorem, backwards
$$\mathcal{L}^{-1}\{e^{-as}G(s)\} = u(t-a)\,g(t-a)$$
$$\mathcal{L}^{-1}\left\{\frac{e^{-s}}{s(s+1)(s+2)}\right\} = u(t-1)\,g(t-1)$$
The mistake almost everyone makes
You must replace $t$ by $t-1$ everywhere in $g$ — inside every exponential, not just in front.
$$\text{right: } \tfrac{1}{2} - e^{-(t-1)} + \tfrac{1}{2}e^{-2(t-1)} \qquad \text{wrong: } \tfrac{1}{2} - e^{-t} + \tfrac{1}{2}e^{-2t}$$
The delay moves the whole response, not its label.

Step 9 — The Answer

$$y(t) = 2e^{-t} - e^{-2t} + u(t-1)\,g(t-1) - u(t-4)\,g(t-4)$$
where $\;g(t) = \tfrac{1}{2} - e^{-t} + \tfrac{1}{2}e^{-2t}$
$0 \le t \lt 1$
$y = 2e^{-t} - e^{-2t}$
Coasting down from $y(0)=1$. Nothing is pushing yet.
$1 \le t \lt 4$
$y = 2e^{-t} - e^{-2t} + g(t-1)$
The pulse is on; the response climbs towards $\tfrac12$.
$t \ge 4$
$y = \cdots + g(t-1) - g(t-4)$
Switched off; the system decays back to zero.

Step 10 — Check It. Always.

1 Initial conditions: at $t=0$ the step terms are off, so $y(0) = 2-1 = 1$ ✓ and $y'(0)=0$ ✓
2 Continuity: $g(0) = \tfrac12 - 1 + \tfrac12 = 0$, so nothing jumps at $t=1$ or $t=4$ ✓
3 Smoothness: $g'(0) = 0$ as well, so even the velocity is continuous. Only $y''$ jumps — by exactly 1, which is the size of the switch ✓
4 Physics: while the pulse is on, $y \to \tfrac12$. And $\tfrac12$ is exactly $1/(s^2+3s+2)$ at $s=0$ ✓
Why the second derivative is the one that jumps
The forcing sits on the same side of the equation as $y''$. A jump in $f$ must be matched by a jump in $y''$ — never in $y$ or $y'$. That single sentence catches most sign errors in this chapter.

Problem B — When $f(t)$ Is Not Given

$$y'' + 2y' + 5y = f(t), \qquad y(0) = 0, \quad y'(0) = 0$$
The honest engineering situation
You know the system — the mass, the damping, the stiffness. You do not yet know what will be done to it. Can we solve it anyway, once, for every possible input?
Yes. And the answer will tell us something Chapter 2 never could.

Step 1 — Transform, With $F(s)$ Left Alone

$$\big(s^2Y - s\underbrace{y(0)}_{0} - \underbrace{y'(0)}_{0}\big) + 2\big(sY - 0\big) + 5Y = F(s)$$
$$Y(s)\big(s^2 + 2s + 5\big) = F(s)$$
$$Y(s) = \underbrace{\frac{1}{s^2+2s+5}}_{H(s)} \cdot F(s)$$
This is the transfer function
$H(s)$ is the system with the input stripped out: output equals system times input. Every controller you ever design starts at this line.

Step 2 — What Is $H(s)$ in Time?

Rule used — completing the square, then the first shifting theorem
$$\mathcal{L}^{-1}\{F(s-a)\} = e^{at}f(t)$$
1 $s^2+2s+5 = (s+1)^2 + 4$  — the roots are complex, so we never factor it; we complete the square
2 $\dfrac{1}{(s+1)^2+4} = \dfrac{1}{2}\cdot\dfrac{2}{(s+1)^2+2^2}$  — made to match the sine entry, which needs $\omega$ on top
3 The $s+1$ means multiply by $e^{-t}$. That is the first shifting theorem, read backwards.
$$h(t) = \tfrac{1}{2}e^{-t}\sin(2t)$$
This is the impulse response: how this system answers one sharp tap. A decaying ring at frequency 2.

Step 3 — A Product in $s$ Is Not a Product in $t$

The trap
$Y(s) = H(s)F(s)$ does not mean $y(t) = h(t)f(t)$. Multiplying transforms is never multiplying functions.
Rule used — convolution theorem
$$\mathcal{L}^{-1}\{H(s)F(s)\} = \int_0^t h(\tau)f(t-\tau)\,d\tau$$
What the integral is saying
The response now is everything the input has ever done, each piece weighted by how much the system still remembers it. $h(\tau)$ is that memory, and it fades — which is exactly why $h$ decays.

Step 4 — The General Solution, For Any $f$

$$y(t) = \int_0^t \tfrac{1}{2}e^{-\tau}\sin(2\tau)\; f(t-\tau)\, d\tau$$
Read what we now own
One formula that solves this equation for every input — step, ramp, pulse, recorded earthquake data, anything. We solved the system once, not the problem once.
Note the symmetry: $\int_0^t h(\tau)f(t-\tau)d\tau = \int_0^t f(\tau)h(t-\tau)d\tau$. Use whichever is easier to integrate — and that choice is about to matter.

Step 5 — Now Choose an Input: $f(t) = e^{-t}$

$$y(t) = \int_0^t \tfrac{1}{2}e^{-\tau}\sin(2\tau)\cdot e^{-(t-\tau)}\, d\tau$$
Watch the exponentials collapse
$$e^{-\tau}\cdot e^{-(t-\tau)} = e^{-\tau - t + \tau} = e^{-t}$$
The $\tau$ cancels. And $e^{-t}$ has no $\tau$ in it, so it comes straight out of the integral.
$$y(t) = \tfrac{1}{2}e^{-t}\int_0^t \sin(2\tau)\, d\tau$$
What was a convolution is now a first-year integral.

Step 6 — Finish the Integral

$\displaystyle\int_0^t \sin(2\tau)\,d\tau = \left[-\tfrac{1}{2}\cos(2\tau)\right]_0^t = \tfrac{1}{2}\big(1 - \cos 2t\big)$
So $\;y(t) = \tfrac{1}{2}e^{-t}\cdot\tfrac{1}{2}\big(1-\cos 2t\big)$
$$y(t) = \tfrac{1}{4}e^{-t}\big(1 - \cos 2t\big)$$
$y(0) = \tfrac14(1)(1-1) = 0$ ✓
$y'(0) = 0$ ✓  (both factors start flat)
$y \to 0$ as $t\to\infty$ ✓  — the input dies, and the system is stable

Step 7 — The Same Answer, the Other Way

Convolution was not the only route. With $f(t)=e^{-t}$ we have $F(s) = \dfrac{1}{s+1}$, so:
$$Y(s) = \frac{1}{(s+1)\big((s+1)^2+4\big)}$$
Partial fractions on that, then inverting, gives $\;\tfrac14 e^{-t}(1-\cos 2t)\;$ — the same function.
So which route do you take?
If $f$ is given and simple, transform it and use partial fractions. If $f$ is general, awkward, or measured data, convolve. The convolution route also gives you the answer for every other input at the same time.

Step 8 — A Second Input, Free of Charge

Keep the same $h$, change the input to a constant push, $f(t) = 1$:
$$y(t) = \int_0^t \tfrac{1}{2}e^{-\tau}\sin(2\tau)\cdot 1\, d\tau = \tfrac{1}{5} - \tfrac{1}{5}e^{-t}\left(\cos 2t + \tfrac{1}{2}\sin 2t\right)$$
It settles at $\tfrac15$
And $H(0) = \dfrac{1}{0+0+5} = \dfrac15$. The final value is the transfer function at $s=0$ — the system's gain to a steady push.
It rings on the way
The $\cos 2t$ and $\sin 2t$ decay like $e^{-t}$: the natural ring at frequency 2, fading. That is $h$ showing through, as it always does.

Which Rule Did What

Linearity
Let us transform a sum one term at a time, both problems, line one
Transform of derivatives
Killed the calculus and carried $y(0)$, $y'(0)$ in with it
Second shifting
Turned switches into $e^{-as}$ going in, and into $u(t-a)g(t-a)$ coming back
Partial fractions
Broke $Y(s)$ into pieces the table recognises
Completing the square + first shifting
Handled complex roots without ever leaving real arithmetic
Convolution
Inverted a product when one factor was unknown
If you can name the rule at each line
you can solve any problem in this chapter. If you cannot, you are copying a pattern — and the exam will change the pattern.

What To Take Away

Switching is not special
Write the input with unit steps, transform, and every switch becomes an exponential factor. Shift the whole bracket on the way back.
Initial conditions ride along
They enter at line one through the derivative rule, and they split cleanly from the forced response in $Y(s)$.
The system is $H(s)$
Solve once with $F(s)$ left alone, and you have every input at once. $h(t)$ is the memory; convolution is how it is applied.
Check before you celebrate
Initial conditions, continuity at each switch, the final value against $H(0)$. Three checks, thirty seconds, most errors caught.
Transform. Solve. Transform back — and name the rule at every step.
🔊 Voice
1×