OpenStax Calculus 3

Chapter 7: Second-Order Differential Equations

7.1 Second-Order Linear Equations

Study guide for Calculus Volume 3 (Gilbert Strang, 2016 edition)

Independent study guide. Not affiliated with OpenStax or Rice University.

Big idea

First-order equations were solved one at a time, each by whatever trick its shape allowed: separate the variables, find an integrating factor. Second-order linear equations are different. They come with a structure theory that tells you in advance how many solutions there are and what shape the answer must take, before you compute a single one.

The structure comes from one observation. If the equation involves $y$, $y'$ and $y''$ each to the first power and never multiplied together, then sums and scalar multiples of solutions are again solutions. The solutions of a homogeneous equation therefore behave like vectors, and that solution space turns out to be exactly two-dimensional, so finding two genuinely different solutions finishes the problem. The two arbitrary constants are what two initial conditions consume.

With constant coefficients the search is short. Exponentials are the functions whose derivatives are multiples of themselves, so substituting $y = e^{rx}$ turns the differential equation into an ordinary quadratic in $r$. That quadratic has three possible outcomes, and the general solution has three matching forms: two real exponentials, one exponential and its multiple by $x$, or an exponential envelope wrapped around a sine and a cosine.

The third case is where oscillation enters the subject. A negative discriminant produces complex roots, and complex exponentials, once Euler’s formula unpacks them, are real trigonometric functions in disguise. The vibrations and circuits of the next section all come out of that single algebraic event.

Decoder

If two solutions of a homogeneous second-order linear equation have a Wronskian that is nonzero at some point of an interval where the equation is well behaved, then every solution on that interval is a constant times the first plus a constant times the second.

The load-bearing word is every. The easy half of the statement, that any combination $c_1 y_1 + c_2 y_2$ solves the equation, is just superposition and takes one line to check. The hard half says the list is complete: no exotic solution hides outside the family. That is why the phrase “general solution” is honest rather than hopeful, and why you may stop searching once two solutions pass the test.

The Wronskian is what “genuinely different” means in computation. Two solutions fail to be different when one is a constant multiple of the other, and then $c_1 y_1 + c_2 y_2$ collapses to a one-parameter family, too small to meet two initial conditions. The determinant $y_1 y_2' - y_1' y_2$ detects exactly that collapse.

The classic mistake is to meet a repeated root and write $y = c_1 e^{rx} + c_2 e^{rx}$. Those are not two solutions; they are one solution written twice, their Wronskian is identically zero, and the constants merge into one. The repair is the factor of $x$ below, forced by the theory rather than invented for convenience.

Definitions and results

Second-order linear equations. An equation of the form $a(x)y'' + b(x)y' + c(x)y = g(x)$ is linear because $y$ and its derivatives appear only to the first power and never as arguments of other functions. It is homogeneous when $g(x)$ is identically zero. This section treats the homogeneous case with constant coefficients, $ay'' + by' + cy = 0$ with $a \ne 0$.

The superposition principle. If $y_1$ and $y_2$ both solve a homogeneous linear equation, so does $c_1 y_1 + c_2 y_2$. The reason is that differentiation is linear: substituting the combination produces $c_1$ times what $y_1$ contributes plus $c_2$ times what $y_2$ contributes, and both are zero. Superposition fails the moment the equation is nonlinear or the right side is nonzero.

Linear independence and the Wronskian. Two functions are linearly dependent when one is a constant multiple of the other, and independent otherwise. The Wronskian is

$$ W(y_1, y_2)(x) = \begin{vmatrix} y_1 & y_2 \\ y_1' & y_2' \end{vmatrix} = y_1 y_2' - y_1' y_2 $$

For two solutions of the same homogeneous equation, $W$ is either identically zero or never zero, so one convenient test point decides the matter.

The general solution. Solutions with nonzero Wronskian form a fundamental set, and $y = c_1 y_1 + c_2 y_2$ then describes all solutions. Conditions $y(x_0) = \alpha$ and $y'(x_0) = \beta$ determine $c_1$ and $c_2$ uniquely, because the linear system for the constants has the Wronskian as its determinant.

The characteristic equation. Substituting $y = e^{rx}$ into $ay'' + by' + cy = 0$ gives $e^{rx}(ar^2 + br + c) = 0$. The exponential is never zero, so $y = e^{rx}$ solves the equation exactly when

$$ ar^2 + br + c = 0 $$

The discriminant $b^2 - 4ac$ sorts the outcome into three cases.

Distinct real roots. If $b^2 - 4ac > 0$, the roots $r_1 \ne r_2$ are real and

$$ y = c_1 e^{r_1 x} + c_2 e^{r_2 x} $$

Their Wronskian is $(r_2 - r_1)e^{(r_1+r_2)x}$, nonzero since the roots differ.

A repeated root. If $b^2 - 4ac = 0$, the only root is $r = -b/(2a)$ and the exponential supplies one solution. The second is that solution multiplied by $x$:

$$ y = c_1 e^{rx} + c_2 x e^{rx} $$

To see that $xe^{rx}$ works, note $y' = e^{rx}(1 + rx)$ and $y'' = e^{rx}(2r + r^2 x)$, so the left side becomes $e^{rx}\big[(2ar + b) + x(ar^2 + br + c)\big]$. The bracket in $x$ vanishes because $r$ is a root, and $2ar + b = 0$ because $r = -b/(2a)$. The Wronskian of the pair is $e^{2rx}$, never zero.

Complex roots. If $b^2 - 4ac < 0$, the roots are $\alpha \pm i\beta$ with $\beta \ne 0$. Euler’s formula turns the complex exponentials into real ones. Writing $e^{(\alpha + i\beta)x} = e^{\alpha x}(\cos \beta x + i \sin \beta x)$ and $e^{(\alpha - i\beta)x} = e^{\alpha x}(\cos \beta x - i \sin \beta x)$, superposition with complex constants gives

$$ \tfrac{1}{2}\left(e^{(\alpha+i\beta)x} + e^{(\alpha-i\beta)x}\right) = e^{\alpha x}\cos \beta x, \qquad \tfrac{1}{2i}\left(e^{(\alpha+i\beta)x} - e^{(\alpha-i\beta)x}\right) = e^{\alpha x}\sin \beta x $$

Both are real, both solve the equation, and their Wronskian is $\beta e^{2\alpha x}$, nonzero since $\beta \ne 0$. The general solution is

$$ y = e^{\alpha x}\left(c_1 \cos \beta x + c_2 \sin \beta x\right) $$

The real part $\alpha$ controls growth or decay; the imaginary part $\beta$ sets the frequency.

Worked examples

Two real exponentials

Solve $y'' + 3y' - 10y = 0$ with $y(0) = 3$ and $y'(0) = -1$.

The characteristic equation $r^2 + 3r - 10 = 0$ factors as $(r+5)(r-2) = 0$, so $r = -5$ and $r = 2$, and $y = c_1 e^{-5x} + c_2 e^{2x}$.

Check independence first: $W = e^{-5x}\cdot 2e^{2x} - (-5e^{-5x})\cdot e^{2x} = 7e^{-3x}$, never zero. From $y(0) = 3$, $c_1 + c_2 = 3$. Since $y' = -5c_1 e^{-5x} + 2c_2 e^{2x}$, the second condition gives $-5c_1 + 2c_2 = -1$. Substituting $c_1 = 3 - c_2$ yields $-15 + 7c_2 = -1$, so $c_2 = 2$ and $c_1 = 1$:

$$ y = e^{-5x} + 2e^{2x} $$

Verify: $y(0) = 1 + 2 = 3$, and $y'(0) = -5 + 4 = -1$. Both hold.

The repeated root

Solve $y'' - 6y' + 9y = 0$ with $y(0) = 2$ and $y'(0) = 7$.

Here $r^2 - 6r + 9 = (r-3)^2$, so $r = 3$ is a double root and $y = c_1 e^{3x} + c_2 x e^{3x}$. The first condition gives $c_1 = 2$. Differentiating,

$$ y' = 3c_1 e^{3x} + c_2\left(e^{3x} + 3xe^{3x}\right) $$

so $y'(0) = 3c_1 + c_2 = 6 + c_2 = 7$ and $c_2 = 1$. The answer is $y = 2e^{3x} + xe^{3x}$.

Notice what the naive form would have done. Writing $c_1 e^{3x} + c_2 e^{3x}$ forces $y'(0) = 3(c_1 + c_2) = 3y(0) = 6$, contradicting $y'(0) = 7$. One solution cannot meet two independent conditions.

An oscillation with decay

Solve $y'' + 4y' + 13y = 0$ with $y(0) = 1$ and $y'(0) = 4$.

The discriminant of $r^2 + 4r + 13$ is $16 - 52 = -36$, so

$$ r = \frac{-4 \pm 6i}{2} = -2 \pm 3i $$

With $\alpha = -2$ and $\beta = 3$, the general solution is $y = e^{-2x}(c_1 \cos 3x + c_2 \sin 3x)$. Immediately $c_1 = 1$. Differentiating with the product rule,

$$ y' = -2e^{-2x}(c_1 \cos 3x + c_2 \sin 3x) + e^{-2x}(-3c_1 \sin 3x + 3c_2 \cos 3x) $$

At $x = 0$ this is $-2c_1 + 3c_2 = -2 + 3c_2 = 4$, so $c_2 = 2$ and

$$ y = e^{-2x}\left(\cos 3x + 2\sin 3x\right) $$

A check on the shape: the positive coefficient of $y'$ should drain energy, and $\alpha = -2$ does make the envelope shrink while the oscillation repeats every $2\pi/3$ units.

Practice

Start with two different real roots. Form the quadratic, factor it, and assemble the general solution, sometimes with initial conditions to pin down the constants.

Practice

Generated problems for this section, graded instantly.

Next, the double root. Watch for a perfect-square quadratic, and remember the extra factor of $x$ on the second solution.

Practice

Generated problems for this section, graded instantly.

Last, the negative discriminant. Write the roots as $\alpha \pm i\beta$, read off the envelope and the frequency, and take care with the product rule when applying a condition on $y'$.

Practice

Generated problems for this section, graded instantly.

Quiz

Six items covering superposition, the Wronskian test, and all three characteristic-root cases.

Quiz

6 problems with a score at the end.