Linear ODEs and Variation of Parameters
CSIR NET ODE: theory of linear ODEs, Wronskian and Abel's formula, reduction of order, constant and Cauchy-Euler equations, variation of parameters.
- 19 min
On this page · 15 sections
Prerequisites
- Existence and Uniqueness for First-Order IVPs: the global existence theorem for Lipschitz right sides, which is why linear equations have solutions on the whole interval.
- Singular Solutions and Systems of First-Order ODEs: an \( n \)th-order linear equation is a first-order system with a companion matrix; Abel’s formula is Liouville’s formula for that system.
- Continuity, Differentiability and Bounded Variation: \( \lvert x \rvert^3 \) is \( C^2 \) but not a polynomial, the key to the Wronskian counter-example below.
- Linear independence, dimension and determinants (linear algebra, Unit 1).
The Hook: A Forcing Term You Cannot Guess
General Theory
The \( n \)th-order linear equation in standard form is
$$L[y] = y^{(n)} + p_1(x)y^{(n-1)} + \dots + p_{n-1}(x)y' + p_n(x)y = g(x).$$If the equation arrives as \( a_0(x)y^{(n)} + \dots = h(x) \), divide by \( a_0 \). The theory below needs \( p_i, g \) continuous on an interval \( I \), so it applies only on intervals where \( a_0 \ne 0 \).
Consequences you will use repeatedly:
- The trivial-data rule. A solution of \( L[y] = 0 \) with \( y(x_0) = y'(x_0) = \dots = y^{(n-1)}(x_0) = 0 \) is identically zero. For second order: a non-trivial solution cannot touch the axis tangentially, so its zeros are simple and isolated.
- Solution space. The solutions of \( L[y] = 0 \) form a vector space of dimension exactly \( n \). Any \( n \) independent solutions \( y_1, \dots, y_n \) (a fundamental set) give the general solution \( c_1y_1 + \dots + c_ny_n \).
- Non-homogeneous structure. Every solution of \( L[y] = g \) is \( y = y_c + y_p \): complementary function plus any one particular solution. Superposition: if \( L[y_i] = g_i \), then \( L[y_1 + y_2] = g_1 + g_2 \).
So \( y = x^2 \) can never solve \( y'' + p(x)y' + q(x)y = 0 \) with \( p, q \) continuous near 0: it has \( y(0) = y'(0) = 0 \) without being zero.
The Wronskian
For \( n \) functions, \( n - 1 \) times differentiable,
$$W(y_1, \dots, y_n)(x) = \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}.$$Abel’s formula. If \( y_1, \dots, y_n \) solve \( L[y] = 0 \) on \( I \), then
$$\boxed{W(x) = W(x_0)\exp\left(-\int_{x_0}^{x} p_1(t)\,dt\right).}$$Only the coefficient of \( y^{(n-1)} \) appears, with a minus sign. (It is Liouville’s formula for the companion system, whose trace is \( -p_1 \).)
| Functions on \( (-1, 1) \) | Wronskian | Independent? | Fundamental pair for some \( y'' + py' + qy = 0 \), \( p, q \in C(-1, 1) \)? |
|---|---|---|---|
| \( \cos x \), \( \sin x \) | \( 1 \) | yes | yes (\( y'' + y = 0 \)) |
| \( e^x \), \( e^{-x} \) | \( -2 \) | yes | yes (\( y'' - y = 0 \)) |
| \( x \), \( x^2 \) | \( x^2 \): zero at 0 only | yes | no: \( W \) vanishes at one point without vanishing identically |
| \( x^3 \), \( \lvert x \rvert^3 \) | \( \equiv 0 \) | yes | no: \( W \equiv 0 \) would force dependence |
| \( x \), \( 2x \) | \( \equiv 0 \) | no | no |
For \( x^3 \) and \( \lvert x \rvert^3 \): on \( x > 0 \) they coincide, on \( x < 0 \) one is minus the other, so \( W = 0 \) everywhere; yet \( c_1x^3 + c_2\lvert x \rvert^3 \equiv 0 \) on \( (-1, 1) \) forces \( c_1 + c_2 = 0 \) and \( c_1 - c_2 = 0 \).
The pair \( x \), \( x^2 \) does solve \( x^2y'' - 2xy' + 2y = 0 \), but in standard form \( p = -\frac{2}{x} \), \( q = \frac{2}{x^2} \) are discontinuous at 0. That is how \( W \) is allowed to vanish there.
Reduction of Order
If \( y_1 \) is a non-vanishing solution of \( y'' + p(x)y' + q(x)y = 0 \), a second, independent solution is
$$\boxed{y_2 = y_1 \int \frac{e^{-\int p\,dx}}{y_1^2}\,dx.}$$(Put \( y = vy_1 \); the equation becomes first-order in \( v' \). The formula is Abel’s \( W = e^{-\int p} \) combined with \( \left(\frac{y_2}{y_1}\right)' = \frac{W}{y_1^2} \).)
Equations You Can Solve in Closed Form
Constant coefficients
\( a_ny^{(n)} + \dots + a_1y' + a_0y = 0 \): try \( e^{rx} \) to get the characteristic polynomial \( P(r) = a_nr^n + \dots + a_0 \).
| Root of \( P \) | Contributes |
|---|---|
| real \( r \), multiplicity \( m \) | \( e^{rx}, xe^{rx}, \dots, x^{m-1}e^{rx} \) |
| complex pair \( \alpha \pm i\beta \), multiplicity \( m \) | \( x^ke^{\alpha x}\cos\beta x \), \( x^ke^{\alpha x}\sin\beta x \), \( 0 \le k \le m - 1 \) |
Cauchy–Euler equations
\( x^2y'' + axy' + by = 0 \) on \( x > 0 \). Try \( x^m \) (equivalently put \( x = e^t \), which gives constant coefficients):
$$m(m - 1) + am + b = 0.$$| Indicial roots | Solutions on \( x > 0 \) |
|---|---|
| real \( m_1 \ne m_2 \) | \( x^{m_1} \), \( x^{m_2} \) |
| repeated \( m \) | \( x^m \), \( x^m\ln x \) |
| \( \alpha \pm i\beta \) | \( x^\alpha\cos(\beta\ln x) \), \( x^\alpha\sin(\beta\ln x) \) |
Examples: \( x^2y'' - 3xy' + 4y = 0 \) gives \( (m - 2)^2 = 0 \), so \( x^2 \), \( x^2\ln x \). \( x^2y'' + xy' + y = 0 \) gives \( m = \pm i \), so \( \cos(\ln x) \), \( \sin(\ln x) \).
Undetermined coefficients (constant-coefficient \( L \) only)
| Right side \( g(x) \) | Trial \( y_p \) |
|---|---|
| polynomial of degree \( k \) | \( x^s(A_0 + \dots + A_kx^k) \) |
| \( e^{ax} \times \) polynomial of degree \( k \) | \( x^se^{ax}(A_0 + \dots + A_kx^k) \) |
| \( e^{ax}\cos bx \) or \( e^{ax}\sin bx \) (times polynomial) | \( x^se^{ax}\big(Q_1(x)\cos bx + Q_2(x)\sin bx\big) \) |
Here \( s \) is the multiplicity of \( a \) (or \( a + ib \)) as a root of \( P \), 0 if it is not a root. Forgetting \( s \) is the classic error: for \( y'' - 3y' + 2y = xe^{2x} \), 2 is a simple root, so the trial is \( x(Ax + B)e^{2x} \), giving \( y_p = \left(\frac{x^2}{2} - x\right)e^{2x} \).
Variation of Parameters
Let \( y_1, y_2 \) be a fundamental pair for \( y'' + p(x)y' + q(x)y = 0 \) and seek \( y_p = u_1y_1 + u_2y_2 \). Imposing \( u_1'y_1 + u_2'y_2 = 0 \) (so no \( u'' \) appears), the equation \( y'' + py' + qy = g \) reduces to
$$\begin{pmatrix} y_1 & y_2 \\ y_1' & y_2' \end{pmatrix}\begin{pmatrix} u_1' \\ u_2' \end{pmatrix} = \begin{pmatrix} 0 \\ g \end{pmatrix}.$$By Cramer’s rule, with \( W = y_1y_2' - y_1'y_2 \):
$$\boxed{u_1' = -\frac{y_2\,g}{W}, \qquad u_2' = \frac{y_1\,g}{W}, \qquad y_p = -y_1\int\frac{y_2 g}{W}\,dx + y_2\int\frac{y_1 g}{W}\,dx.}$$\( n \)th order. For \( L[y] = g \) with fundamental set \( y_1, \dots, y_n \), \( y_p = \sum_{k=1}^{n} y_k\int\frac{W_k\,g}{W}\,dx \), where \( W_k \) is \( W \) with its \( k \)th column replaced by \( (0, \dots, 0, 1)^T \). For \( n = 2 \), \( W_1 = -y_2 \), \( W_2 = y_1 \), recovering the boxed formula.
The integral (kernel) form
Writing the antiderivatives as integrals from \( x_0 \) gives the particular solution with \( y_p(x_0) = y_p'(x_0) = 0 \):
$$y_p(x) = \int_{x_0}^{x} K(x, s)\,g(s)\,ds, \qquad K(x, s) = \frac{y_1(s)y_2(x) - y_1(x)y_2(s)}{W(s)}.$$For constant coefficients \( K \) depends only on \( x - s \):
| Equation | \( K(x, s) \) |
|---|---|
| \( y'' + \omega^2y = g \) | \( \frac{\sin\omega(x - s)}{\omega} \) |
| \( y'' - k^2y = g \) | \( \frac{\sinh k(x - s)}{k} \) |
| \( y'' = g \) | \( x - s \) |
| \( y'' - 3y' + 2y = g \) | \( e^{2(x - s)} - e^{x - s} \) |
This \( K \) is the Green’s function of the initial value problem; the next page builds the Green’s function of a boundary value problem the same way.
Removing the First-Derivative Term
For \( y'' + p(x)y' + q(x)y = 0 \), the substitution \( y = u\exp\left(-\frac{1}{2}\int p\,dx\right) \) gives the normal form
$$u'' + I(x)u = 0, \qquad I = q - \frac{p^2}{4} - \frac{p'}{2}.$$The exponential factor never vanishes, so \( y \) and \( u \) have the same zeros. For Bessel’s equation \( x^2y'' + xy' + (x^2 - \nu^2)y = 0 \), \( I = 1 + \frac{1 - 4\nu^2}{4x^2} \). Zero counting through this form (Sturm’s theorems) is on Sturm–Liouville Problems and Green’s Function.
Memory Tricks
- Abel: “minus the integral of the second coefficient”. Only \( p_1 \) (the coefficient of \( y^{(n-1)} \) in standard form) matters.
- “Solutions’ Wronskian: all or nothing.” Zero at one point means zero everywhere, for solutions.
- Variation of parameters: “minus \( y_1 \) times \( y_2 \), plus \( y_2 \) times \( y_1 \).” \( y_p = -y_1\int\frac{y_2g}{W} + y_2\int\frac{y_1g}{W} \).
- Resonance: multiply by \( x^s \), \( s \) = how many times the forcing exponent is a characteristic root.
- Euler equations: \( \ln x \) plays the role of \( x \). Repeated root \( \to x^m\ln x \); complex root \( \to \cos(\beta\ln x) \).
Don’t Confuse
| This | vs | That |
|---|---|---|
| \( W \ne 0 \) at a point \( \Rightarrow \) independent (any functions) | \( W \equiv 0 \Rightarrow \) dependent (only for solutions of one equation) | |
| Abel’s formula: \( W = W_0e^{-\int p_1} \) | Liouville: \( \det\Phi = \det\Phi_0 e^{+\int\operatorname{tr}A} \) (same fact, companion trace \( -p_1 \)) | |
| Undetermined coefficients (constant \( L \), special \( g \)) | Variation of parameters (any continuous coefficients and \( g \), needs \( y_1, y_2 \)) | |
| \( g \) in the original equation | \( g \) after dividing by the leading coefficient | |
| Kernel \( K(x, s) \): IVP Green’s function | \( G(x, s) \): BVP Green’s function |
Common Mistakes
Practice
All questions below are original practice questions written for this page. They are not from any CSIR NET paper. In Level 3, as in Part C, one or more options may be correct.
Level 1: Foundation
- Compute \( W(e^x, e^{2x}) \).
- What is the dimension of the solution space of \( y''' + xy' + (\sin x)y = 0 \) on \( \mathbb{R} \)?
- Can \( y = x^2 \) be a solution of \( y'' + p(x)y' + q(x)y = 0 \) on \( (-1, 1) \) with \( p, q \) continuous?
Answers
- \( e^x \cdot 2e^{2x} - e^x \cdot e^{2x} = e^{3x} \).
- 3: a third-order linear equation with continuous coefficients.
- No. \( y(0) = y'(0) = 0 \) would force \( y \equiv 0 \) by uniqueness.
Level 2: Part B Style
Practice Q1. Let \( y_1, y_2 \) solve \( y'' + 2xy' + (\cos x)y = 0 \) with \( W(y_1, y_2)(0) = 3 \). Then \( W(y_1, y_2)(1) \) is:
(a) 3 (b) \( 3e \) (c) \( \frac{3}{e} \) (d) \( 3e^{\sin 1} \)
Answer: (c)
Abel: \( W(1) = 3\exp\left(-\int_0^1 2t\,dt\right) = 3e^{-1} \). The coefficient of \( y \) is irrelevant.
Practice Q2. A particular solution of \( y'' + y = \sec x \) on \( \left(-\frac{\pi}{2}, \frac{\pi}{2}\right) \) is:
(a) \( x\cos x + \sin x\ln(\cos x) \) (b) \( x\sin x + \cos x\ln(\cos x) \) (c) \( x\sin x - \cos x\ln(\cos x) \) (d) \( \sec x\tan x \)
Answer: (b)
From variation of parameters, \( u_1 = \ln(\cos x) \), \( u_2 = x \), so \( y_p = \cos x\ln(\cos x) + x\sin x \). Direct check: \( y_p' = \ln(\cos x)(-\sin x) - \sin x + \sin x + x\cos x = -\sin x\ln(\cos x) + x\cos x \), and \( y_p'' + y_p = \sec x \).
Practice Q3. The general solution of \( x^2y'' - 3xy' + 4y = 0 \), \( x > 0 \), is:
(a) \( c_1x^2 + c_2x^{-2} \) (b) \( (c_1 + c_2\ln x)x^2 \) (c) \( c_1x + c_2x^4 \) (d) \( x^2(c_1\cos\ln x + c_2\sin\ln x) \)
Answer: (b)
Indicial equation \( m(m - 1) - 3m + 4 = m^2 - 4m + 4 = (m - 2)^2 \). Double root 2: \( x^2 \) and \( x^2\ln x \).
Practice Q4. For \( y'' - 3y' + 2y = xe^{2x} \), the correct trial form for undetermined coefficients is:
(a) \( (Ax + B)e^{2x} \) (b) \( x(Ax + B)e^{2x} \) (c) \( x^2(Ax + B)e^{2x} \) (d) \( Axe^{2x} \)
Answer: (b)
\( P(r) = (r - 1)(r - 2) \): 2 is a simple root, so multiply by \( x^1 \). Solving gives \( A = \frac{1}{2} \), \( B = -1 \): \( y_p = \left(\frac{x^2}{2} - x\right)e^{2x} \). Option (a) fails because its \( Be^{2x} \) part is homogeneous, leaving too few free coefficients.
Level 3: Part C Style
Practice Q5. For which pairs do there exist continuous \( p, q \) on \( (-1, 1) \) such that the pair is a fundamental set of solutions of \( y'' + p(x)y' + q(x)y = 0 \) on \( (-1, 1) \)?
(a) \( \{\sin x, \cos x\} \) (b) \( \{x, x^2\} \) (c) \( \{x^3, \lvert x \rvert^3\} \) (d) \( \{e^x, e^{-x}\} \)
Answer: (a) and (d)
- (a) Yes. \( y'' + y = 0 \); \( W = -1 \ne 0 \).
- (b) No. \( W = x^2 \) vanishes at 0 but not identically, impossible for solutions (Abel’s dichotomy). Also, \( x^2 \) has a double zero at 0.
- (c) No. \( W \equiv 0 \) would make solutions dependent, but these functions are independent.
- (d) Yes. \( y'' - y = 0 \); \( W = -2 \).
Practice Q6. Let \( y \) solve \( y'' + y = f(x) \), \( y(0) = y'(0) = 0 \), with \( f \) continuous on \( \mathbb{R} \). Which statements are true?
(a) \( y(x) = \int_0^x \sin(x - s)f(s)\,ds \). (b) If \( f \equiv 1 \), then \( y = 1 - \cos x \). (c) If \( f(x) = x \), then \( y = x - \sin x \). (d) If \( f \) is bounded on \( \mathbb{R} \), then \( y \) is bounded on \( \mathbb{R} \).
Answer: (a), (b) and (c)
- (a) True. Kernel \( K(x, s) = \frac{\cos s\sin x - \cos x\sin s}{1} = \sin(x - s) \), and the integral form has zero initial data.
- (b) True. \( \int_0^x \sin(x - s)\,ds = 1 - \cos x \).
- (c) True. \( \int_0^x s\sin(x - s)\,ds = x - \sin x \); check \( y'' + y = \sin x + x - \sin x = x \).
- (d) False. \( f = \cos x \) gives \( y = \frac{x\sin x}{2} \): bounded forcing at the natural frequency produces unbounded resonance.
Practice Q7. Consider \( (1 - x^2)y'' - 2xy' + 2y = 0 \) on \( (-1, 1) \). Which statements are true?
(a) \( y_2 = \frac{x}{2}\ln\frac{1 + x}{1 - x} - 1 \) is a solution independent of \( y_1 = x \). (b) The Wronskian of any two solutions is \( \frac{C}{1 - x^2} \) for some constant \( C \). (c) Every solution is bounded on \( (-1, 1) \). (d) Every solution is a polynomial.
Answer: (a) and (b)
- (a) True. Reduction of order (worked example above); \( W(x, y_2) = \frac{1}{1 - x^2} \ne 0 \).
- (b) True. Abel: \( p = -\frac{2x}{1 - x^2} \), \( e^{-\int p} = e^{-\ln(1 - x^2)} = \frac{1}{1 - x^2} \).
- (c) False. \( y_2 \to +\infty \) as \( x \to 1^- \).
- (d) False. \( y_2 \) is not a polynomial.
Quick Revision Table
| Idea | Fact |
|---|---|
| Existence | continuous coefficients on \( I \) \( \Rightarrow \) unique solution on all of \( I \) |
| Solution space | dimension \( n \); general = \( y_c + y_p \) |
| Abel | \( W = W(x_0)e^{-\int p_1} \) (standard form) |
| Dichotomy | for solutions, \( W \equiv 0 \) or never 0 |
| Counter-example | \( x^3, \lvert x \rvert^3 \): \( W \equiv 0 \), independent |
| Reduction of order | \( y_2 = y_1\int\frac{e^{-\int p}}{y_1^2} \) |
| Euler equation | \( m(m - 1) + am + b = 0 \); repeated \( \to x^m\ln x \) |
| Undetermined coefficients | multiply trial by \( x^s \), \( s \) = root multiplicity |
| Variation of parameters | \( y_p = -y_1\int\frac{y_2g}{W} + y_2\int\frac{y_1g}{W} \) |
| Kernel | \( y'' + \omega^2y = g \): \( y_p = \int_0^x\frac{\sin\omega(x - s)}{\omega}g(s)\,ds \) |
Key Takeaways
What’s Next
- Sturm–Liouville Problems and Green’s Function: boundary conditions, eigenvalues, zeros of solutions, and the Green’s function of a boundary value problem.
- Singular Solutions and Systems of First-Order ODEs for the matrix version of everything on this page.
- Ordinary Differential Equations: Quick Revision.
- Back to the chapter overview.