Calculus · Chapter 17 · Second-Order Differential Equations
PROGRESS
Chapter 17

Second-Order Differential Equations

Building on the first-order equations of Chapter 9, this chapter develops second-order linear differential equations — how to solve them, and how they model the vibration of springs and the behavior of electric circuits. It closes with the power-series method for equations that resist solution in closed form.

This chapter is the engineering backbone of vibration and circuit analysis. If you only master one thing here, make it the auxiliary (characteristic) equation — every spring, shock absorber, and RLC circuit you'll ever analyze reduces to reading the roots of a quadratic. Memorize the three-case table in 17.1; you'll use it constantly in machine dynamics.


Second-Order Linear Equations

A second-order linear differential equation relates a function, its first derivative, and its second derivative through coefficient functions of the independent variable. When the right-hand side is zero, the equation is homogeneous; otherwise it is nonhomogeneous.

Second-Order Linear Equation

An equation of the form \(P(x)\,y'' + Q(x)\,y' + R(x)\,y = G(x)\), where \(P,\,Q,\,R,\,G\) are continuous. It is called homogeneous when \(G(x)=0\) for all \(x\), and nonhomogeneous otherwise.

Homogeneous Linear Form
\[ P(x)\,y'' + Q(x)\,y' + R(x)\,y = 0 \]

Linear Combinations of Solutions

Superposition for Homogeneous Equations

If \(y_1\) and \(y_2\) are both solutions of the homogeneous equation, then for any constants \(c_1,\,c_2\), the combination

\[ y(x) = c_1 y_1(x) + c_2 y_2(x) \]

is also a solution. (Verified by substituting and using linearity of differentiation.)

Linear Independence

Two solutions are linearly independent when neither is a constant multiple of the other. For example, \(x^2\) and \(5x^2\) are dependent, while \(e^x\) and \(xe^x\) are independent.

General Solution Structure

If \(y_1\) and \(y_2\) are linearly independent solutions of the homogeneous equation and \(P(x)\) is never zero, then the general solution is

\[ y(x) = c_1 y_1(x) + c_2 y_2(x). \]

Knowing two independent particular solutions therefore gives every solution.

Constant-Coefficient Equations & the Auxiliary Equation

When the coefficients are constants, particular solutions can always be found. We seek a solution of the form \(y = e^{rx}\), since its derivatives are constant multiples of itself. Substituting into \(ay'' + by' + cy = 0\) and dividing by the never-zero factor \(e^{rx}\) yields an algebraic condition on \(r\).

Auxiliary (Characteristic) Equation

The algebraic equation obtained by replacing \(y''\to r^2\), \(y'\to r\), and \(y\to 1\). Its roots determine the form of the general solution.

Auxiliary Equation & Its Roots
\[ ar^2 + br + c = 0 \qquad r = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \]

Three cases follow from the sign of the discriminant \(b^2 - 4ac\).

CaseRoots of \(ar^2+br+c=0\)General Solution
I   \(b^2-4ac>0\) \(r_1,\,r_2\) real & distinct \(y = c_1 e^{r_1 x} + c_2 e^{r_2 x}\)
II   \(b^2-4ac=0\) \(r_1 = r_2 = r\) (real, repeated) \(y = c_1 e^{rx} + c_2 x e^{rx}\)
III   \(b^2-4ac<0\) complex \(\alpha \pm i\beta\) \(y = e^{\alpha x}\!\left(c_1 \cos\beta x + c_2 \sin\beta x\right)\)
KEY IDEA In Case III, write the complex roots as \(r = \alpha \pm i\beta\). Euler's formula \(e^{i\theta}=\cos\theta + i\sin\theta\) converts the complex exponentials into the real oscillating-and-decaying solution above.
EXAMPLE 1 Distinct Real Roots
PROBLEMSolve \(y'' + y' - 6y = 0\).
Solution
Write the auxiliary equation: \(r^2 + r - 6 = 0\).
Factor: \((r-2)(r+3)=0\), so \(r = 2,\ -3\).
Distinct real roots (Case I): \(\;y = c_1 e^{2x} + c_2 e^{-3x}.\)
f = e²ˣ g = e⁻³ˣ
FIG 17.1.1The two basic solutions of Example 1, \(f=e^{2x}\) (steel) and \(g=e^{-3x}\) (red); dashed curves are sample linear combinations. Redrawn schematic.
EXAMPLE 2 Quadratic Formula Roots
PROBLEMSolve \(3\dfrac{d^2y}{dx^2} + \dfrac{dy}{dx} - y = 0\).
Solution
Auxiliary equation: \(3r^2 + r - 1 = 0\) (won't factor nicely).
Quadratic formula: \(r = \dfrac{-1 \pm \sqrt{13}}{6}\).
Real, distinct roots: \(\;y = c_1 e^{(-1+\sqrt{13})x/6} + c_2 e^{(-1-\sqrt{13})x/6}.\)
EXAMPLE 3 Repeated Real Root
PROBLEMSolve \(4y'' + 12y' + 9y = 0\).
Solution
Auxiliary equation: \(4r^2 + 12r + 9 = 0\), i.e. \((2r+3)^2 = 0\).
Single repeated root: \(r = -\tfrac{3}{2}\) (Case II).
\(y = c_1 e^{-3x/2} + c_2\, x\, e^{-3x/2}.\)
EXAMPLE 4 Complex Roots
PROBLEMSolve \(y'' - 6y' + 13y = 0\).
Solution
Auxiliary equation: \(r^2 - 6r + 13 = 0\).
Quadratic formula: \(r = \dfrac{6 \pm \sqrt{36-52}}{2} = 3 \pm 2i\), so \(\alpha = 3,\ \beta = 2\).
Case III: \(\;y = e^{3x}\!\left(c_1\cos 2x + c_2 \sin 2x\right).\)

Initial-Value & Boundary-Value Problems

Initial-Value Problem (IVP)

The differential equation together with conditions \(y(x_0)=y_0\) and \(y'(x_0)=y_1\) — both specified at the same point. Under continuity (with \(P(x_0)\neq 0\)), a unique solution is guaranteed.

Boundary-Value Problem (BVP)

The equation together with conditions \(y(x_0)=y_0\) and \(y(x_1)=y_1\) specified at two different points. Unlike an IVP, a BVP need not have a solution.

EXAMPLE 5 Solving an IVP
PROBLEMSolve \(y'' + y' - 6y = 0\), with \(y(0)=1,\ y'(0)=0\).
Solution
General solution (from Example 1): \(y = c_1 e^{2x} + c_2 e^{-3x}\), so \(y' = 2c_1 e^{2x} - 3c_2 e^{-3x}\).
Apply conditions: \(c_1 + c_2 = 1\) and \(2c_1 - 3c_2 = 0\).
Solve the system: \(c_1 = \tfrac{3}{5},\ c_2 = \tfrac{2}{5}\).
\(y = \tfrac{3}{5} e^{2x} + \tfrac{2}{5} e^{-3x}.\)
EXAMPLE 6 IVP with Complex Roots
PROBLEMSolve \(y'' + y = 0\), with \(y(0)=2,\ y'(0)=3\).
Solution
Auxiliary equation \(r^2 + 1 = 0\) gives \(r = \pm i\), so \(\alpha=0,\ \beta=1\).
General solution: \(y = c_1 \cos x + c_2 \sin x\).
Conditions give \(c_1 = 2\) and \(c_2 = 3\).
\(y = 2\cos x + 3\sin x.\)
EXAMPLE 7 Solving a BVP
PROBLEMSolve \(y'' + 2y' + y = 0\), with \(y(0)=1,\ y(1)=3\).
Solution
Auxiliary equation \(r^2 + 2r + 1 = (r+1)^2 = 0\) → repeated root \(r=-1\).
General solution: \(y = c_1 e^{-x} + c_2 x e^{-x}\).
First condition \(y(0)=1\) gives \(c_1 = 1\). Second: \(e^{-1} + c_2 e^{-1} = 3\).
Solve: \(c_2 = 3e - 1\).
\(y = e^{-x} + (3e-1)\,x\,e^{-x}.\)

Watch the difference between IVPs and BVPs in design work: an IVP is "I know the position and velocity at the start" (a uniquely determined transient), while a BVP is "I know the deflection at both ends of a beam." BVPs can fail to have solutions — that's not a mistake in your algebra, it's the physics telling you the constraints are incompatible.


Nonhomogeneous Linear Equations

Now we allow a nonzero forcing term \(G(x)\) on the right. The associated homogeneous equation (set \(G=0\)) is called the complementary equation.

Complementary Equation

For \(ay'' + by' + cy = G(x)\), the related homogeneous equation \(ay'' + by' + cy = 0\). Its general solution \(y_c\) is the backbone of the full solution.

Structure of the General Solution

The general solution of the nonhomogeneous equation is

\[ y(x) = y_p(x) + y_c(x), \]

where \(y_p\) is any one particular solution and \(y_c\) is the general solution of the complementary equation.

Two methods produce a particular solution \(y_p\): undetermined coefficients (fast, but only for special forcing terms) and variation of parameters (general, but heavier).

The Method of Undetermined Coefficients

Core Idea

Guess a trial \(y_p\) of the same "type" as \(G(x)\) — a polynomial for a polynomial, \(Ae^{kx}\) for an exponential, \(A\cos kx + B\sin kx\) for sinusoids — then substitute and match coefficients.

Trial Solutions by Forcing Type
\[ \begin{aligned} G(x) &= \text{polynomial of degree } n &&\Rightarrow\quad y_p = \text{degree-}n\text{ polynomial}\\ G(x) &= e^{kx} &&\Rightarrow\quad y_p = A e^{kx}\\ G(x) &= C\cos kx \text{ or } C\sin kx &&\Rightarrow\quad y_p = A\cos kx + B\sin kx \end{aligned} \]
MODIFICATION RULE If a term of the trial \(y_p\) already solves the complementary equation, multiply the whole trial by \(x\) (or \(x^2\) if needed) so no term overlaps with \(y_c\).
EXAMPLE 1 Polynomial Forcing
PROBLEMSolve \(y'' + y' - 2y = x^2\).
Solution
Complementary: \(r^2 + r - 2 = (r-1)(r+2)=0\) → \(y_c = c_1 e^{x} + c_2 e^{-2x}\).
Trial (degree 2): \(y_p = Ax^2 + Bx + C\); then \(y_p' = 2Ax+B,\ y_p'' = 2A\).
Substitute & match: \(-2A = 1,\ -2A+ \ldots\) → \(A=-\tfrac12,\ B=-\tfrac12,\ C=-\tfrac34\).
\(y = c_1 e^{x} + c_2 e^{-2x} - \tfrac12 x^2 - \tfrac12 x - \tfrac34.\)
EXAMPLE 2 Exponential Forcing
PROBLEMSolve \(y'' + 4y = e^{3x}\).
Solution
Complementary: \(r^2 + 4 = 0\) → \(r = \pm 2i\), so \(y_c = c_1 \cos 2x + c_2 \sin 2x\).
Trial: \(y_p = Ae^{3x}\); then \(9Ae^{3x} + 4Ae^{3x} = e^{3x}\) → \(13A = 1\).
\(y = c_1\cos 2x + c_2\sin 2x + \tfrac{1}{13}e^{3x}.\)
EXAMPLE 3 Sinusoidal Forcing
PROBLEMSolve \(y'' + y' - 2y = \sin x\).
Solution
Trial: \(y_p = A\cos x + B\sin x\). Substitute and group \(\cos x,\ \sin x\) terms.
Match coefficients: \(-3A - B = 0\) and \(A - 3B = 1\).
Solve: \(A = -\tfrac{1}{10},\ B = -\tfrac{3}{10}\).
\(y = c_1 e^{x} + c_2 e^{-2x} - \tfrac{1}{10}\cos x - \tfrac{3}{10}\sin x.\)
SUPERPOSITION OF FORCING If \(G = G_1 + G_2\) and \(y_{p1},\,y_{p2}\) solve the equations with \(G_1,\,G_2\) separately, then \(y_{p1}+y_{p2}\) solves the equation with \(G\). Solve each piece, then add.
EXAMPLE 5 When the Trial Overlaps \(y_c\)
PROBLEMSolve \(y'' + y = \sin x\).
Solution
Complementary: \(r^2 + 1 = 0\) → \(y_c = c_1 \cos x + c_2 \sin x\).
The usual trial \(A\cos x + B\sin x\) already solves \(y_c\) — so multiply by \(x\): \(y_p = Ax\cos x + Bx\sin x\).
Substitute: \(y_p'' + y_p = 2B\cos x - 2A\sin x = \sin x\) → \(A = -\tfrac12,\ B = 0\).
\(y = c_1 \cos x + c_2 \sin x - \tfrac12 x\cos x.\)

The Method of Variation of Parameters

Core Idea

Replace the constants in \(y_c = c_1 y_1 + c_2 y_2\) with unknown functions \(u_1(x),\,u_2(x)\), seeking \(y_p = u_1 y_1 + u_2 y_2\). Imposing one simplifying condition reduces the work to a solvable \(2\times 2\) system.

Variation-of-Parameters System
\[ \begin{cases} u_1' y_1 + u_2' y_2 = 0\\[4pt] a\left(u_1' y_1' + u_2' y_2'\right) = G \end{cases} \qquad y_p = u_1 y_1 + u_2 y_2 \]
EXAMPLE 7 Variation of Parameters
PROBLEMSolve \(y'' + y = \tan x\), for \(0 < x < \tfrac{\pi}{2}\).
Solution
Complementary: \(y_c = c_1 \sin x + c_2 \cos x\). Set \(y_p = u_1 \sin x + u_2 \cos x\).
System gives \(u_1' = \sin x\) and \(u_2' = -\dfrac{\sin^2 x}{\cos x}\).
Integrate: \(u_1 = -\cos x\) and \(u_2 = \sin x - \ln(\sec x + \tan x)\).
Assemble: \(y_p = -\cos x \,\ln(\sec x + \tan x)\).
\(y = c_1 \sin x + c_2 \cos x - \cos x\,\ln(\sec x + \tan x).\)

Rule of thumb in practice: reach for undetermined coefficients first — it's quick and almost every standard forcing function (polynomials, exponentials, sines, cosines, and their products) fits it. Save variation of parameters for the messy right-hand sides like \(\tan x\), \(\sec x\), or \(1/(1+e^x)\) where no finite trial guess exists.


Applications of Second-Order Equations

The same constant-coefficient equation models two physically different but mathematically identical systems: vibrating springs and series electric circuits.

Vibrating Springs

Hooke's Law

A spring stretched or compressed \(x\) units from its natural length exerts a restoring force proportional to \(x\): restoring force \(= -kx\), where \(k>0\) is the spring constant.

Simple Harmonic Motion (no damping)
\[ m\frac{d^2x}{dt^2} + kx = 0 \quad\Rightarrow\quad x(t) = c_1 \cos\omega t + c_2 \sin\omega t = A\cos(\omega t + \delta) \] \[ \omega = \sqrt{k/m},\qquad A = \sqrt{c_1^2 + c_2^2}\ \text{(amplitude)},\qquad \delta = \text{phase angle} \]
m x=0 x
FIG 17.3.1Mass–spring system. Displacement \(x\) is measured from the equilibrium position (red dashed line). Original schematic.
EXAMPLE 1 Undamped Spring
PROBLEMA 2 kg mass on a spring (natural length 0.5 m) needs 25.6 N to hold it at 0.7 m. Stretched to 0.7 m and released from rest, find \(x(t)\).
Solution
Hooke's Law: \(k(0.2) = 25.6\) → \(k = 128\). With \(m=2\): \(2x'' + 128x = 0\).
\(\omega = \sqrt{128/2} = 8\), so \(x(t) = c_1\cos 8t + c_2 \sin 8t\).
Apply \(x(0)=0.2\) → \(c_1 = 0.2\); \(x'(0)=0\) → \(c_2 = 0\).
\(x(t) = \tfrac{1}{5}\cos 8t.\)

Damped Vibrations

Damping Force

A resisting force proportional to velocity and opposing motion: damping force \(= -c\,\dfrac{dx}{dt}\), where \(c>0\) is the damping constant (e.g. a shock absorber).

Damped Spring Equation
\[ m\frac{d^2x}{dt^2} + c\frac{dx}{dt} + kx = 0,\qquad mr^2 + cr + k = 0 \]
RegimeConditionBehavior
Overdamping\(c^2 - 4mk > 0\)Two negative real roots; decays to 0 with no oscillation.
Critical damping\(c^2 - 4mk = 0\)Repeated root; fastest non-oscillating return to equilibrium.
Underdamping\(c^2 - 4mk < 0\)Complex roots; oscillation inside a decaying envelope \(e^{-(c/2m)t}\).
underdamped overdamped
FIG 17.3.2Underdamped motion (red) oscillates within a decaying envelope (gold dashed); overdamped motion (steel) returns to equilibrium without oscillating. Original schematic.
EXAMPLE 2 Overdamped Spring
PROBLEMTake the spring of Example 1 in a fluid with \(c=40\). From equilibrium with initial velocity \(0.6\) m/s, find \(x(t)\).
Solution
Equation: \(2x'' + 40x' + 128x = 0\), i.e. \(x'' + 20x' + 64x = 0\).
Auxiliary: \((r+4)(r+16)=0\) → \(r=-4,\,-16\) (overdamped).
\(x = c_1 e^{-4t} + c_2 e^{-16t}\); conditions \(x(0)=0,\ x'(0)=0.6\) give \(c_1 = 0.05,\ c_2 = -0.05\).
\(x(t) = 0.05\left(e^{-4t} - e^{-16t}\right).\)

Forced Vibrations

Forced (Nonhomogeneous) Spring Equation
\[ m\frac{d^2x}{dt^2} + c\frac{dx}{dt} + kx = F(t) \]
RESONANCE With a periodic force \(F(t) = F_0 \cos\omega_0 t\) and no damping, if the driving frequency \(\omega_0\) equals the natural frequency \(\omega = \sqrt{k/m}\), the amplitude grows without bound — the phenomenon of resonance.

Electric Circuits

Series RLC Circuit

A circuit with electromotive force \(E(t)\), resistor \(R\), inductor \(L\), and capacitor \(C\) in series. With charge \(Q(t)\) and current \(I = dQ/dt\), Kirchhoff's voltage law balances the three voltage drops against \(E(t)\).

E R L C
FIG 17.3.3Series RLC circuit: EMF source \(E\), resistor \(R\), inductor \(L\), and capacitor \(C\). Original schematic.
Charge Equation (Kirchhoff's Voltage Law)
\[ L\frac{d^2Q}{dt^2} + R\frac{dQ}{dt} + \frac{1}{C}\,Q = E(t) \]
Current Equation (differentiate w.r.t. \(t\))
\[ L\frac{d^2I}{dt^2} + R\frac{dI}{dt} + \frac{1}{C}\,I = E'(t) \]
EXAMPLE 3 Charge in an RLC Circuit
PROBLEMFind \(Q(t)\) when \(L=1\), \(R=40\), \(C=\tfrac{1}{16000}\) (so \(1/C\) gives the term below), \(E(t)=100\cos 10t\), with zero initial charge and current.
Solution
Equation: \(Q'' + 40Q' + 625Q = 100\cos 10t\).
Complementary: \(r^2 + 40r + 625 = 0\) → \(r = -20 \pm 15i\), so \(Q_c = e^{-20t}(c_1\cos 15t + c_2\sin 15t)\).
Trial \(Q_p = A\cos 10t + B\sin 10t\); matching gives \(A = \tfrac{84}{697},\ B = \tfrac{64}{697}\).
Apply zero initial conditions to fix \(c_1,\,c_2\).
\(Q(t) = \tfrac{4}{697}e^{-20t}\!\left(-63\cos 15t - 116\sin 15t\right) + \tfrac{4}{697}\!\left(21\cos 10t + 16\sin 10t\right).\)
STEADY STATE The complementary part \(Q_c\) decays to 0 (it's the transient); the surviving particular part \(Q_p\) is the steady-state solution. After enough time, \(Q(t) \approx Q_p(t)\).

The Spring–Circuit Analogy

Spring SystemElectric Circuit
\(x\) — displacement\(Q\) — charge
\(dx/dt\) — velocity\(I = dQ/dt\) — current
\(m\) — mass\(L\) — inductance
\(c\) — damping constant\(R\) — resistance
\(k\) — spring constant\(1/C\) — elastance
\(F(t)\) — external force\(E(t)\) — electromotive force

This analogy is genuinely useful, not just a curiosity. If you understand how a shock absorber tunes damping in a suspension, you already understand how resistance shapes an RLC circuit's response — and vice versa. Electrical resonance and mechanical resonance are the same mathematics. The Tacoma Narrows bridge and a poorly tuned radio filter fail for the same reason.


Series Solutions

Many equations — even simple-looking ones like \(y'' - 2xy' + y = 0\) — have no solution in terms of familiar functions. The power-series method assumes a solution as an infinite series, substitutes, and solves for the coefficients via a recursion relation.

Power-Series Method

Assume \(y = \sum_{n=0}^{\infty} c_n x^n\), differentiate term by term, substitute into the equation, and equate coefficients of each power of \(x\) to zero. This yields a recursion that determines later coefficients from earlier ones.

Assumed Solution & Its Derivatives
\[ y = \sum_{n=0}^{\infty} c_n x^n,\quad y' = \sum_{n=1}^{\infty} n c_n x^{n-1},\quad y'' = \sum_{n=0}^{\infty}(n+2)(n+1)c_{n+2}\,x^n \]

Recursion Relation

An equation expressing \(c_{n+2}\) in terms of \(c_n\). With the two free constants \(c_0\) and \(c_1\) (set by initial conditions), it generates all remaining coefficients.

EXAMPLE 1 Recovering Sine & Cosine
PROBLEMUse power series to solve \(y'' + y = 0\).
Solution
Substitute the series; equating coefficients of \(x^n\) gives the recursion \(c_{n+2} = -\dfrac{c_n}{(n+1)(n+2)}\).
Even coefficients build from \(c_0\): \(c_{2n} = \dfrac{(-1)^n}{(2n)!}c_0\). Odd from \(c_1\): \(c_{2n+1} = \dfrac{(-1)^n}{(2n+1)!}c_1\).
Collect: \(y = c_0\displaystyle\sum_{n=0}^\infty \frac{(-1)^n x^{2n}}{(2n)!} + c_1\displaystyle\sum_{n=0}^\infty \frac{(-1)^n x^{2n+1}}{(2n+1)!}\).
These are the Maclaurin series for cosine and sine: \(\;y = c_0 \cos x + c_1 \sin x.\)
EXAMPLE 2 A Non-Elementary Solution
PROBLEMSolve \(y'' - 2xy' + y = 0\) by power series.
Solution
Substituting and matching coefficients gives the recursion \(c_{n+2} = \dfrac{2n - 1}{(n+1)(n+2)}\,c_n\).
Generate even coefficients from \(c_0\) and odd from \(c_1\) successively.
The two independent series \(y_1(x)\) and \(y_2(x)\) do not reduce to elementary functions.
\(y = c_0\, y_1(x) + c_1\, y_2(x)\), each defined by its own power series.
WHY IT MATTERS Power series let us define and graph entirely new functions (e.g. Bessel functions) that arise in physics — quantum mechanics, heat flow, vibrating membranes — but cannot be written with elementary functions. Truncating the series gives Taylor-polynomial approximations.

Don't be intimidated when the series "doesn't simplify." That's normal and expected — most equations from real physics produce non-elementary solutions. The series is the answer. In engineering you'll usually truncate it to a few terms for a numerical approximation, or recognize it as a named special function (Bessel, Legendre, Airy) and look up its properties in a handbook.

END OF CHAPTER 17 · Exercises and review problems omitted per platform policy.