Flow Lab

Syllabus / Module 5: Second-Order Linear ODEs & Oscillations

Lesson 5.7

Higher-Order Linear Equations

nth-order linear ODEs, characteristic polynomials of higher degree, and the bridge to first-order systems.

Written byClaude Sonnet

🌊
Why this matters for simulation: Wing bending is governed by the 4th-order Euler–Bernoulli beam equation.

By the end of this lesson you can…

  • Write an nth-order constant-coefficient equation as p(D)y = 0, form its characteristic polynomial, and explain why the solution space has dimension exactly n.
  • Build the general real solution from the roots, including multiplicity m (the terms t^k e^{rt}, k = 0 to m - 1) and conjugate pairs, and derive the multiplicity rule from the shift identity.
  • State the Wronskian of n functions, derive Abel's formula W' = -(a_{n-1}/a_n) W for n = 3, and connect it to the trace of the companion matrix.
  • Convert an nth-order equation to the first-order system x' = Cx, and show that the eigenvalues of the companion matrix C are exactly the roots of the characteristic polynomial.
  • Decide stability from the signs of the real parts of the roots, and explain why high-degree and repeated roots are ill-conditioned numerically.
  • Integrate the cantilever beam equation EI y'''' = q four times and check the tip deflection numerically.
On this page
·
  1. The equation and its polynomial
  2. Why exactly n solutions
  3. Distinct real roots
  4. Repeated roots: the shift identity
  5. Complex roots and conjugate multiplicity
  6. The Wronskian of n functions, and Abel’s formula
  7. The companion matrix: from one equation to a system
  8. Stability from the roots
  9. Numerical honesty: roots of high-degree polynomials
  10. The beam equation: a fourth-order preview
  11. Where the method stops
  12. Problems
  13. Key Takeaways

The pitch and heave of a simulated aircraft, the bending of a wing spar and the vibration of a multi-storey building do not fit into a second-order equation. A linearized airplane has four longitudinal state variables, and eliminating all but one leaves a fourth-order equation, a4y′′′′+a3y′′′+a2y′′+a1y′+a0y=0a_4y'''' + a_3y''' + a_2y'' + a_1y' + a_0y = 0 (from memory: the two oscillations it contains are the slow, lightly damped phugoid and the fast, well-damped short-period mode). The good news from 5.2 Constant Coefficients & the Characteristic Equation carries over unchanged: try erte^{rt}, and calculus becomes algebra. What changes is that a degree-4 polynomial can have repeated roots and two conjugate pairs, and finding its roots is no longer a formula. This lesson sets up the nnth-order theory, ties it to first-order systems through the companion matrix, and ends with a numerical warning about high-degree root finding.

▶ Video The characteristic polynomial of degree n, multiplicity and t^k e^{rt}, quartic roots in the complex plane, the companion matrix, and the ill-conditioning of repeated rootscaptions only
Transcript
  1. A linearized aircraft has four longitudinal states; eliminating all but one leaves a fourth-order equation. From memory, it hides a slow phugoid and a fast short-period oscillation. With constant coefficients, try e to the r t, and calculus becomes algebra.
  2. Write D for d by d t, so the equation is p of D applied to y equals zero. Since D to the k sends e to the r t to r to the k times itself, p of D gives p of r times e to the r t. A solution exactly when p of r is zero.
  3. Why exactly n? Send each solution to its initial data. The map is linear. It is one-to-one, since zero data gives the zero function, by uniqueness, and onto, since every data vector has a solution, by existence. A linear bijection preserves dimension: n.
  4. Example one: the polynomial factors as r minus 2, r plus 1, r plus 3. The initial data give a Vandermonde system with determinant minus 30, and c is 1, 3, minus 2. The root 2 grows; the other modes die.
  5. Abel's formula. Differentiate the Wronskian one row at a time: only the last row survives, and the equation turns it into minus 2 times the row y double prime. So W prime is minus 2 W. At t equals 0, one half and 1 the ratio is exactly 1.
  6. D minus r acting on u times e to the r t just differentiates u. Applied m times, it gives the m-th derivative. For m equals 3, t to the k e to the r t is killed for k from 0 to 2, and k equals 3 leaves 6 e to the r t.
  7. Example three: r squared plus 2r plus 5, squared, expands to r to the fourth plus 4r cubed plus 14r squared plus 20r plus 25, with roots minus 1 plus or minus 2 i, each twice. Applying p of D to these three functions gives zero; with t squared it does not.
  8. Make it a first-order system. An eigenvector must be one, lambda, lambda squared, lambda cubed, and the last row then says p of lambda is zero. But C minus lambda I has rank 3 of 4: one eigenvector for a double root. The missing direction is the factor t.
  9. Stability is the signs of the real parts. Positive coefficients are not enough: r cubed plus r squared plus r plus 2 has a pair at 0.1766 plus or minus 1.2028 i. In the k family, 5 keeps all roots left, 9 puts a pair on the axis, 10 has crossed. Routh-Hurwitz, from memory, tests this.
  10. Wilkinson's polynomial has roots 1 through 20. At 20 the derivative is 19 factorial, so the sensitivity is about 4.31 times 10 to the 7; a change of 2 to the minus 23 predicts a shift near 5. In floating point, 10 of 20 roots go complex.
  11. A repeated root is worse. Move the constant term of x minus 1 to the fourth by 10 to the minus 12, and the roots move by 0.001: nine orders of magnitude more. Even exact coefficients scatter them by about 0.0002. For multiplicity m, the error is about epsilon to the 1 over m.
  12. From memory, a beam obeys E I y four prime equals q. Clamp one end, free the other, integrate four times: the tip deflection is q L to the fourth over 8 E I, which is 3.3333. A boundary-value solver agrees, and gives 1.1806 at midspan.
  13. To recap: dimension n; multiplicity gives t to the k e to the r t; the companion matrix has the roots as eigenvalues; stability reads the real parts; repeated roots are ill-conditioned. Next: series solutions.

The equation and its polynomial

Write D=d/dtD = d/dt for the derivative operator. Then Dky=y(k)D^k y = y^{(k)} and the equation

any(n)+an−1y(n−1)+⋯+a1y′+a0y=0,an≠0,a_ny^{(n)} + a_{n-1}y^{(n-1)} +\cdots + a_1y' + a_0y = 0, \qquad a_n \neq 0,

reads p(D) y=0p(D)\,y = 0 with the characteristic polynomial p(r)=anrn+⋯+a1r+a0p(r) = a_nr^n + \cdots + a_1r + a_0. The coefficients are constants, which is what makes DD and its powers commute and lets us treat p(D)p(D) like ordinary algebra. The key computation is the same as before: Dkert=rkertD^k e^{rt} = r^ke^{rt}, so by linearity

p(D) ert=p(r) ert.p(D)\,e^{rt} = p(r)\,e^{rt}.

The function erte^{rt} solves the equation exactly when p(r)=0p(r) = 0. If pp has nn distinct roots we get nn solutions at once; the rest of the lesson is about whether that count is right, and what to do when roots coincide.

Why exactly n solutions

5.1 Second-Order Linear Equations: Structure showed that for n=2n = 2 the solutions form a 2-dimensional space. The argument extends word for word. Set x=(y,y′,…,y(n−1))x = (y, y', \ldots, y^{(n-1)}). Then x′=Cxx' = Cx, where the last component of CxCx is y(n)=−∑k<n(ak/an) y(k)y^{(n)} = -\sum_{k<n}(a_k/a_n)\,y^{(k)} and the other components just shift (the matrix CC is written out below). The right-hand side is linear in xx, so it is continuous and Lipschitz everywhere with constant ∥C∥\lVert C\rVert, and the existence-and-uniqueness theorem for first-order systems (the vector version of 3.7 Existence & Uniqueness, used here without re-proof) gives, for every initial vector, exactly one solution, defined for all tt.

Now look at the map Φ\Phi that sends a solution yy to its initial data (y(0),y′(0),…,y(n−1)(0))(y(0), y'(0), \ldots, y^{(n-1)}(0)) in Rn\mathbb{R}^n. It is linear. It is injective because the solution with zero data is the zero function (uniqueness). It is surjective because every vector of data has a solution (existence). A linear bijection preserves dimension, so the solution space has dimension exactly nn. Any nn independent solutions form a basis, and they are independent exactly when their initial-data vectors are, i.e. when the determinant of the matrix with columns (yi(0),…,yi(n−1)(0))(y_i(0), \ldots, y_i^{(n-1)}(0)) is nonzero. That determinant is the Wronskian at t=0t = 0, taken up below.

Distinct real roots

If pp has nn distinct real roots r1,…,rnr_1, \ldots, r_n, then y=c1er1t+⋯+cnernty = c_1e^{r_1t} + \cdots + c_ne^{r_nt}. The initial-data matrix is Vjk=rk jV_{jk} = r_k^{\,j} (row jj is the jjth derivative at 00), a Vandermonde matrix, whose determinant is ∏i<j(rj−ri)\prod_{i<j}(r_j - r_i) (from memory). It is nonzero exactly when the roots are distinct, which settles independence in this case.

Example 1. Solve y′′′+2y′′−5y′−6y=0y''' + 2y'' - 5y' - 6y = 0 with y(0)=2y(0) = 2, y′(0)=5y'(0) = 5, y′′(0)=−11y''(0) = -11. The polynomial r3+2r2−5r−6r^3 + 2r^2 - 5r - 6 equals (r−2)(r+1)(r+3)(r - 2)(r + 1)(r + 3), so y=c1e2t+c2e−t+c3e−3ty = c_1e^{2t} + c_2e^{-t} + c_3e^{-3t}. The data give the system

(1112−1−3419)(c1c2c3)=(25−11).\begin{pmatrix} 1&1&1\\2&-1&-3\\4&1&9 \end{pmatrix} \begin{pmatrix} c_1\\c_2\\c_3 \end{pmatrix} = \begin{pmatrix} 2\\5\\-11 \end{pmatrix}.

Its determinant is (−1−2)(−3−2)(−3+1)=−30(-1 - 2)(-3 - 2)(-3 + 1) = -30, and solving gives c=(1,3,−2)c = (1, 3, -2), so y=e2t+3e−t−2e−3ty = e^{2t} + 3e^{-t} - 2e^{-3t} (check: y′(0)=2−3+6=5y'(0) = 2 - 3 + 6 = 5 and y′′(0)=4+3−18=−11y''(0) = 4 + 3 - 18 = -11). The root 22 makes this solution grow while the other two modes die.

Repeated roots: the shift identity

Suppose rr is a root of multiplicity mm, meaning p(r)=(r−r0)mq(r)p(r) = (r - r_0)^m q(r) with q(r0)≠0q(r_0) \neq 0 (call the root r0r_0 for the moment). Then p(D)=q(D) (D−r0)mp(D) = q(D)\,(D - r_0)^m, and the factors commute, so any yy with (D−r0)my=0(D - r_0)^m y = 0 solves the equation. How do we find all such yy? Compute how D−r0D - r_0 acts on a function written as u er0tu\,e^{r_0t}:

(D−r0)[u er0t]=u′er0t+r0u er0t−r0u er0t=u′ er0t.(D - r_0)\bigl[u\,e^{r_0t}\bigr] = u'e^{r_0t} + r_0u\,e^{r_0t} - r_0u\,e^{r_0t} = u'\,e^{r_0t}.

This shift identity says that D−r0D - r_0 acting on u er0tu\,e^{r_0t} simply differentiates uu and leaves the exponential alone. Applying it mm times,

(D−r0)m[u er0t]=u(m) er0t.(D - r_0)^m\bigl[u\,e^{r_0t}\bigr] = u^{(m)}\,e^{r_0t}.

Now the multiplicity rule is immediate: u(m)=0u^{(m)} = 0 exactly when uu is a polynomial of degree less than mm. So er0t, ter0t, …, tm−1er0te^{r_0t},\, te^{r_0t},\, \ldots,\, t^{m-1}e^{r_0t} all solve the equation, and tmer0tt^me^{r_0t} does not, since Dmtm=m!D^m t^m = m!. (The lab cell below checks this with sympy for m=3m = 3, and prints 6ert6e^{rt} for k=3k = 3.) One root of multiplicity mm contributes mm solutions, and multiplicities add up to nn, so the count is complete.

Independence across different roots: suppose ∑jpj(t)erjt=0\sum_j p_j(t)e^{r_jt} = 0 with deg⁡pj<mj\deg p_j \lt m_j. Applying (D−r1)m1(D - r_1)^{m_1} kills the first group and maps each other group to (pj′+(rj−r1)pj)erjt(p_j' + (r_j - r_1)p_j)e^{r_jt}, a polynomial of the same degree, nonzero whenever pjp_j is, since rj≠r1r_j \neq r_1. Repeating removes the groups one by one until a single term p ertp\,e^{rt} is left, which vanishes only if p=0p = 0. So every pjp_j is zero.

Example 2. Solve y′′′−5y′′+3y′+9y=0y''' - 5y'' + 3y' + 9y = 0. Here r3−5r2+3r+9=(r−3)2(r+1)r^3 - 5r^2 + 3r + 9 = (r - 3)^2(r + 1), so y=(c1+c2t)e3t+c3e−ty = (c_1 + c_2t)e^{3t} + c_3e^{-t}. To see that te3tte^{3t} really works, differentiate: y′=(1+3t)e3ty' = (1 + 3t)e^{3t}, y′′=(6+9t)e3ty'' = (6 + 9t)e^{3t}, y′′′=(27+27t)e3ty''' = (27 + 27t)e^{3t}, and the combination is

(27+27t)−5(6+9t)+3(1+3t)+9t=(27−30+3)+(27−45+9+9)t=0.(27 + 27t) - 5(6 + 9t) + 3(1 + 3t) + 9t = (27 - 30 + 3) + (27 - 45 + 9 + 9)t = 0.

Complex roots and conjugate multiplicity

Real coefficients make complex roots come in conjugate pairs with equal multiplicity. The reason: p(rˉ)=p(r)‾p(\bar r) = \overline{p(r)}, and the same holds for every derivative, p(j)(rˉ)=p(j)(r)‾p^{(j)}(\bar r) = \overline{p^{(j)}(r)}. A root of multiplicity mm is a number where p,p′,…,p(m−1)p, p', \ldots, p^{(m-1)} vanish and p(m)p^{(m)} does not, and conjugation preserves that pattern. The shift-identity derivation never assumed r0r_0 is real, so tke(α+iβ)tt^ke^{(\alpha + i\beta)t} solves the equation for k<mk < m. The operator p(D)p(D) has real coefficients, so the real and imaginary parts of a complex solution are separately solutions:

tkeαtcos⁡βt,tkeαtsin⁡βt,k=0,…,m−1.t^ke^{\alpha t}\cos\beta t, \qquad t^ke^{\alpha t}\sin\beta t, \qquad k = 0, \ldots, m - 1.

A pair of multiplicity mm accounts for 2m2m roots and gives 2m2m real functions: nn in total.

Example 3. For y′′′′+4y′′′+14y′′+20y′+25y=0y'''' + 4y''' + 14y'' + 20y' + 25y = 0 the polynomial is (r2+2r+5)2(r^2 + 2r + 5)^2 (expanding (r2+2r+5)2(r^2 + 2r + 5)^2 gives r4+4r3+14r2+20r+25r^4 + 4r^3 + 14r^2 + 20r + 25), with roots −1±2i-1 \pm 2i, each twice. The general real solution is

y=e−t[(c1+c2t)cos⁡2t+(c3+c4t)sin⁡2t].y = e^{-t}\bigl[(c_1 + c_2t)\cos 2t + (c_3 + c_4t)\sin 2t\bigr].

The envelope is ∣c+c′t∣e−t|c + c't|e^{-t}, so it can grow briefly before decay wins. With repeated pure imaginary roots the same factor tt makes the amplitude grow without bound, which is resonance (5.6 Forced Oscillations & Resonance).

◆ Interactive Place the four roots of a quartic in the complex plane; read the solution, the polynomial coefficients and the companion-matrix eigenvalues

Loading simulation…

In the lab, the double pair preset reads out the polynomial r4+4r3+14r2+20r+25r^4 + 4r^3 + 14r^2 + 20r + 25 and a basis containing t e−tcos⁡2tt\,e^{-t}\cos 2t, as in Example 3. Drag one root of the pair away from the other and the tt factors disappear with the multiplicity. The crosses are eigenvalues of the companion matrix, found by a QR iteration in the sim with no polynomial root finder; they sit on the dots to about 10−1410^{-14} for distinct roots, but only to about 8×10−88 \times 10^{-8} for the double pair, 2×10−52 \times 10^{-5} for the triple root and 2×10−42 \times 10^{-4} for the quadruple root. That degradation is explained in the numerics section.

The Wronskian of n functions, and Abel’s formula

For nn functions y1,…,yny_1, \ldots, y_n the Wronskian is the determinant of the n×nn \times n matrix whose rows are the functions and their first n−1n - 1 derivatives:

W(t)=det⁡(y1y2⋯yny1′y2′⋯yn′⋮⋮y1(n−1)y2(n−1)⋯yn(n−1)).W(t) = \det\begin{pmatrix} y_1&y_2&\cdots &y_n\\y_1'&y_2'&\cdots &y_n'\\\vdots&&&\vdots\\y_1^{(n-1)}&y_2^{(n-1)}&\cdots &y_n^{(n-1)} \end{pmatrix}.

For solutions of our equation, W(0)≠0W(0) \neq 0 means the initial-data vectors are independent, hence the solutions are a basis, and the next computation shows WW is then never zero.

Abel’s formula says W′=−(an−1/an) WW' = -(a_{n-1}/a_n)\,W, hence W(t)=W(0) e−(an−1/an)tW(t) = W(0)\,e^{-(a_{n-1}/a_n)t}. The derivation for n=3n = 3 carries over to any nn. Differentiating a determinant differentiates one row at a time and adds the results. For the rows y,y′,y′′y, y', y'', differentiating row 1 or row 2 produces a repeated row and a zero determinant. Only the term where the last row y′′y'' becomes y′′′y''' survives. Each column satisfies y′′′=−(a2/a3)y′′−(a1/a3)y′−(a0/a3)yy''' = -(a_2/a_3)y'' - (a_1/a_3)y' - (a_0/a_3)y, so in that last row we can subtract (a1/a3)(a_1/a_3) times row 2 and (a0/a3)(a_0/a_3) times row 1 (adding multiples of other rows does not change a determinant) and are left with −(a2/a3)-(a_2/a_3) times the row y′′y''. Therefore W′=−(a2/a3)WW' = -(a_2/a_3)W.

The coefficient has a second meaning. The matrix in WW is a fundamental matrix of x′=Cxx' = Cx (its columns are solutions) and −(an−1/an)-(a_{n-1}/a_n) is the trace of CC, so Abel’s formula is det⁡etC=et tr C\det e^{tC} = e^{t\,\mathrm{tr}\,C} (Liouville, from memory). It also matches the roots, whose sum is −an−1/an-a_{n-1}/a_n. For Example 1, W(0)=−30W(0) = -30 and the roots sum to −2-2 (also a2/a3=2a_2/a_3 = 2), so W(t)=−30e−2tW(t) = -30e^{-2t}; block E of the lab cell evaluates the determinant at t=0,0.5,1t = 0, 0.5, 1 and the ratio to −30e−2t-30e^{-2t} is 11 each time.

The companion matrix: from one equation to a system

With x=(y,y′,…,y(n−1))x = (y, y', \ldots, y^{(n-1)}) and ck=ak/anc_k = a_k/a_n, the equation becomes x′=Cxx' = Cx with

C=(010⋯0001⋯0⋮⋱⋮000⋯1−c0−c1−c2⋯−cn−1).C = \begin{pmatrix} 0&1&0&\cdots &0\\0&0&1&\cdots &0\\\vdots&&&\ddots&\vdots\\0&0&0&\cdots &1\\-c_0&-c_1&-c_2&\cdots &-c_{n-1} \end{pmatrix}.

This is how every ODE solver handles a higher-order equation: 4.3 Runge–Kutta Methods & Butcher Tableaux methods and RK45 only know first-order systems, so you hand them CC (or the nonlinear analogue).

Its eigenvalues are exactly the roots. Here is the concrete reason, without any determinant. An eigenvector vv with Cv=λvCv = \lambda v satisfies, row by row for the first n−1n - 1 rows, vj+1=λvjv_{j+1} = \lambda v_j. So v=v1(1,λ,λ2,…,λn−1)v = v_1(1, \lambda, \lambda^2, \ldots, \lambda^{n-1}), and the last row demands −∑k<nckλk=λ⋅λn−1-\sum_{k<n}c_k\lambda^k = \lambda\cdot\lambda^{n-1}, which rearranges to λn+cn−1λn−1+⋯+c0=0\lambda^n + c_{n-1}\lambda^{n-1} + \cdots + c_0 = 0, i.e. p(λ)=0p(\lambda) = 0. Conversely every root λ\lambda gives such an eigenvector.

The determinant agrees. For n=3n = 3,

det⁡(λI−C)=det⁡(λ−100λ−1c0c1λ+c2)=λ(λ(λ+c2)+c1)+c0=λ3+c2λ2+c1λ+c0.\det(\lambda I - C) = \det\begin{pmatrix} \lambda&-1&0\\0&\lambda&-1\\c_0&c_1&\lambda + c_2 \end{pmatrix} = \lambda\bigl(\lambda(\lambda + c_2) + c_1\bigr) + c_0 = \lambda^3 + c_2\lambda^2 + c_1\lambda + c_0 .

In general, expand along the first column, whose only entries are λ\lambda (top) and c0c_0 (bottom). The minor under λ\lambda has the same shape with coefficients c1,…,cn−1c_1, \ldots, c_{n-1}; the minor under c0c_0 is triangular with diagonal −1-1, so with its sign it contributes +c0+c_0. By induction det⁡(λI−C)=λ (λn−1+cn−1λn−2+⋯+c1)+c0=p(λ)/an\det(\lambda I - C) = \lambda\,(\lambda^{n-1} + c_{n-1}\lambda^{n-2} + \cdots + c_1) + c_0 = p(\lambda)/a_n.

The eigenvector formula also shows why repeated roots are special: for each λ\lambda the eigenvector is forced onto the single line through (1,λ,λ2,…)(1, \lambda, \lambda^2, \ldots), however often λ\lambda is a root. A root of multiplicity mm has one eigenvector, so CC is not diagonalizable (1.6 Change of Basis & Diagonalization needs a full set). For Example 3’s matrix and λ=−1+2i\lambda = -1 + 2i, the rank of C−λIC - \lambda I is 33 of 44 (block F below): one eigenvector, not two. The missing directions are generalized eigenvectors, and in eCte^{Ct} they appear as the factors tkt^k, the system-language reason for t ertt\,e^{rt} (see 1.8 The Matrix Exponential: From Hops to Flows).

🧪 Coding exerciseExercise: companion matrix, roots by eigenvalues, and the solution checked against RK45
⌘/Ctrl + Enter

Stability from the roots

Every basis function has the form tkeαtcos⁡βtt^ke^{\alpha t}\cos\beta t or tkeαtsin⁡βtt^ke^{\alpha t}\sin\beta t (possibly β=0\beta = 0). A power of tt never beats an exponential, so such a term tends to 00 if α<0\alpha \lt 0 and is unbounded if α>0\alpha \gt 0. Since every initial vector corresponds to a solution (the bijection above), we get the criterion:

  • All roots have Re⁡r<0\operatorname{Re} r \lt 0 if and only if every solution decays to 00 (and then decays exponentially).
  • Some root has Re⁡r>0\operatorname{Re} r \gt 0: the initial data of that basis function give a solution that grows without bound.
  • Roots on the imaginary axis give bounded solutions only if each is simple; multiplicity 22 or more brings back a factor tt (the lab’s “double undamped pair” lists tcos⁡2tt\cos 2t).

Checking signs of real parts without computing roots is the job of the Routh-Hurwitz criterion, a set of inequalities on the coefficients; I use only its name and one consequence I can prove. If all roots have negative real part, pp factors over the reals into (r+σ)(r + \sigma) with σ>0\sigma \gt 0 and (r2+2αr+α2+β2)(r^2 + 2\alpha r + \alpha^2 + \beta^2) with α>0\alpha \gt 0, and a product of polynomials with positive coefficients has positive coefficients. So stable implies all coefficients have the same sign. The converse fails already at degree 33: r3+r2+r+2r^3 + r^2 + r + 2 has all coefficients positive but roots −1.3532-1.3532 and 0.1766±1.2028i0.1766 \pm 1.2028i, with a positive real part. (For a monic cubic with positive coefficients the exact condition is a2a1>a0a_2a_1 \gt a_0, from memory; here 1<21 \lt 2.)

Numerical honesty: roots of high-degree polynomials

Computing roots is delicate. If the coefficient aka_k changes by δ\delta, a simple root rjr_j moves, to first order, by δ rjk/∣p′(rj)∣\delta\,r_j^k/|p'(r_j)| (differentiate p(rj)=0p(r_j) = 0 with respect to aka_k).

Wilkinson’s example takes p(x)=∏k=120(x−k)p(x) = \prod_{k=1}^{20}(x - k). At the root 2020 the derivative is 19!=12164510040883200019! = 121645100408832000, but the numerator for the x19x^{19} coefficient is 201920^{19}, so the first-order sensitivity is 2019/19!≈4.31×10720^{19}/19! \approx 4.31 \times 10^7: a change of 2−23≈1.19×10−72^{-23} \approx 1.19 \times 10^{-7} in the x19x^{19} coefficient (−210-210) predicts a shift of about 55. That is too big for a linearization, so we ask the computer. The lab cell below uses np.roots, which takes eigenvalues of the companion matrix, with exact integer coefficients converted to double precision. Unperturbed, the largest distance from a root to the nearest integer is 0.03890.0389 (coefficients up to 20!≈2.4×101820! \approx 2.4 \times 10^{18} do not fit in 53 bits). After subtracting 2−232^{-23} from the x19x^{19} coefficient, 1010 of the 2020 roots become complex, with imaginary parts up to 2.81262.8126. The roots 11 through 55 stay at the integers to six decimals (r19r^{19} is small against ∣p′(r)∣|p'(r)| there); the large ones scatter.

Repeated roots split. Take (x−1)4(x - 1)^4 and change the constant term by 10−1210^{-12}, so that (x−1)4=10−12(x - 1)^4 = 10^{-12} and x=1+(10−12)1/4 ikx = 1 + (10^{-12})^{1/4}\,i^k. The four roots are 1±0.0011 \pm 0.001 and 1±0.001 i1 \pm 0.001\,i: a perturbation of 10−1210^{-12} moves the roots by 10−310^{-3}, nine orders of magnitude larger. The cell reports 0.00100020.0010002 from np.roots (exactly 0.0010.001 in exact arithmetic; the last digits are rounding). The unperturbed polynomial gives 0.000204810.00020481, because rounding alone acts like a perturbation of machine epsilon, 2.22×10−162.22 \times 10^{-16}, and ε1/4=1.22×10−4\varepsilon^{1/4} = 1.22 \times 10^{-4}. The same mechanism explains the lab’s eigenvalue errors: for multiplicity mm the error is of order ε1/m\varepsilon^{1/m}, namely 1.5×10−81.5 \times 10^{-8}, 6.1×10−66.1 \times 10^{-6} and 1.2×10−41.2 \times 10^{-4} for m=2,3,4m = 2, 3, 4, within a factor of about five of the 8×10−88 \times 10^{-8}, 2×10−52 \times 10^{-5}, 2×10−42 \times 10^{-4} the sim shows.

🐍 PythonLab: Wilkinson, root splitting, cantilever, shift identity, Abel, defectiveness, stability (blocks A to G)
⌘/Ctrl + Enter

The beam equation: a fourth-order preview

A slender beam with bending stiffness EIEI (Young’s modulus times the second moment of area) carrying a distributed load qq per unit length obeys the Euler-Bernoulli equation EI y′′′′=qEI\,y'''' = q, with y(x)y(x) the deflection at position xx along the beam (from memory; it assumes small deflections and ignores shear deformation). Physically EI y′′EI\,y'' is the bending moment and EI y′′′EI\,y''' the shear force. The homogeneous polynomial is r4r^4, the root 00 with multiplicity 44, so the homogeneous solutions are 1,x,x2,x31, x, x^2, x^3: what four integrations produce. A constant load is e0xe^{0x} times a constant, which resonates with the root 00 four times over, so undetermined coefficients (5.4 Nonhomogeneous Equations: Undetermined Coefficients) multiplies the guess by x4x^4: Ax4Ax^4 gives 24A=q/EI24A = q/EI, so yp=qx4/(24EI)y_p = qx^4/(24EI).

A beam is held at both ends, so the four conditions are split between them. Take a cantilever of length LL: clamped at x=0x = 0 (y=y′=0y = y' = 0) and free at x=Lx = L (no moment, no shear: y′′=y′′′=0y'' = y''' = 0). Integrate from the free end:

y′′′=qEI(x−L),y′′=q2EI(x−L)2,y′=q6EI[(x−L)3+L3],y''' = \frac{q}{EI}(x - L), \qquad y'' = \frac{q}{2EI}(x - L)^2, \qquad y' = \frac{q}{6EI}\bigl[(x - L)^3 + L^3\bigr],

where the constant in y′y' makes y′(0)=0y'(0) = 0. One more integration, with y(0)=0y(0) = 0, gives

y(x)=qEI[(x−L)424+L3x6−L424],y(L)=qEI[L46−L424]=qL48EI.y(x) = \frac{q}{EI}\left[\frac{(x - L)^4}{24} + \frac{L^3x}{6} - \frac{L^4}{24}\right], \qquad y(L) = \frac{q}{EI}\left[\frac{L^4}{6} - \frac{L^4}{24}\right] = \frac{qL^4}{8EI}.

For q=5q = 5, EI=3EI = 3, L=2L = 2 this is 5⋅16/(8⋅3)=3.33335 \cdot 16/(8 \cdot 3) = 3.3333; block C of the lab cell solves the same four conditions as a linear system and gets 3.33333333333333353.3333333333333335, and scipy.integrate.solve_bvp (same block) independently returns the same tip value and a midspan deflection 1.18061.1806, which agrees with the formula above at x=L/2x = L/2, namely qEI⋅17384L4=1.1806\tfrac{q}{EI}\cdot\tfrac{17}{384}L^4 = 1.1806. A wing spar is a crude cantilever and real lift is not uniform, so this shows the shape of the model only.

On a spring foundation the equation is EI y′′′′+ky=0EI\,y'''' + ky = 0 with r4=−k/EIr^4 = -k/EI. For k/EI=4k/EI = 4, r4+4=(r2+2r+2)(r2−2r+2)r^4 + 4 = (r^2 + 2r + 2)(r^2 - 2r + 2) has roots ±1±i\pm 1 \pm i (the lab’s foundation preset).

Where the method stops

Everything here rests on constant coefficients, which make erte^{rt} an eigenfunction of DD. With variable coefficients ak(t)a_k(t) there is no characteristic polynomial; the solution space still has dimension nn (the existence-and-uniqueness argument did not use constancy), but its basis must come from series (the next topic) or numerical integration. Euler-type equations, with aka_k a constant times xkx^k, have a polynomial of their own (try y=xry = x^r), mentioned only in passing. Nonlinear equations have no solution space; the form x′=f(x)x' = f(x) still simulates them, and linearization (2.2 Linearization, the Chain Rule & the Jacobian) brings the characteristic polynomial back near an equilibrium.

✅ Concept check

Which is the general real solution of y'''' - 2y''' = 0?

✅ Concept check

For 2y'''' + 10y''' + 7y'' + y' + 3y = 0 the Wronskian of any four independent solutions satisfies W(0.4) = k W(0). Give k as a decimal.

✅ Concept check

Which set of characteristic roots makes EVERY solution tend to zero?

Problems

✏️ Pen & paperA fourth-order equation with a growing and a bounded part●○○

Solve y′′′′−16y=0y'''' - 16y = 0 with y(0)=1y(0) = 1, y′(0)=2y'(0) = 2, y′′(0)=y′′′(0)=0y''(0) = y'''(0) = 0. Which term dominates for large tt?

Show worked solution

r4−16=(r2−4)(r2+4)r^4 - 16 = (r^2 - 4)(r^2 + 4), so the roots are ±2\pm 2 and ±2i\pm 2i and y=Acosh⁡2t+Bcos⁡2t+Csinh⁡2t+Dsin⁡2ty = A\cosh 2t + B\cos 2t + C\sinh 2t + D\sin 2t is a convenient real basis. Derivatives at 00: y(0)=A+By(0) = A + B, y′(0)=2C+2Dy'(0) = 2C + 2D, y′′(0)=4A−4By''(0) = 4A - 4B, y′′′(0)=8C−8Dy'''(0) = 8C - 8D. The data give A+B=1A + B = 1, A−B=0A - B = 0, so A=B=12A = B = \tfrac12; and C+D=1C + D = 1, C−D=0C - D = 0, so C=D=12C = D = \tfrac12. Then

y=12(cosh⁡2t+sinh⁡2t+cos⁡2t+sin⁡2t)=12(e2t+cos⁡2t+sin⁡2t).y = \tfrac12\bigl(\cosh 2t + \sinh 2t + \cos 2t + \sin 2t\bigr) = \tfrac12\bigl(e^{2t} + \cos 2t + \sin 2t\bigr).

Check: y′(0)=12(2+2)=2y'(0) = \tfrac12(2 + 2) = 2, y′′(0)=12(4−4)=0y''(0) = \tfrac12(4 - 4) = 0, y′′′(0)=12(8−8)=0y'''(0) = \tfrac12(8 - 8) = 0. The term 12e2t\tfrac12e^{2t} dominates; the others are bounded.

✏️ Pen & paperA double zero root●●○

Consider y(5)+3y(4)+3y′′′+y′′=0y^{(5)} + 3y^{(4)} + 3y''' + y'' = 0. (a) Find the general real solution. (b) For which solutions is yy bounded as t→∞t \to \infty? (c) Solve the initial-value problem with y(0)=0y(0) = 0, y′(0)=1y'(0) = 1, y′′(0)=1y''(0) = 1, y′′′(0)=−1y'''(0) = -1, y(4)(0)=1y^{(4)}(0) = 1.

Show worked solution

(a) p(r)=r5+3r4+3r3+r2=r2(r+1)3p(r) = r^5 + 3r^4 + 3r^3 + r^2 = r^2(r + 1)^3: the root 00 has multiplicity 22 and the root −1-1 multiplicity 33, so

y=c1+c2t+(c3+c4t+c5t2)e−t.y = c_1 + c_2t + (c_3 + c_4t + c_5t^2)e^{-t}.

(Shortcut: z=y′′z = y'' solves (D+1)3z=0(D + 1)^3z = 0; integrating twice adds c1+c2tc_1 + c_2t.)

(b) The e−te^{-t} terms decay no matter how large the polynomial in front is, so y→c1+c2ty \to c_1 + c_2t. This is bounded exactly when c2=0c_2 = 0. The double root at 00 is a case of the “imaginary axis roots must be simple” rule.

(c) With z=y′′z = y'': z(0)=1z(0) = 1, z′(0)=y′′′(0)=−1z'(0) = y'''(0) = -1, z′′(0)=y(4)(0)=1z''(0) = y^{(4)}(0) = 1. Writing z=(b0+b1t+b2t2)e−tz = (b_0 + b_1t + b_2t^2)e^{-t}: z(0)=b0=1z(0) = b_0 = 1; z′(0)=b1−b0=−1z'(0) = b_1 - b_0 = -1, so b1=0b_1 = 0; z′′(0)=2b2−2b1+b0=1z''(0) = 2b_2 - 2b_1 + b_0 = 1, so b2=0b_2 = 0. Thus z=e−tz = e^{-t} and y=e−t+c1+c2ty = e^{-t} + c_1 + c_2t. Then y(0)=1+c1=0y(0) = 1 + c_1 = 0 gives c1=−1c_1 = -1 and y′(0)=−1+c2=1y'(0) = -1 + c_2 = 1 gives c2=2c_2 = 2:

y=−1+2t+e−t.y = -1 + 2t + e^{-t}.

Check: y′′=e−ty'' = e^{-t}, y′′′=−e−ty''' = -e^{-t}, y(4)=e−ty^{(4)} = e^{-t}, y(5)=−e−ty^{(5)} = -e^{-t}, and −1+3−3+1=0-1 + 3 - 3 + 1 = 0. Every nonzero root is stable, yet yy grows like 2t2t because of the double root at zero.

✏️ Pen & paperHow strong a spring term keeps a cubic stable●●●

Let y′′′+3y′′+3y′+ky=0y''' + 3y'' + 3y' + ky = 0 with kk a real number. For which kk do all solutions tend to 00? Justify the endpoints, and check one interior value.

Show worked solution

Let p(r)=r3+3r2+3r+kp(r) = r^3 + 3r^2 + 3r + k. If k<0k \lt 0 then p(0)<0p(0) \lt 0 while p(r)→+∞p(r) \to +\infty, so there is a positive real root. If k=0k = 0 then r=0r = 0 is a root (a constant solution). Neither decays.

For k>0k \gt 0, the roots depend continuously on kk, so a root can leave the left half-plane only by crossing the imaginary axis, i.e. p(iω)=0p(i\omega) = 0 for some real ω\omega. Compute

p(iω)=−iω3−3ω2+3iω+k=(k−3ω2)+i ω(3−ω2).p(i\omega) = -i\omega^3 - 3\omega^2 + 3i\omega + k = (k - 3\omega^2) + i\,\omega(3 - \omega^2).

The imaginary part vanishes for ω=0\omega = 0 or ω2=3\omega^2 = 3. Then the real part vanishes only if k=0k = 0 (for ω=0\omega = 0) or k=9k = 9 (for ω2=3\omega^2 = 3). So for 0<k<90 \lt k \lt 9 no root crosses. At k=1k = 1 the polynomial is (r+1)3(r + 1)^3, all roots at −1-1, so they stay in the left half-plane for all 0<k<90 \lt k \lt 9. At k=9k = 9 the roots are −3-3 and ±i3\pm i\sqrt3 (indeed p(r)=(r+3)(r2+3)p(r) = (r + 3)(r^2 + 3)), and the imaginary pair gives the non-decaying solutions cos⁡3 t\cos\sqrt3\,t and sin⁡3 t\sin\sqrt3\,t. For k>9k \gt 9 a pair has crossed into the right half-plane (at k=10k = 10 the roots are −3.0801-3.0801 and 0.0400±1.8014i0.0400 \pm 1.8014i). Answer: all solutions decay exactly for 0<k<90 \lt k \lt 9.

Interior check, k=5k = 5: the roots are −2.5874-2.5874 and −0.2063±1.3747i-0.2063 \pm 1.3747i, as predicted. (This is the cubic condition a2a1>a0a_2a_1 \gt a_0, here 9>k9 \gt k.)

Key Takeaways

  • An nnth-order constant-coefficient equation is p(D)y=0p(D)y = 0, and p(D)ert=p(r)ertp(D)e^{rt} = p(r)e^{rt} turns solving into finding roots of the degree-nn characteristic polynomial.
  • The solution space has dimension exactly nn, because the map from a solution to its initial data (y,…,y(n−1))(y, \ldots, y^{(n-1)}) is a linear bijection (existence plus uniqueness for the system x′=Cxx' = Cx).
  • A root of multiplicity mm contributes tkertt^ke^{rt} for k=0,…,m−1k = 0, \ldots, m - 1, by the shift identity (D−r)[u ert]=u′ert(D - r)[u\,e^{rt}] = u'e^{rt}; conjugate pairs of multiplicity mm give tkeαtcos⁡βtt^ke^{\alpha t}\cos\beta t and tkeαtsin⁡βtt^ke^{\alpha t}\sin\beta t.
  • The n×nn \times n Wronskian obeys Abel’s formula W′=−(an−1/an)WW' = -(a_{n-1}/a_n)W: W∝et tr CW \propto e^{t\,\mathrm{tr}\,C}, the sum of the roots in the exponent.
  • The companion matrix has eigenvector (1,λ,…,λn−1)(1, \lambda, \ldots, \lambda^{n-1}) for each root λ\lambda and characteristic polynomial p(λ)/anp(\lambda)/a_n; a repeated root has only one eigenvector, which is why tkertt^ke^{rt} appears.
  • All solutions decay exactly when every root has negative real part; Routh-Hurwitz tests this from the coefficients, and same-sign coefficients are necessary but not sufficient.
  • High-degree roots are ill-conditioned (Wilkinson’s degree 20), and a root of multiplicity mm is only known to about ε1/m\varepsilon^{1/m}; integrate the first-order system when it matters.
  • The beam equation EI y′′′′=qEI\,y'''' = q has polynomial r4r^4 and cantilever tip deflection qL4/(8EI)qL^4/(8EI); the method fails for variable-coefficient and nonlinear equations.
Finished this lesson?

Mark it complete to track your progress (saved in this browser). Reading every section does this for you.

Where this leads

These later lessons build directly on this one: