DIFFERENTIAL EQUATIONS • LAPLACE TRANSFORMS

ODEs with Discontinuous Inputs — Solving ODEs with Discontinuous or Impulsive Inputs

Learn how Laplace transforms elegantly handle sudden switches, jumps, and impulses in differential equations.

Historical Context & Motivation

📌 Course Prerequisites
This lesson assumes you have completed a first course in single-variable calculus (derivatives and integrals) and have some exposure to solving ordinary differential equations. Comfort with algebraic manipulation of rational expressions will also help. The topics covered here — Laplace transforms, Heaviside step functions, Dirac delta functions, and ODEs with discontinuous inputs — are standard material in an undergraduate Differential Equations or Engineering Mathematics course. If any of the prerequisite topics feel unfamiliar, a quick review of derivatives, integrals, and basic ODE solution methods will make the material easier to follow.

In the real world, forces and inputs don't always change smoothly. Imagine flipping a light switch — the voltage jumps instantly from zero to full power. Or think about a hammer striking a nail — the force is enormous for a tiny fraction of a second, then disappears. These kinds of sudden, discontinuous inputs show up everywhere in engineering, physics, and biology. Standard methods for solving ordinary differential equations (ODEs) struggle with these abrupt changes, because those techniques typically assume the input function is smooth and well-behaved.

Mathematicians and engineers developed special tools to handle these situations. The Heaviside step function models sudden on/off switches, while the Dirac delta function models instantaneous impulses. Combined with Laplace transforms, these tools convert messy, piecewise differential equations into straightforward algebra problems. The timeline below shows how these ideas came together.

1780s
Laplace's Integral Transform
Pierre-Simon Laplace developed the integral transform that bears his name. Originally used in probability theory, it would later become essential for solving differential equations with complex inputs.
1890s
Heaviside's Operational Calculus
Oliver Heaviside, a self-taught English engineer, created an operational calculus for analyzing electrical circuits. He introduced the step function to model switches being turned on or off, though mathematicians initially dismissed his methods as non-rigorous.
1930s
Dirac's Delta Function
Physicist Paul Dirac introduced the delta function in quantum mechanics to represent a perfect impulse — an infinite spike concentrated at a single point with a total area of one. This idea was controversial until Laurent Schwartz gave it rigorous footing in the 1940s.
1940s–50s
Standard Engineering Toolkit
During and after World War II, Laplace transform methods became the standard approach for control systems engineering. Textbooks unified Heaviside's step function, Dirac's delta, and Laplace transforms into the powerful framework taught today in college differential equations courses.

The central question this lesson addresses is: How do we solve a differential equation when the input suddenly switches on, switches off, or delivers an instantaneous shock? The answer lies in translating these tricky inputs into the Laplace domain, where they become simple algebraic expressions.

Core Principles & Definitions

Before diving into calculations, you need to understand four foundational ideas that make everything else in this lesson work. These concepts build on one another: the step function models switches, the delta function models impulses, Laplace transforms convert them to algebra, and the shifting theorem handles delayed inputs.

🎓 Mathematical Background Needed
The Laplace transform uses a complex variable s (which can have both real and imaginary parts), and the method relies on techniques such as partial fraction decomposition and solving second-order ODEs with initial conditions. These are standard tools from calculus and an introductory differential equations course. If any of them feel rusty, a quick review of partial fractions and second-order linear ODEs will make the worked examples much easier to follow.
1

The Heaviside Step Function u(t − a)

This function equals 0 when t < a and equals 1 when t ≥ a. It models a switch that turns on at time t = a. You can multiply any function by u(t − a) to "activate" it only after time a. Think of it like a light switch: before time a, the output is off (0); from time a onward, the output is on (1).
2

The Dirac Delta Function δ(t − a)

This represents an instantaneous impulse at t = a. It is zero everywhere except at t = a, yet its integral over all time equals 1. Think of it as the mathematical version of a hammer strike — all the energy delivered in zero time. It is not an ordinary function but a mathematical idealization called a distribution.
3

The Laplace Transform

The transform ℒ{f(t)} = F(s) converts a function of time into a function of the variable s. This is defined by the integral from 0 to ∞ of e^(−st)·f(t) dt. Derivatives of f(t) become multiplication by s in the s-domain, which turns differential equations into algebraic equations that are much easier to solve.
4

The Second Shifting Theorem

If ℒ{f(t)} = F(s), then ℒ{u(t − a) · f(t − a)} = e^(−as) · F(s). This theorem is the key to handling delayed or shifted inputs — the exponential factor e^(−as) encodes the time delay a. Reading it in reverse lets you undo the transform once you have a solution in the s-domain.
KEY TAKEAWAY
Think of the Laplace transform as a translator. Imagine you have a math problem written in a language that's hard to work with — full of sudden jumps and spikes. The Laplace transform translates it into a simpler "language" (algebra in the s-domain) where you can solve it easily. Then you translate the answer back into the original language using the inverse Laplace transform — the process of converting F(s) back to f(t), typically using a table of known transform pairs combined with partial fraction decomposition. The step function and delta function are just specific entries in this translation dictionary.

Visualizing Discontinuous & Impulsive Inputs

To truly understand these functions, you need to see what they look like. The diagram below shows the Heaviside step function u(t − 2), which stays at 0 until t = 2 and then jumps to 1, alongside the Dirac delta function δ(t − 2), which is an infinitely tall, infinitely thin spike at t = 2. Both are plotted on the same time axis so you can compare their behavior.

Left: the Heaviside step function u(t − 2) jumps from 0 to 1 at t = 2. The dashed line shows the instantaneous jump. Right: the Dirac delta function δ(t − 2) represents an infinitely tall spike at t = 2 with total area equal to 1. The arrow indicates that the spike extends to infinity.

Notice how different these two functions are. The step function represents a permanent change — once the switch flips on, it stays on. The delta function represents a momentary jolt — all the energy is concentrated at a single instant. In practice, you can build any piecewise-defined input by combining step functions. For example, a force that's on from t = 2 to t = 5 can be written as u(t − 2) − u(t − 5). This is why these building blocks are so powerful.

Mathematical Framework

Now let's formalize the mathematics. The strategy for solving ODEs with discontinuous or impulsive inputs follows a consistent three-step process: (1) take the Laplace transform of both sides, (2) solve the resulting algebraic equation for Y(s), and (3) apply the inverse Laplace transform to get y(t). The key formulas you need are listed below.

LAPLACE TRANSFORM OF THE STEP FUNCTION
ℒ{u(t − a)} = e^(−as) / s
Here u(t − a) is the unit step turning on at t = a, s is the Laplace variable, and a ≥ 0 is the delay time.
SECOND SHIFTING THEOREM
ℒ{u(t − a) · f(t − a)} = e^(−as) · F(s)
If ℒ{f(t)} = F(s), then multiplying by a shifted step function and shifting the argument of f by the same amount a introduces a factor of e^(−as) in the s-domain. This is the workhorse theorem for discontinuous inputs.
LAPLACE TRANSFORM OF THE DELTA FUNCTION
ℒ{δ(t − a)} = e^(−as)
The impulse at t = a transforms to a simple exponential. When a = 0, this becomes ℒ{δ(t)} = 1, meaning an impulse at the origin has the simplest possible Laplace transform.
LAPLACE TRANSFORM OF DERIVATIVES
ℒ{y′} = sY(s) − y(0), ℒ{y″} = s²Y(s) − sy(0) − y′(0)
These formulas convert derivatives of y into algebraic expressions involving Y(s) and the initial conditions y(0), y′(0). This is why Laplace transforms turn differential equations into algebra. Note: these formulas assume familiarity with first and second derivative notation and with initial-value problems from a calculus or differential equations course.
📋 The General Strategy
Given an ODE like y″ + 3y′ + 2y = g(t) with initial conditions, follow these steps: (1) Take ℒ of both sides, replacing derivatives with s-expressions and g(t) with G(s). (2) Solve for Y(s) algebraically. (3) Use partial fraction decomposition (if needed) and inverse Laplace transform tables to convert Y(s) back to y(t). Partial fraction decomposition — breaking a rational expression like A/[s(s²+4)] into simpler fractions — is a technique from algebra and calculus that is essential here.

Building Piecewise Functions with Step Functions

One of the most practical skills in this topic is learning to rewrite a piecewise-defined function using step functions. In standard math notation, you might define a function with cases — for example, g(t) = 0 for t < 1, g(t) = 5 for 1 ≤ t < 4, and g(t) = 0 for t ≥ 4. Using step functions, this becomes g(t) = 5[u(t − 1) − u(t − 4)]. The step u(t − 1) switches the 5 on at t = 1, and subtracting u(t − 4) switches it back off at t = 4.

The piecewise function g(t) equals 5 on the interval [1, 4) and 0 elsewhere. It decomposes into 5·u(t − 1) − 5·u(t − 4). The green annotation shows where the first step turns on, and the red annotation shows where the subtracted step turns the function back off.

This technique generalizes naturally. Any function that changes its formula at specific times can be rewritten using step functions. For instance, suppose a force ramps up linearly starting at t = 3. You'd write f(t) = (t − 3) · u(t − 3). The factor (t − 3) gives the ramp shape, and u(t − 3) ensures it only starts at t = 3. This form is exactly what the second shifting theorem is designed to handle.

Common discontinuous inputs and their Laplace transforms
Piecewise InputStep-Function FormLaplace Transform
Constant c from t = a onwardc · u(t − a)c · e^(−as) / s
Constant c from t = a to t = bc · [u(t − a) − u(t − b)](c/s) · [e^(−as) − e^(−bs)]
Ramp (t − a) starting at t = a(t − a) · u(t − a)e^(−as) / s²
Impulse at t = aδ(t − a)e^(−as)

Worked Example — ODE with a Step-Function Input

Let's solve a complete problem from start to finish. Consider a spring-mass system where a constant force of 5 is suddenly applied at t = 2. The governing equation is:

PROBLEM STATEMENT
y″ + 4y = 5·u(t − 2), y(0) = 0, y′(0) = 0
The right-hand side is a step function that turns on a force of magnitude 5 at time t = 2. The system starts at rest (both initial conditions are zero). This is a second-order ODE with constant coefficients — a type studied in a first course in differential equations.
Solving y″ + 4y = 5·u(t − 2)
1
Step 1 — Take the Laplace Transform of Both SidesApply ℒ to each term. The left side gives ℒ{y″} + 4ℒ{y} = [s²Y(s) − sy(0) − y′(0)] + 4Y(s). Since y(0) = 0 and y′(0) = 0, this simplifies to (s² + 4)Y(s). The right side gives ℒ{5·u(t − 2)} = 5e^(−2s)/s. So the transformed equation is:
(s² + 4)Y(s) = 5e^(−2s) / s
2
Step 2 — Solve for Y(s)Divide both sides by (s² + 4) to isolate Y(s):
Y(s) = 5e^(−2s) / [s(s² + 4)]
3
Step 3 — Partial Fraction DecompositionIgnore the e^(−2s) factor for now and decompose 5/[s(s² + 4)] using partial fractions — a technique for rewriting a fraction with a polynomial denominator as a sum of simpler fractions. Set 5/[s(s² + 4)] = A/s + (Bs + C)/(s² + 4). Multiplying through by s(s² + 4) gives 5 = A(s² + 4) + (Bs + C)s. Setting s = 0: 5 = 4A, so A = 5/4. Expanding and comparing coefficients of s²: 0 = A + B, so B = −5/4. Comparing coefficients of s¹: 0 = C. So:
5/[s(s² + 4)] = (5/4)·(1/s) − (5/4)·s/(s² + 4)
4
Step 4 — Apply the Inverse Laplace TransformWithout the e^(−2s) factor, the inverse transform of (5/4)·(1/s) − (5/4)·s/(s² + 4) is (5/4) − (5/4)cos(2t). This is our f(t), using the standard pairs ℒ⁻¹{1/s} = 1 and ℒ⁻¹{s/(s²+4)} = cos(2t). Now apply the second shifting theorem: the factor e^(−2s) means we replace t with (t − 2) and multiply by u(t − 2).
y(t) = (5/4)[1 − cos(2(t − 2))] · u(t − 2)
5
Step 5 — Interpret the SolutionThe solution tells us the system does nothing until t = 2 (because of the u(t − 2) factor). At t = 2, the force kicks in and the mass begins oscillating around a new equilibrium. The (5/4) represents the shift in the equilibrium position, and cos(2(t − 2)) represents the oscillation around it with angular frequency 2.
Before t = 2: y = 0. After t = 2: oscillation about y = 5/4.

Strengths & Limitations of the Laplace Transform Method

The Laplace transform approach is not the only way to solve ODEs, so it's important to understand when it shines and when other methods might be preferred. The table below compares the Laplace method with one alternative you may encounter in a differential equations course: the method of undetermined coefficients, which is used for smooth (non-discontinuous) inputs.

Comparison of ODE solution methods for different input types
FeatureLaplace TransformsUndetermined Coefficients
Discontinuous inputsHandles naturally via step/delta functionsCannot handle directly; must split into intervals
Impulsive inputs (delta)Simple: ℒ{δ(t − a)} = e^(−as)Not applicable
Initial conditionsBuilt into the transform automaticallyApplied separately after finding general solution
Smooth, polynomial/exponential inputsWorks but may be more work than neededUsually faster and more direct
Algebraic complexityPartial fraction decomposition can get tediousSystem of equations for coefficients
WHEN TO USE LAPLACE
Use the Laplace transform method whenever your input has jumps, switches, or impulses. It's like choosing the right tool for a job — you could technically cut wood with a hand saw, but if the job calls for a power saw, you reach for the right tool. Laplace transforms are the right tool for discontinuous inputs. For smooth inputs like polynomials or exponentials, simpler methods like undetermined coefficients are perfectly fine and often faster.

Connections to Transfer Functions & Advanced Theory

The techniques you've learned in this lesson are the gateway to deeper topics in engineering and applied mathematics. When you take the Laplace transform of an ODE and solve for Y(s), the ratio Y(s)/G(s) — where G(s) is the Laplace transform of the input — is called the transfer function H(s). The transfer function captures everything about how the system responds to inputs, independent of what the actual input is — it is a property of the system itself, not of any particular input. This idea is foundational in control systems engineering, signal processing, and circuit analysis, and is a major topic in upper-division engineering courses.

How this lesson connects to advanced topics
This LessonAdvanced Extension
Step function u(t − a)Step response of systems; characterizing system behavior
Delta function δ(t − a)Impulse response h(t); convolution integral y(t) = h(t) * g(t)
Solving Y(s) algebraicallyTransfer functions H(s) = Y(s)/G(s); Bode plots; stability analysis
Second shifting theoremDelay differential equations; time-delay systems in control

If this topic interests you, the natural next step is studying the convolution theorem, which states that ℒ{f * g} = F(s)·G(s). Here, f * g denotes the convolution integral — a way of combining two functions that measures how much one function overlaps with a reversed and shifted copy of the other. This powerful result means that the output of any linear system can be computed by convolving the input with the system's impulse response — the response to δ(t). You've already taken the first step toward understanding this by working with δ(t) in this lesson.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain in your own words the difference between the Heaviside step function u(t − 3) and the Dirac delta function δ(t − 3). What kind of real-world scenario would each model?
PROBLEM 2BASIC CALCULATION
Write the piecewise function g(t) = { 0 for t < 3, 7 for t ≥ 3 } using a step function, then find its Laplace transform ℒ{g(t)}.
PROBLEM 3INTERMEDIATE
Solve the initial value problem y′ + 2y = 3·δ(t − 1), with y(0) = 0. Provide y(t) in terms of step functions.
PROBLEM 4APPLIED
An electrical circuit is modeled by y″ + 5y′ + 6y = 10·[u(t − 1) − u(t − 3)], with y(0) = 0 and y′(0) = 0. Set up the Laplace-domain equation for Y(s) (you do not need to fully solve for y(t), but find Y(s) and indicate what partial fractions you would need).
PROBLEM 5CRITICAL THINKING
Consider the ODE y′ + y = δ(t − 2) + δ(t − 5), with y(0) = 0. Solve for y(t), sketch what the solution looks like, and explain physically what happens at t = 2 and t = 5. How does the principle of superposition apply here?

Lesson Summary

This lesson introduced how to solve ordinary differential equations with discontinuous or impulsive inputs using Laplace transforms — a core technique from undergraduate differential equations and engineering mathematics. We saw that the Heaviside step function u(t − a) models sudden switches that turn on at time a, while the Dirac delta function δ(t − a) models instantaneous impulses. Their Laplace transforms — e^(−as)/s and e^(−as), respectively — are elegantly simple. By combining these functions, any piecewise input can be expressed in a form suitable for the Laplace approach.

The solution process follows three steps: take the Laplace transform of both sides (converting derivatives to algebra), solve for Y(s) using algebra and partial fraction decomposition, then apply the inverse Laplace transform with the second shifting theorem to recover y(t). This method automatically incorporates initial conditions and handles jumps and spikes that would be extremely difficult to manage with other techniques. Looking ahead, these ideas lead to transfer functions and convolution — cornerstones of modern engineering analysis typically studied in upper-division college courses.

Varsity Tutors • Differential Equations • ODEs with Discontinuous Inputs