Ordinary and Partial Differential Equations: Nonlinear First Order, Wronskian, Variation of Parameters, Cauchy-Euler, Eigenvalue Problems, Power Series and Separation of Variables
2. Variable coefficients and the Wronskian
For y″ + P(x)y′ + Q(x)y = 0 with P, Q continuous, the Wronskian of two solutions is W = y₁y₂′ − y₂y₁′. Abel's formula: W(x) = W(x₀) exp(−∫ₓ₀ˣ P dt). Hence W is either zero everywhere on the interval or nowhere zero; if it is nowhere zero, y₁ and y₂ are linearly independent and form a fundamental set, and y = c₁y₁ + c₂y₂ is the general solution. For constant coefficients with roots r₁ ≠ r₂, W = (r₂ − r₁)e^((r₁+r₂)x).
Worked. y₁ = x and y₂ = x² solve x²y″ − 2xy′ + 2y = 0 (check: x² · 2 − 2x · 2x + 2x² = 0). W = x·2x − x²·1 = x², nonzero for x > 0, so they are independent. Abel: P = −2/x, so W = C exp(2 ln x) = Cx², matching. If one solution y₁ is known, a second is y₂ = y₁∫W/y₁² dx (reduction of order); here ∫x²/x² dx = x gives y₂ = x². Abel can also give the Wronskian without solving: if W(1) = 12 for solutions of xy″ + 2y′ + y = 0 on x > 0, P = 2/x and W(x) = 12/x², so W(2) = 3.
3. Variation of parameters and the Cauchy-Euler equation
For y″ + Py′ + Qy = f(x) with homogeneous solutions y₁, y₂ and Wronskian W, a particular solution is y_p = −y₁∫(y₂ f/W) dx + y₂∫(y₁ f/W) dx. It works for any continuous f, unlike undetermined coefficients. Example: y″ + y = sec x, y₁ = cos x, y₂ = sin x, W = 1. Then y_p = −cos x ∫ sin x sec x dx + sin x ∫ dx = cos x ln|cos x| + x sin x. Insert it in the equation as a check: y_p″ + y_p = sec x.
Cauchy-Euler equation x²y″ + axy′ + by = f(x), x > 0. The substitution x = eᵗ turns it into a constant-coefficient equation in t; for the homogeneous case try y = x^m: m(m − 1) + am + b = 0. Distinct real roots m₁, m₂: y = c₁x^m₁ + c₂x^m₂. A repeated root m: y = (c₁ + c₂ ln x)x^m. Complex roots α ± iβ: y = x^α[c₁ cos(β ln x) + c₂ sin(β ln x)].
Worked. (i) x²y″ − xy′ + y = 0: m² − 2m + 1 = 0, m = 1 twice, y = (c₁ + c₂ ln x)x. (ii) x²y″ + xy′ + y = 0: m² + 1 = 0, y = c₁ cos(ln x) + c₂ sin(ln x). (iii) x²y″ − 2y = 0: m² − m − 2 = 0, m = 2, −1, y = c₁x² + c₂/x; with y(1) = 3 and y′(1) = 0: c₁ + c₂ = 3, 2c₁ − c₂ = 0 give c₁ = 1, c₂ = 2, and y(2) = 4 + 1 = 5. (iv) x²y″ − 2y = x³: try y_p = Ax³, 6Ax³ − 2Ax³ = x³ gives A = 1/4.
4. The eigenvalue problem y″ + λy = 0
A boundary-value eigenvalue problem asks for the values of λ for which y″ + λy = 0 has a non-trivial solution satisfying given boundary conditions on [0, L]. For λ < 0 the solutions are exponentials (sinh, cosh), for λ = 0 they are linear; for λ = k² > 0 they are A cos kx + B sin kx. Applying the conditions decides which values survive.
| Conditions | Eigenvalues λₙ | Eigenfunctions |
|---|---|---|
| y(0) = 0, y(L) = 0 | (nπ/L)², n = 1, 2, 3, … | sin(nπx/L) |
| y′(0) = 0, y′(L) = 0 | (nπ/L)², n = 0, 1, 2, … | cos(nπx/L) (n = 0 gives 1) |
| y(0) = 0, y′(L) = 0 | ((2n − 1)π/2L)², n = 1, 2, … | sin((2n − 1)πx/2L) |
Worked (Dirichlet). y(0) = 0 gives A = 0, so y = B sin kx. y(L) = 0 needs sin kL = 0 (B ≠ 0), so k = nπ/L and λ = (nπ/L)². For λ = 0, y = Ax + B with both conditions gives y = 0; for λ < 0 sinh kL = 0 only at the trivial solution. Mixed: y′(L) = Bk cos kL = 0 gives kL = (2n − 1)π/2. For L = π/2: λₙ = (2n − 1)², i.e. 1, 9, 25, …, so the third eigenvalue is 25. The eigenfunctions are orthogonal: ∫₀ᴸ sin(nπx/L) sin(mπx/L) dx = 0 for n ≠ m and L/2 for n = m.
5. Power series solutions at an ordinary point
For y″ + P(x)y′ + Q(x)y = 0, a point x₀ is ordinary if P and Q are analytic there (otherwise singular). At an ordinary point the general solution is y = Σaₙ(x − x₀)ⁿ with two free constants a₀, a₁. Substitute the series, collect the coefficient of each power, and read off a recurrence. The series converges at least up to the nearest singular point of P or Q, measured in the complex plane.
Worked (Airy). y″ − xy = 0. With y = Σaₙxⁿ, y″ = Σ(n + 2)(n + 1)aₙ₊₂xⁿ and xy = Σaₙ₋₁xⁿ (n ≥ 1). The constant term gives a₂ = 0, and for n ≥ 1, (n + 2)(n + 1)aₙ₊₂ = aₙ₋₁, i.e. aₙ₊₃ = aₙ/((n + 3)(n + 2)). So a₃ = a₀/6, a₄ = a₁/12, a₆ = a₃/30 = a₀/180. Hence y = a₀(1 + x³/6 + x⁶/180 + …) + a₁(x + x⁴/12 + …). With y(0) = 1, y′(0) = 0 the coefficient of x⁶ is 1/180. There is no singular point at all, so the radius is infinite.
Radius estimate. (x² + 4)y″ + xy′ + y = 0 about x₀ = 0 has P = x/(x² + 4) and Q = 1/(x² + 4), singular at x = ±2i, distance 2 from the origin, so the series converges at least for |x| < 2 even though every coefficient is real. About x₀ = 1 the distance to ±2i is √5.
6. Separation of variables for the heat, wave and Laplace equations
Assume u(x, t) = X(x)T(t). For the heat equation u_t = α²u_xx, with u(0, t) = u(L, t) = 0: X″/X = T′/(α²T) = −λ, a constant, so X″ + λX = 0 with X(0) = X(L) = 0 (the eigenvalue problem above), λₙ = (nπ/L)², and Tₙ = e^(−α²λₙt). Superposing, u = Σ bₙ sin(nπx/L) e^(−α²(nπ/L)²t), and the initial condition u(x, 0) = f(x) is a half-range Fourier sine series, bₙ = (2/L)∫₀ᴸ f(x) sin(nπx/L) dx. Higher modes die faster (rate ∝ n²), so late-time temperature is shaped like the first mode.
Worked. (i) f = 1 on (0, π): bₙ = (2/π)∫₀^π sin nx dx = 2(1 − cos nπ)/(nπ) = 4/(nπ) for odd n and 0 for even n, so b₁ = 4/π = 1.2732. (ii) A rod of length 1 (m) with α² = 0.01 m²/s, ends at 0 and u(x, 0) = 3 sin πx: u(0.5, 10) = 3e^(−0.01π²·10) = 3e^(−0.987) = 1.12.
Wave equation u_tt = c²u_xx, fixed ends, u(x, 0) = f, u_t(x, 0) = g: u = Σ[Aₙ cos(nπct/L) + Bₙ sin(nπct/L)] sin(nπx/L), Aₙ = (2/L)∫f sin(nπx/L) dx, Bₙ = (2/(nπc))∫g sin(nπx/L) dx. Modes oscillate and do not decay; the fundamental frequency is c/2L. Laplace equation u_xx + u_yy = 0 on 0 < x < a, 0 < y < b with u = 0 on x = 0, x = a, y = 0 and u(x, b) = f(x): the x-part is the same eigenproblem, the y-part is X″/X = −Y″/Y = −λ, Y″ = λY, so Y = sinh(nπy/a) (to vanish at y = 0) and u = Σ cₙ sin(nπx/a) sinh(nπy/a), with cₙ sinh(nπb/a) = (2/a)∫₀ᵃ f sin(nπx/a) dx.
Key takeaways
- Exact: M_y = N_x, then F = C; Bernoulli y′ + Py = Qyⁿ is linearised by v = y^(1−n); never forget lost solutions.
- Wronskian W = y₁y₂′ − y₂y₁′; Abel: W = C exp(−∫P); W ≠ 0 means independent solutions; variation of parameters y_p = −y₁∫y₂f/W + y₂∫y₁f/W.
- Cauchy-Euler: y = x^m with m(m − 1) + am + b = 0 (repeated root gives ln x; complex roots give cos and sin of β ln x); x = eᵗ makes constants.
- Eigenvalue problem y″ + λy = 0: Dirichlet λ = (nπ/L)² with sin; Neumann includes λ = 0 with cos; mixed gives ((2n − 1)π/2L)²; eigenfunctions are orthogonal.
- At an ordinary point y = Σaₙxⁿ gives a recurrence with two free constants; the radius reaches at least the nearest complex singularity of P, Q.
- Separation u = X(x)T(t) with a constant −λ turns heat, wave and Laplace problems into eigenproblem + series in sin(nπx/L) with coefficients (2/L)∫f sin; heat modes decay, wave modes oscillate, Laplace modes use sinh in y.
Practice questions (17)
Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.
For which value of a is (2xy + 3) dx + (a x² + 4y) dy = 0 an exact equation?
Show answer
Answer: A — a = 1
Exactness needs M_y = N_x. M_y = 2x and N_x = 2ax, so a = 1. Then F = x²y + 3x + 2y² and the solution is F = C. The value a = 2 would give N_x = 4x ≠ M_y = 2x.The Bernoulli equation y′ + y/x = y² is converted into a linear equation by the substitution:
Show answer
Answer: C — v = 1/y, giving v′ − v/x = −1
With n = 2 the substitution is v = y^(1−n) = 1/y. Then v′ = −y′/y² = −(y² − y/x)/y² = −1 + v/x, so v′ − v/x = −1, linear. Squaring or taking the log leaves the equation nonlinear.The Wronskian of y₁ = x and y₂ = x² is:
Show answer
Answer: B — x²
W = y₁y₂′ − y₂y₁′ = x(2x) − x²(1) = x². Reversing the order of the terms gives −x², and adding instead of subtracting gives 3x², so the sign and order matter.Using variation of parameters for y″ + y = sec x on (−π/2, π/2) with y₁ = cos x, y₂ = sin x (W = 1), a particular solution is:
Show answer
Answer: D — x sin x + cos x ln|cos x|
y_p = −y₁∫y₂f dx + y₂∫y₁f dx = −cos x ∫ tan x dx + sin x ∫ 1 dx = −cos x(−ln|cos x|) + x sin x = x sin x + cos x ln|cos x|. None of the other three expressions satisfies y″ + y = sec x.The general solution of x²y″ + xy′ + y = 0 for x > 0 is:
Show answer
Answer: D — c₁ cos(ln x) + c₂ sin(ln x)
With y = x^m: m(m − 1) + m + 1 = m² + 1 = 0, m = ±i, so x^(±i) = e^(±i ln x) gives cos(ln x) and sin(ln x). The trigonometric functions of x itself solve y″ + y = 0, not this equation.The eigenvalues of y″ + λy = 0 with y(0) = 0 and y′(L) = 0 are:
Show answer
Answer: B — ((2n − 1)π/2L)², n = 1, 2, …
y(0) = 0 gives y = B sin kx, and y′(L) = Bk cos kL = 0 needs cos kL = 0, kL = (2n − 1)π/2. The Dirichlet–Dirichlet list (nπ/L)² and the Neumann list (n = 0 included) belong to other conditions; (nπ/2L)² would include even multiples of π/2L that do not satisfy cos kL = 0.The equation (x² + 4)y″ + xy′ + y = 0 is solved by a power series about x₀ = 0. The series is guaranteed to converge at least for:
Show answer
Answer: D — |x| < 2
The coefficients x/(x² + 4) and 1/(x² + 4) are singular at x = ±2i, at distance 2 from the origin in the complex plane, so R ≥ 2. Real axis behaviour does not matter: the complex singularities limit the radius. Using the value 4 for the radius confuses the distance with the value of x² + 4.Heat flows in a rod according to u_t = α²u_xx, with both ends held at zero temperature and u(x, 0) = f(x) on 0 < x < L. The n-th Fourier mode of the solution varies in time as:
Show answer
Answer: B — exp(−α²n²π²t/L²)
X″ + λX = 0 gives λₙ = (nπ/L)², and T′ = −α²λT gives Tₙ = exp(−α²n²π²t/L²): a decay whose rate grows as n². Cosine time dependence belongs to the wave equation, growth would violate energy decay, and the exponent must carry α² and the square of nπ/L.For u_xx + u_yy = 0 on the rectangle 0 < x < a, 0 < y < b with u = 0 on x = 0, x = a and y = 0, and u(x, b) = f(x), the n-th separated solution is:
Show answer
Answer: A — sin(nπx/a) sinh(nπy/a)
The x-part sin(nπx/a) fixes λ = (nπ/a)², so Y″ = λY, Y = A cosh + B sinh. Y(0) = 0 removes the cosh. The sin·sin product would solve u_xx + u_yy = −2(nπ/a)²u, not Laplace's equation, and exp(−nπy/a) does not vanish at y = 0.Which statements about the separated solutions of the heat, wave and Laplace equations are correct?
Show answer
Answer: A — For the wave equation on [0, L] with fixed ends the fundamental frequency is c/(2L) and the other modes are integer multiples of it; B — In the heat equation with zero end temperatures the higher modes decay faster than the first
Wave modes have frequencies nc/(2L) and the heat modes decay as e^(−α²n²π²t/L²), faster for larger n. Wave modes oscillate without decay in the ideal string, and in Laplace's equation one factor oscillates (the pair of edges with homogeneous conditions) while the other is a sinh or cosh.Which statements about linear second-order equations are correct?
Show answer
Answer: A — For two solutions of y″ + Py′ + Qy = 0 with continuous P, Q on an interval, the Wronskian is either identically zero or never zero; B — The substitution x = eᵗ turns a Cauchy-Euler equation into one with constant coefficients; D — A repeated root m of the indicial equation of a Cauchy-Euler equation gives the solutions x^m and x^m ln x
Abel's formula shows W is zero everywhere or nowhere; x = eᵗ gives constant coefficients in t; and a double root m gives x^m and x^m ln x (ln x = t). Variation of parameters works for any continuous f, which is its advantage over undetermined coefficients.Which statements about the eigenvalue problem y″ + λy = 0 on [0, L] are correct?
Show answer
Answer: A — With y(0) = y(L) = 0 the eigenfunctions sin(nπx/L) for different n are orthogonal on (0, L); C — With y′(0) = y′(L) = 0, λ = 0 is an eigenvalue with the constant eigenfunction
The Dirichlet eigenfunctions are orthogonal, and for Neumann conditions y = 1 satisfies y′ = 0 at both ends, so λ = 0 is allowed. For Dirichlet conditions λ = 0 gives y = Ax + B = 0, and λ < 0 gives sinh or cosh combinations that vanish at both ends only if trivial.The equation (3x² + 2y) dx + (2x + 3y²) dy = 0 has solution curve through (x, y) = (1, 1). The y-coordinate where this curve crosses x = 0, to four decimal places, is ____.
Numerical answer — type the value.
Show answer
Answer: 1.5874
It is exact with F = x³ + 2xy + y³. F(1, 1) = 4, so at x = 0, y³ = 4 and y = 4^(1/3) = 1.5874 (real cube root unique). A second check: F(0, 1.5874) = 3.99999 ≈ 4 in Python.Solve x²y″ − 2y = 0 for x > 0 with y(1) = 3 and y′(1) = 0. The value of y(2) is ____.
Numerical answer — type the value.
Show answer
Answer: 5
m(m − 1) − 2 = 0 gives m = 2, −1, so y = c₁x² + c₂/x. c₁ + c₂ = 3 and 2c₁ − c₂ = 0 give c₁ = 1, c₂ = 2. Then y(2) = 4 + 2/2 = 5. Substituting y = x² + 2/x in x²y″ − 2y numerically returns 0.For y″ + λy = 0 on [0, π/2] with y(0) = 0 and y′(π/2) = 0, the third smallest eigenvalue is ____.
Numerical answer — type the value.
Show answer
Answer: 25
λₙ = ((2n − 1)π/(2L))² with L = π/2 gives (2n − 1)². For n = 3, λ₃ = 25 (the list is 1, 9, 25). Check: y = sin 5x has y(0) = 0 and y′(π/2) = 5 cos(5π/2) = 0.The power-series solution of y″ − xy = 0 with y(0) = 1 and y′(0) = 0 is y = Σaₙxⁿ. The value of 1/a₆ is ____.
Numerical answer — type the value.
Show answer
Answer: 180
a₂ = 0 and aₙ₊₃ = aₙ/((n + 3)(n + 2)). a₀ = 1, a₃ = 1/6, a₆ = (1/6)/(6·5) = 1/180, so 1/a₆ = 180. A Python recurrence run to 30 terms returns a₆ = 0.0055556 and the residual of y″ − xy at x = 0.8 is of the order 10⁻¹⁶.A rod of length 1 m obeys u_t = α²u_xx with α² = 0.01 m²/s, u(0, t) = u(1, t) = 0 and u(x, 0) = 3 sin(πx). The temperature at x = 0.5 m and t = 10 s, to two decimal places, is ____.
Numerical answer — type the value.
Show answer
Answer: 1.12
Only the first mode is present: u = 3 sin(πx) exp(−α²π²t). At x = 0.5 sin(π/2) = 1, and exp(−0.01 × 9.8696 × 10) = exp(−0.98696) = 0.37270. So u = 3 × 0.3727 = 1.1181 ≈ 1.12. Python evaluation gives 1.11812.