MATH-201 · Lesson 2 of 5 · 36 min

Second-order linear equations

Newton's second law involves acceleration, a second derivative, so the equations of mechanics are second order. So are the equations for electrical circuits with inductance, the deflection of beams, and the vibration of structures. Fortunately, the most important of these are linear with constant coefficients, and for that class there is a complete and elegant method: guess an exponential, solve a quadratic, and read off the behaviour.

This chapter develops that method for homogeneous equations (three cases, depending on the roots), shows how to fit initial conditions, then handles forcing terms with the method of undetermined coefficients, including the special case that leads to resonance. It finishes with a boundary value problem that every civil and mechanical engineer uses: the deflection of a uniformly loaded beam.

The standard form and superposition

A second-order linear equation with constant coefficients has the form

\[a\,y'' + b\,y' + c\,y = f(t)\]

If \(f(t) = 0\) the equation is homogeneous; otherwise \(f\) is the forcing term. Linearity gives the key property, the principle of superposition: if \(y_1\) and \(y_2\) solve the homogeneous equation, so does any combination \(C_1y_1 + C_2y_2\). A second-order equation needs two independent solutions, and its general solution has two constants, fixed by two conditions such as the initial position and velocity.

For the nonhomogeneous equation, the general solution is the sum of the homogeneous solution and any one particular solution:

\[y = y_h + y_p\]

Physically, \(y_h\) is the system's natural (free) response, which depends on how it started and usually dies away; \(y_p\) is the response forced by the input.

Homogeneous equations: the characteristic equation

Try \(y = e^{rt}\). Then \(y' = re^{rt}\) and \(y'' = r^2e^{rt}\), and substituting into \(ay'' + by' + cy = 0\) gives \(e^{rt}(ar^2 + br + c) = 0\). Since \(e^{rt}\) is never zero, r must satisfy the characteristic equation

\[a r^2 + b r + c = 0, \qquad r = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\]

The discriminant \(b^2 - 4ac\) decides the form of the solution.

Three graphs of solutions starting at y = 1 with zero slope. Distinct real roots: a smooth decay without crossing zero. Repeated root: a slightly faster smooth decay. Complex roots: an oscillation inside a decaying exponential envelope.
The three cases of the characteristic equation, each started from y(0) = 1, y′(0) = 0.

Case 1: two distinct real roots

If \(b^2 > 4ac\), there are two real roots \(r_1 \ne r_2\), and

\[y_h = C_1e^{r_1t} + C_2e^{r_2t}\]

Worked problem

Distinct roots with initial conditions

Solve \(y'' - 5y' + 6y = 0\) with \(y(0) = 1\), \(y'(0) = 0\).

Show solution
  1. Characteristic equation: \(r^2 - 5r + 6 = (r - 2)(r - 3) = 0\), so \(r = 2, 3\).
  2. \(y = C_1e^{2t} + C_2e^{3t}\), \(y' = 2C_1e^{2t} + 3C_2e^{3t}\).
  3. Conditions: \(C_1 + C_2 = 1\) and \(2C_1 + 3C_2 = 0\), giving \(C_1 = 3\), \(C_2 = -2\).

Answer: y = 3e^{2t} − 2e^{3t}. Both roots are positive, so this solution grows without bound: an unstable system. Physical systems with friction or resistance have roots with negative real parts

Case 2: a repeated root

If \(b^2 = 4ac\), the single root is \(r = -b/(2a)\), and the second independent solution is \(te^{rt}\):

\[y_h = (C_1 + C_2t)\,e^{rt}\]

Worked problem

A repeated root

Find the general solution of \(y'' + 4y' + 4y = 0\).

Show solution
  1. \(r^2 + 4r + 4 = (r + 2)^2 = 0\), so \(r = -2\) (repeated).

Answer: y = (C₁ + C₂t)e^{−2t}. In Lesson 3 this will be the critically damped case: the fastest return to rest without overshoot

Case 3: complex roots

If \(b^2 < 4ac\), the roots are complex: \(r = \alpha \pm i\beta\), with \(\alpha = -b/(2a)\) and \(\beta = \sqrt{4ac - b^2}/(2a)\). Using Euler's formula \(e^{i\beta t} = \cos\beta t + i\sin\beta t\), the real solutions are

\[y_h = e^{\alpha t}\left(C_1\cos\beta t + C_2\sin\beta t\right)\]

This is an oscillation at angular frequency \(\beta\) inside an envelope \(e^{\alpha t}\) that decays when \(\alpha < 0\). It is the mathematics of every vibrating structure and every tuned circuit.

Worked problem

A decaying oscillation

Solve \(y'' + 2y' + 5y = 0\) with \(y(0) = 1\), \(y'(0) = 0\).

Show solution
  1. \(r^2 + 2r + 5 = 0\) gives \(r = -1 \pm 2i\): \(\alpha = -1\), \(\beta = 2\).
  2. \(y = e^{-t}(C_1\cos 2t + C_2\sin 2t)\). \(y(0) = C_1 = 1\).
  3. \(y'(0) = -C_1 + 2C_2 = 0\), so \(C_2 = 0.5\).

Answer: y = e^{−t}(cos 2t + 0.5 sin 2t). It oscillates with period 2π/2 = π ≈ 3.14 s while the amplitude shrinks by a factor e each second. A numerical solution confirms y(2) = −0.1397

Nonhomogeneous equations: undetermined coefficients

When the forcing \(f(t)\) is a polynomial, an exponential, a sine or cosine, or a product of these, the particular solution has the same form with unknown coefficients. Substitute and match terms.

  • Constant or polynomial of degree n: try a polynomial of degree n.
  • \(e^{kt}\): try \(Ae^{kt}\).
  • \(\sin\omega t\) or \(\cos\omega t\): try \(A\cos\omega t + B\sin\omega t\) (both terms, even if only one appears in f).

Worked problem

Simple forcing terms

Find particular solutions of (a) \(y'' + 3y' + 2y = 4\); (b) \(y'' + y = 3e^{2t}\); (c) \(y'' + 4y = 8t\).

Show solution
  1. (a) Try \(y_p = A\): \(2A = 4\), \(A = 2\).
  2. (b) Try \(Ae^{2t}\): \(4A + A = 3\), \(A = 3/5\).
  3. (c) Try \(At + B\): \(0 + 4(At + B) = 8t\), so \(A = 2\), \(B = 0\).

Answer: (a) y_p = 2; (b) y_p = (3/5)e^{2t}; (c) y_p = 2t

Worked problem

Sinusoidal forcing

Find the general solution of \(y'' + 2y' + 5y = 10\sin t\).

Show solution
  1. Homogeneous part from before: \(y_h = e^{-t}(C_1\cos 2t + C_2\sin 2t)\).
  2. Try \(y_p = A\cos t + B\sin t\). Then \(y_p' = -A\sin t + B\cos t\) and \(y_p'' = -A\cos t - B\sin t\).
  3. Substitute and collect: cos t terms: \(-A + 2B + 5A = 4A + 2B\); sin t terms: \(-B - 2A + 5B = 4B - 2A\).
  4. Match: \(4A + 2B = 0\) and \(4B - 2A = 10\). So \(B = -2A\) and \(-8A - 2A = 10\): \(A = -1\), \(B = 2\).

Answer: y = e^{−t}(C₁ cos 2t + C₂ sin 2t) − cos t + 2 sin t. The first part dies away (the transient); the second is the steady-state response, oscillating at the forcing frequency with amplitude √5 ≈ 2.24

That split, transient plus steady state, is how engineers think about any forced linear system. After a few time constants, only the forced response matters, which is why the steady-state amplitude is the quantity checked against limits in vibration and AC circuit design.

The modification rule and resonance

If the trial form already solves the homogeneous equation, it cannot be a particular solution: substituting gives zero. Multiply the trial by t (by \(t^2\) if needed).

Worked problem

Forcing at the natural frequency

Find a particular solution of \(y'' + 4y = \sin 2t\).

Show solution
  1. The homogeneous solutions are \(\cos 2t\) and \(\sin 2t\), the same frequency as the forcing. So try \(y_p = t(A\cos 2t + B\sin 2t)\).
  2. Substituting and matching gives \(A = -\tfrac{1}{4}\), \(B = 0\).

Answer: y_p = −(t/4) cos 2t. The amplitude grows linearly with time without limit: resonance. With no damping, forcing a system at its natural frequency pumps in energy every cycle

Graph of minus t over 4 times cos 2t for t from 0 to 30, an oscillation whose amplitude grows steadily between the straight-line envelopes plus and minus t over 4.
Undamped resonance: the response grows linearly inside the envelope ±t/4.

Real structures always have some damping, which limits the growth, but lightly damped systems can still reach dangerous amplitudes at resonance. Lesson 3 quantifies this.

Variation of parameters

When the forcing is not of the simple forms above (for example \(\tan t\) or \(1/t\)), a more general method, variation of parameters, builds \(y_p\) from the homogeneous solutions using integrals. In practice, engineers handle arbitrary forcing with Laplace transforms (Lesson 4) or numerical solution, so we note the method and move on.

A boundary value problem: beam deflection

Not every second-order problem starts from initial conditions. For a beam, the conditions are at the two ends: a boundary value problem. For small deflections, the beam's deflection \(v(x)\) (positive upward) satisfies

\[EI\,\frac{d^2v}{dx^2} = M(x)\]

where M is the bending moment (positive when sagging), E the modulus of elasticity and I the second moment of area (MATH-209, Lesson 3). For a simply supported beam with a uniform load w over a span L, statics (ENGG-130) gives \(M(x) = \tfrac{w}{2}(Lx - x^2)\).

A simply supported beam of span L with a uniform load w, deflecting downward into a smooth curve with maximum deflection at midspan, labelled 5 w L to the fourth over 384 E I.
A uniformly loaded, simply supported beam. The deflected shape comes from integrating EI v″ = M(x) twice.

Worked problem

Midspan deflection of a floor beam

Integrate \(EIv'' = \tfrac{w}{2}(Lx - x^2)\) with \(v(0) = v(L) = 0\) to find the midspan deflection. Then evaluate it for the 100 × 300 mm timber beam (E = 11 GPa) spanning 6 m with w = 4 kN/m, and compare with a limit of span/360.

Show solution
  1. Integrate twice: \(EIv = \tfrac{w}{2}\left(\tfrac{Lx^3}{6} - \tfrac{x^4}{12}\right) + C_1x + C_2\).
  2. \(v(0) = 0\) gives \(C_2 = 0\). \(v(L) = 0\) gives \(\tfrac{w}{2}\left(\tfrac{L^4}{6} - \tfrac{L^4}{12}\right) + C_1L = 0\), so \(C_1 = -\tfrac{wL^3}{24}\).
  3. At \(x = L/2\): \(EIv = \tfrac{w}{2}\left(\tfrac{L^4}{48} - \tfrac{L^4}{192}\right) - \tfrac{wL^4}{48} = -\tfrac{5wL^4}{384}\).
  4. Numbers: \(I = 0.1 \times 0.3^3/12 = 2.25 \times 10^{-4}\) m⁴, \(EI = 2.475 \times 10^6\) N·m².
  5. \[\delta = \frac{5wL^4}{384EI} = \frac{5(4000)(6^4)}{384(2.475 \times 10^6)} = 0.0273 \text{ m}\]

Answer: δ = 5wL⁴/(384EI) = 27.3 mm, against a limit of 6000/360 = 16.7 mm. The beam is strong enough (ENCM-100 showed the stress) but too flexible: a floor built this way would feel bouncy. A deeper section is needed, and because I grows as h³, a modest increase in depth fixes it

This formula, \(5wL^4/384EI\), is among the most used in structural engineering. Notice what the differential equation reveals: deflection grows with the fourth power of span. Doubling the span of a floor makes it sixteen times more flexible, which is why long spans need deep beams.

Common mistakes

  • MistakeWriting y = C₁e^{rt} + C₂e^{rt} for a repeated root.

    InsteadThose are the same function; the second solution is te^{rt}.

  • MistakeLeaving complex exponentials in the final answer for a real problem.

    InsteadConvert to e^{αt}(C₁ cos βt + C₂ sin βt).

  • MistakeApplying initial conditions to y_p alone or y_h alone.

    InsteadFind the full solution y = y_h + y_p first, then apply the conditions.

  • MistakeTrying only A sin ωt when the forcing is sin ωt.

    InsteadWith a y′ term, the response has both cos and sin; include both.

  • MistakeUsing a trial form that already solves the homogeneous equation.

    InsteadMultiply by t (the modification rule); this is the resonance case.

  • MistakeTreating a beam problem as an initial value problem.

    InsteadBeam conditions are at both ends; use them to find both constants.

Summary and key terms

  • ay″ + by′ + cy = f(t): homogeneous if f = 0; general solution y = y_h + y_p with two constants.
  • Characteristic equation ar² + br + c = 0: distinct real roots give C₁e^{r₁t} + C₂e^{r₂t}; a repeated root gives (C₁ + C₂t)e^{rt}; complex roots α ± iβ give e^{αt}(C₁ cos βt + C₂ sin βt).
  • Roots with negative real parts give decaying (stable) responses.
  • Undetermined coefficients: guess the form of f with unknown constants; for sines use both cos and sin.
  • If the guess solves the homogeneous equation, multiply by t; undamped forcing at the natural frequency gives resonance.
  • The response splits into a transient that dies away and a steady state at the forcing frequency.
  • Beam deflection EIv″ = M(x) is a boundary value problem; a uniformly loaded simple span deflects 5wL⁴/(384EI).
Homogeneous equation
A linear ODE with zero forcing term.
Superposition
Combinations of solutions of a linear homogeneous equation are also solutions.
Characteristic equation
The polynomial obtained by substituting y = e^{rt}.
Particular solution
Any one solution of the nonhomogeneous equation.
Undetermined coefficients
Finding y_p by guessing its form with unknown constants.
Transient response
The part of the response that decays with time.
Steady-state response
The part of the response that persists, at the forcing frequency.
Resonance
Large response when forcing matches a natural frequency.
Boundary value problem
An ODE with conditions given at two different points.
Flexural rigidity
EI, the product governing a beam's resistance to bending.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Solve y″ + y′ − 6y = 0.

    Show answer

    r² + r − 6 = (r + 3)(r − 2): y = C₁e^{2t} + C₂e^{−3t}.

  2. Solve y″ − 6y′ + 9y = 0 with y(0) = 2, y′(0) = 5.

    Show answer

    r = 3 repeated: y = (C₁ + C₂t)e^{3t}. C₁ = 2; y′(0) = 3C₁ + C₂ = 5 → C₂ = −1. y = (2 − t)e^{3t}.

  3. Solve y″ + 9y = 0 with y(0) = 0, y′(0) = 6.

    Show answer

    y = C₁ cos 3t + C₂ sin 3t. C₁ = 0, 3C₂ = 6: y = 2 sin 3t.

  4. Find the general solution of y″ + 6y′ + 13y = 0.

    Show answer

    r = −3 ± 2i: y = e^{−3t}(C₁ cos 2t + C₂ sin 2t).

  5. Find a particular solution of y″ − y′ − 2y = 4t.

    Show answer

    Try At + B: −A − 2At − 2B = 4t → A = −2, B = 1. y_p = −2t + 1.

  6. Find a particular solution of y″ + y′ = e^{−t}.

    Show answer

    The roots are 0 and −1, so e^{−t} already solves the homogeneous equation. Try Ate^{−t}: substituting gives −Ae^{−t} = e^{−t}, so y_p = −te^{−t}.

  7. Find the steady-state solution of y″ + 4y′ + 3y = 10 cos t.

    Show answer

    Try A cos t + B sin t: (2A + 4B) cos t + (2B − 4A) sin t = 10 cos t → B = 2A, 10A = 10: A = 1, B = 2. y_ss = cos t + 2 sin t.

  8. Write 3 cos 2t + 4 sin 2t as A cos(2t − φ).

    Show answer

    A = 5, φ = tan⁻¹(4/3) = 53.1° (0.927 rad).

  9. A cantilever of length L with an end load P has EIv″ = −P(L − x), with v(0) = v′(0) = 0. Find the tip deflection.

    Show answer

    EIv′ = −P(Lx − x²/2); EIv = −P(Lx²/2 − x³/6). At x = L: v = −PL³/(3EI).

  10. By what factor does a simply supported beam's midspan deflection change if the span increases from 4 m to 5 m (same section and load per metre)?

    Show answer

    (5/4)⁴ = 2.44 times larger.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz