TOPIC

Solving differential equations with step functions

MY PROGRESS

Pug Score

0%

Study Points

+0

Overview

Watch

Read

Next Steps


Get Started

Get unlimited access to all videos, practice problems, and study tools.

Unlimited practice
Full videos

Back to Menu

Topic Progress

Pug Score

0%

Videos Watched

0/0

Read

Not viewed


Study Points

+0

Read

Solving Differential Equations with Step Functions

This lesson shows how to solve differential equations whose forcing term switches on at a given time, modeled with the unit step (Heaviside) function. You will apply the Laplace transform, the second shifting theorem, and partial fractions to find a piecewise solution, then check it against the original equation.

Why Step Functions Show Up in Differential Equations

Many real systems are switched on partway through their behavior: a circuit is closed at a certain time, a force is applied only after a delay, or a signal turns off after a fixed duration. To model this kind of "on/off" behavior inside a differential equation, we use the unit step function (also called the Heaviside function), written \(u_c(t)\). It equals \(0\) for \(t < c\) and \(1\) for \(t \ge c\). If you have not yet seen how this function is defined and manipulated, it helps to review the step function formula before working through the examples below.

c 1 t y 0
Graph of the unit step function \(u_c(t)\): it stays at 0, then jumps to 1 at \(t = c\).

The Laplace Transform of a Step Function

The Laplace transform turns a step function into a simple algebraic term. For a step turned on at \(t = c\),

\( \mathcal{L}\{u_c(t)\} = \dfrac{e^{-cs}}{s} \), for \(s > 0\).

More generally, if a function \(f(t)\) is shifted so it starts at \(t = c\) and is multiplied by the step function, the second shifting theorem states

\( \mathcal{L}\{u_c(t) f(t-c)\} = e^{-cs} F(s) \), where \(F(s) = \mathcal{L}\{f(t)\}\).

This single rule is what lets you take the Laplace transform of a piecewise "delayed" forcing term without splitting the integral by hand. If you need a refresher on computing transforms in general, see calculating Laplace transforms first.

Method for Solving a Differential Equation with a Step Function

The overall strategy is the same one used for any linear differential equation solved with transforms, only now the forcing term includes \(u_c(t)\):

  1. Take the Laplace transform of both sides of the equation, using the initial conditions and the step function rule above.
  2. Solve the resulting algebraic equation for \(Y(s)\).
  3. Break \(Y(s)\) into partial fractions so each piece matches an entry in an inverse transform table.
  4. Apply the inverse Laplace transform, using the second shifting theorem in reverse to reintroduce the step function.
  5. Write the final solution \(y(t)\) as a piecewise function.

This is the same framework covered in solving differential equations with the Laplace transform; the only new ingredient here is the step function in the forcing term.

Worked Example

Solve \( y'' + 4y = u_3(t) \), with \( y(0) = 0 \) and \( y'(0) = 0 \).

Step 1: Transform both sides.

\( \mathcal{L}\{y''\} = s^2 Y(s) - s\,y(0) - y'(0) = s^2 Y(s) \), and \( \mathcal{L}\{u_3(t)\} = \dfrac{e^{-3s}}{s} \).

So the transformed equation is \( s^2 Y(s) + 4Y(s) = \dfrac{e^{-3s}}{s} \).

Step 2: Solve for \(Y(s)\).

\( Y(s) = \dfrac{e^{-3s}}{s(s^2+4)} \).

Step 3: Partial fractions on the non-shifted part.

\( \dfrac{1}{s(s^2+4)} = \dfrac{1}{4}\cdot\dfrac{1}{s} - \dfrac{1}{4}\cdot\dfrac{s}{s^2+4} \).

Taking the inverse transform of this piece alone (ignoring the exponential for a moment) gives

\( f(t) = \dfrac{1}{4}\left(1 - \cos(2t)\right) \).

Step 4: Reapply the shift.

Since \(Y(s) = e^{-3s} F(s)\) with \(F(s) = \dfrac{1}{s(s^2+4)}\), the second shifting theorem gives

\( y(t) = u_3(t)\, f(t-3) = u_3(t) \cdot \dfrac{1}{4}\left(1 - \cos\big(2(t-3)\big)\right) \).

Step 5: Write it piecewise.

\( y(t) = 0 \) for \( t < 3 \), and \( y(t) = \dfrac{1}{4}\left(1 - \cos(2(t-3))\right) \) for \( t \ge 3 \).

The solution stays at rest until \(t = 3\), then oscillates about \(y = \tfrac{1}{4}\), exactly matching what happens when a constant force is switched on at that instant. If any step in the inverse transform lookup felt unfamiliar, the inverse laplace table lists the standard forms used here.

3 t y 0 y(t)
Graph of the piecewise solution: \(y(t) = 0\) before \(t = 3\), then oscillates once the step function switches on.

Why This Approach Works

Splitting the equation at \(t = c\) and solving each piece separately with matching conditions would work too, but it gets complicated quickly for higher-order equations or multiple switches. The Laplace transform handles the discontinuity automatically through the exponential factor \(e^{-cs}\), so you only need one pass through the algebra to get a solution valid for all \(t\). This is one of the main reasons the transform method, introduced in the Introduction to the laplace transform, is preferred whenever a differential equation involves switching, delayed, or pulse-like forcing terms rather than smooth ones.

Related lessons