Solving ODE via Laplace Transforms

April 13, 2026

Problem

Solve y'' + 4y = delta(t - 2) with y(0) = 0 and y'(0) = 0. Show the impulse response and the delayed-sine waveform that emerges from the Dirac delta forcing.

Explanation

Why Laplace is perfect for this

The forcing term is a Dirac delta δ(t2)\delta(t - 2) — an idealised instantaneous impulse at t=2t = 2. Classical time-domain methods (undetermined coefficients, variation of parameters) don't handle δ\delta gracefully. Laplace, on the other hand, converts both sides of the ODE — including the delta — into pure algebra, solves, and inverts.

The Laplace transform of a shifted delta is clean: L{δ(ta)}=eas(a0).\mathcal{L}\{\delta(t - a)\} = e^{-a s} \qquad (a \ge 0).

That single identity is all we need to tame the impulsive right-hand side.

The given IVP

y+4y=δ(t2),y(0)=0,  y(0)=0.y'' + 4 y = \delta(t - 2), \qquad y(0) = 0, \; y'(0) = 0.

Step-by-step solution

Step 1 — Apply the Laplace transform to both sides.

Using the derivative formula L{y}=s2Ysy(0)y(0)\mathcal{L}\{y''\} = s^{2} Y - s y(0) - y'(0), and L{y}=Y(s)\mathcal{L}\{y\} = Y(s): s2Ys00+4Y=e2s.s^{2} Y - s \cdot 0 - 0 + 4 Y = e^{-2 s}.

Step 2 — Solve for Y(s)Y(s). (s2+4)Y=e2s(s^{2} + 4) Y = e^{-2 s} Y(s)=e2ss2+4.Y(s) = \frac{e^{-2 s}}{s^{2} + 4}.

Step 3 — Inverse transform.

We need to invert Y(s)=e2s1s2+4.Y(s) = e^{-2 s} \cdot \frac{1}{s^{2} + 4}.

Two tools:

3a. L1 ⁣{1s2+4}=12sin(2t)\mathcal{L}^{-1}\!\left\{ \dfrac{1}{s^{2} + 4} \right\} = \dfrac{1}{2} \sin(2 t) (from the table: L{sinbt}=b/(s2+b2)\mathcal{L}\{\sin b t\} = b/(s^{2} + b^{2}), so 1/(s2+4)=122/(s2+4)12sin2t1/(s^{2} + 4) = \frac{1}{2} \cdot 2/(s^{2} + 4) \leftrightarrow \frac{1}{2} \sin 2t).

3b. Second shifting theorem. Multiplying by ease^{-a s} in the ss-domain corresponds to time-shifting by aa and turning on at t=at = a: L1{easF(s)}(t)=u(ta)f(ta),\mathcal{L}^{-1}\{e^{-a s} F(s)\}(t) = u(t - a) \, f(t - a), where uu is the Heaviside step function (see #192) and f=L1{F}f = \mathcal{L}^{-1}\{F\}.

With a=2a = 2, f(t)=12sin(2t)f(t) = \dfrac{1}{2} \sin(2 t): y(t)=u(t2)12sin ⁣(2(t2))\boxed{\, y(t) = u(t - 2) \cdot \tfrac{1}{2} \sin\!\bigl(2 (t - 2)\bigr) \,}

Equivalently: y(t)=0y(t) = 0 for t<2t < 2 and y(t)=12sin(2(t2))y(t) = \tfrac{1}{2} \sin(2(t - 2)) for t2t \ge 2.

Interpretation — the impulse response

Before the impulse fires at t=2t = 2, the system was at rest (y=y=0y = y' = 0) and no forcing, so it just sat there — consistent with y(t)0y(t) \equiv 0 for t<2t < 2.

At t=2t = 2, the impulse delivers a unit "kick." Integrating the ODE across the singular point: 22+ydt+422+ydt=22+δ(t2)dt\int_{2^{-}}^{2^{+}} y'' \, dt + 4 \int_{2^{-}}^{2^{+}} y \, dt = \int_{2^{-}}^{2^{+}} \delta(t - 2) \, dt [y]22++0=1    y(2+)y(2)=1.[y']_{2^{-}}^{2^{+}} + 0 = 1 \implies y'(2^{+}) - y'(2^{-}) = 1.

So the impulse jumps the velocity by 11: before the kick, y=0y' = 0; just after, y=1y' = 1. Meanwhile yy itself is continuous at t=2t = 2: still 00.

After t=2t = 2, the system is governed by the homogeneous ODE y+4y=0y'' + 4 y = 0 with initial conditions y(2)=0y(2) = 0, y(2)=1y'(2) = 1: y(t)=C1cos2(t2)+C2sin2(t2),y(2)=C1=0,  y(2)=2C2=1    C2=12.y(t) = C_1 \cos 2(t - 2) + C_2 \sin 2(t - 2), \quad y(2) = C_1 = 0, \; y'(2) = 2 C_2 = 1 \implies C_2 = \tfrac{1}{2}.

So y(t)=12sin2(t2)y(t) = \tfrac{1}{2} \sin 2(t - 2) for t2t \ge 2 — matching the Laplace answer exactly.

The idea of "impulse response"

The solution we computed is called the impulse response of the linear system y+4y=f(t)y'' + 4 y = f(t), shifted in time by 22. The name comes from the fact that it's the system's reaction to a unit impulse.

The impulse response carries complete information about the system: for any forcing g(t)g(t), the response with zero initial conditions is the convolution of gg with the impulse response (see #193). So once you know how the system rings to a single kick, you know how it rings to every possible input — that's a profound consequence of linearity.

For y+4yy'' + 4 y, the unit impulse response at t=0t = 0 is h(t)=12sin(2t)u(t)h(t) = \tfrac{1}{2} \sin(2 t) \, u(t). Our solution with delta at t=2t = 2 is simply h(t2)h(t - 2).

Verification

Check the jump:

  • For t<2t < 2: y=0y = 0, so y+4y=0y'' + 4 y = 0, matching the ODE (which has δ(t2)=0\delta(t - 2) = 0 there).
  • For t>2t > 2: y=12sin2(t2)y = \tfrac{1}{2} \sin 2(t - 2), y=2sin2(t2)=4yy'' = -2 \sin 2(t - 2) = -4 y, so y+4y=0y'' + 4 y = 0. ✓
  • At t=2t = 2: yy continuous (equals 00), yy' jumps by 11. Integrating the ODE across t=2t = 2 gives the required δ=1\int \delta = 1. ✓

Why Laplace "just knows" initial conditions

Because L{y}=sYy(0)\mathcal{L}\{y'\} = s Y - y(0), the initial values appear in the transformed equation as algebraic terms. You never separately apply them at the end — they're baked in from the start. This is one of the biggest practical advantages of Laplace over undetermined coefficients for IVPs.

The Laplace recipe for IVPs

  1. Laplace-transform both sides of the ODE.
  2. Substitute initial conditions into the derivative formulas.
  3. Solve algebraically for Y(s)Y(s).
  4. Partial fractions / completing the square to decompose Y(s)Y(s).
  5. Inverse-transform term by term to get y(t)y(t).

Common mistakes

  • Forgetting the initial-condition terms in L{y}\mathcal{L}\{y'\} and L{y}\mathcal{L}\{y''\}. They are sy(0)s y(0) and s2y(0)+sy(0)s^{2} y(0) + s y'(0)-style terms — easy to drop.
  • Using the first shifting theorem for ease^{-a s}. First shifting is for F(sa)F(s - a); second shifting is for easF(s)e^{-a s} F(s). Different theorems.
  • Forgetting u(ta)u(t - a). The solution vanishes before the shift time; omitting the step function makes it look like the system reacted before the impulse arrived.
  • Treating δ(t)\delta(t) as a function, not as a distribution. Its integral gives 11, but at every point t0t \ne 0 it is 00. This is the property that forces the velocity jump.

Try it in the visualization

Place the impulse at different times and watch the system ring afterward. Add multiple impulses and see the responses superimpose (linearity). Change the ODE coefficients to see the impulse response shape change — oscillation frequency, decay rate.

Interactive Visualization

Parameters

2.00
2.00
0.00
1.00
8.00
0.00
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Solving ODE via Laplace Transforms | MathSpin