Chapter 2 · Linear Ordinary Differential Equations

2.2 Non-Homogeneous Equations and Variation of Parameters

Forced linear equations $L[y]=r$: complementary function plus particular integral, undetermined coefficients and annihilators, variation of parameters with the Wronskian, operator methods $1/f(D)$, and series solutions — ordinary points, Frobenius, and the Legendre and Bessel equations.

A homogeneous linear equation describes a system left to itself: a spring after it has been released, a circuit with no source. Real systems are driven — by a periodic force, an applied voltage, a load, a source of heat — and the driving term $r(x)$ turns the equation into $L[y]=r$. By §2.1 all solutions are then obtained from one of them: $y=y_c+y_p$, the general solution of the homogeneous equation (the complementary function) plus any particular integral. The whole problem is to find one $y_p$, and this section gives three methods, each with its own range: undetermined coefficients (constant coefficients, forcing built from polynomials, exponentials, sines and cosines — fast, and it explains resonance), the operator method $1/f(D)$ (the same class, often faster), and variation of parameters (any continuous forcing and any coefficients, as soon as a fundamental set is known — and it produces the integral kernel that becomes the Green's function of §2.4).

The last part of the section asks what to do when not even the homogeneous equation can be solved in closed form. Near an ordinary point the solutions are power series; near a regular singular point they are Frobenius series $x^r\sum a_kx^k$, possibly with a logarithm. The two most important examples — the equations of Legendre and Bessel, which arise whenever Laplace's equation or the wave equation is separated in spherical or cylindrical coordinates (Chapter 4) — are treated at the level CSIR NET expects: indicial roots, the form of the solutions, and the standard properties of $P_n$ and $J_\nu$. Typical exam questions: "a particular integral of … is", "the trial solution for … is", "the indicial roots are … and the second solution contains a logarithm: true or false?", "$\int_{-1}^{1}xP_3\,dx=$?". The notation of §2.1 is kept: $L[y]=y^{(n)}+p_{n-1}(x)y^{(n-1)}+\dots+p_0(x)y$ in normal form, $D=d/dx$, $P(\lambda)$ the characteristic polynomial.

The Structure of the General Solution

📘 Definition 2.6 — Complementary function and particular integral
For $L[y]=r$ on $J$ (coefficients and $r$ continuous), the complementary function is the general solution $y_c=c_1y_1+\dots+c_ny_n$ of the homogeneous equation $L[y]=0$, built from a fundamental set. A particular integral (particular solution) is any single solution $y_p$ of $L[y]=r$, containing no arbitrary constants.
📐 Theorem 2.14 — General solution, superposition of forcing, initial value problems
  1. Every solution of $L[y]=r$ on $J$ is $y=y_c+y_p$ for exactly one choice of the constants in $y_c$; conversely every such function is a solution.
  2. Superposition of forcing. If $L[y_k]=r_k$ for $k=1,\dots,m$, then $L\left[\sum c_ky_k\right]=\sum c_kr_k$. A forcing term that is a sum may be treated term by term.
  3. For every $x_0\in J$ and $\eta\in\mathbb{R}^n$ there is exactly one solution with $\big(y(x_0),\dots,y^{(n-1)}(x_0)\big)=\eta$; its constants are found from the linear system $\sum_jc_j\,\Lambda_{x_0}y_j=\eta-\Lambda_{x_0}y_p$, whose matrix is the (invertible) Wronskian matrix at $x_0$.

Proof. (1) is Theorem 2.2(3) together with the uniqueness of coordinates in a basis (Theorem 2.5). (2) is linearity of $L$. (3) Existence and uniqueness is Theorem 2.1; writing the solution as $y_p+\sum c_jy_j$ and applying $\Lambda_{x_0}$ gives the system, which has a unique solution because $W(x_0)\ne0$ (Theorem 2.4). ∎

A consequence that is easy to forget: the particular integral is not unique. Two particular integrals differ by a solution of the homogeneous equation, so terms of $y_p$ that already occur in $y_c$ may be dropped (or added) freely. Different methods therefore often give different-looking — but equally correct — answers.

Undetermined Coefficients and Annihilators

For constant coefficients and a forcing term built from $x^k$, $e^{\alpha x}$, $\cos\beta x$ and $\sin\beta x$, the particular integral has the same shape as the forcing, up to a power of $x$ that measures resonance. The cleanest way to see this is through operators that kill the forcing.

📘 Definition 2.7 — Annihilator; the undetermined-coefficient class

A constant-coefficient operator $A(D)\ne0$ annihilates $r$ if $A(D)r=0$. By Theorem 2.8 the functions that have an annihilator are exactly the finite sums of terms $x^ke^{\alpha x}\cos\beta x$ and $x^ke^{\alpha x}\sin\beta x$ (including $x^k$ and $x^ke^{\alpha x}$) — the undetermined-coefficient (UC) class. Standard annihilators:

$r(x)$annihilator
polynomial of degree $k$$D^{k+1}$
$x^ke^{\alpha x}$$(D-\alpha)^{k+1}$
$x^ke^{\alpha x}\cos\beta x$ or $x^ke^{\alpha x}\sin\beta x$$\left((D-\alpha)^2+\beta^2\right)^{k+1}$

Functions such as $\sec x$, $\tan x$, $\log x$, $1/x$, $e^{x^2}$ are not in the class: their derivatives are not all combinations of finitely many functions.

📐 Theorem 2.15 — The method of undetermined coefficients
Let $P(D)$ have constant real coefficients and let $$r(x)=e^{\alpha x}\big(R_1(x)\cos\beta x+R_2(x)\sin\beta x\big),$$ with real polynomials $R_1,R_2$ of degree at most $k$ (take $R_2=0$ when $\beta=0$). Let $s\ge0$ be the multiplicity of $\mu=\alpha+i\beta$ as a root of $P$ ($s=0$ if $P(\mu)\ne0$). Then $P(D)y=r$ has a particular integral of the form $$y_p=x^s\,e^{\alpha x}\big(A_1(x)\cos\beta x+A_2(x)\sin\beta x\big),\qquad\deg A_1,\deg A_2\le k,$$ (with $A_2=0$ when $\beta=0$). The coefficients of $A_1,A_2$ are found by substitution and comparison of coefficients. For a sum of such terms, apply the rule to each term separately (Theorem 2.14(2)).

Proof. Let $A(\lambda)=\left((\lambda-\mu)(\lambda-\bar\mu)\right)^{k+1}$ (or $(\lambda-\alpha)^{k+1}$ if $\beta=0$); by Definition 2.7, $A(D)r=0$. Take any real solution $y^*$ of $P(D)y=r$ (Theorem 2.1). Then $A(D)P(D)y^*=A(D)r=0$, so $y^*$ solves the homogeneous equation with characteristic polynomial $AP$. In $AP$ the roots of $P$ other than $\mu,\bar\mu$ keep their multiplicities, while $\mu$ and $\bar\mu$ now have multiplicity $s+k+1$. By Theorem 2.8, the solution space of $A(D)P(D)y=0$ is the direct sum of $\ker P(D)$ (spanned by $x^je^{\lambda x}$ with $j$ below the multiplicity of $\lambda$ in $P$) and the span $V$ of $$x^je^{\mu x},\ x^je^{\bar\mu x}\qquad(s\le j\le s+k).$$ Both summands are closed under complex conjugation, so the real function $y^*$ splits as $y^*=h+v$ with real $h\in\ker P(D)$ and real $v\in V$. Then $P(D)v=P(D)y^*-P(D)h=r$, and a real element of $V$ is exactly $x^se^{\alpha x}(A_1\cos\beta x+A_2\sin\beta x)$ with $\deg A_i\le k$. ∎

The power $x^s$ is the mathematical signature of resonance: when the forcing frequency $\mu$ coincides with a natural frequency (a characteristic root), the naive guess $e^{\alpha x}(A_1\cos\beta x+A_2\sin\beta x)$ lies in $\ker P(D)$ and $P(D)$ maps it to $0$, so it cannot produce $r$; each extra coincidence costs one more factor $x$. In practice, the exponential shift rule (Theorem 2.7) often replaces the substitution: $P(D)[e^{\mu x}u]=e^{\mu x}P(D+\mu)u$ reduces the problem to polynomial $u$.

✏️ Example 1 — A double resonance and a harmless sine
Solve $y''-2y'+y=6xe^x+2\sin x$, $y(0)=0$, $y'(0)=0$.
$y_c$ $P(\lambda)=(\lambda-1)^2$: $y_c=(c_1+c_2x)e^x$.
$6xe^x$ $\mu=1$ is a double root ($s=2$) and $k=1$, so $y_p=x^2(Ax+B)e^x$. Faster with the shift rule: $P(D)[e^xu]=e^x(D+1-1)^2u=e^xu''$, so we need $u''=6x$, i.e. $u=x^3$ (no lower terms needed): $y_{p,1}=x^3e^x$.
$2\sin x$ $\mu=i$ is not a root ($s=0$): $y_{p,2}=A\cos x+B\sin x$. Then $y''-2y'+y=(-A-2B+A)\cos x+(-B+2A+B)\sin x=-2B\cos x+2A\sin x$. Comparing with $2\sin x$: $B=0$, $A=1$, so $y_{p,2}=\cos x$.
IVP $y=(c_1+c_2x)e^x+x^3e^x+\cos x$. $y(0)=c_1+1=0$ gives $c_1=-1$; $y'(0)=c_2+c_1+0-0=0$ gives $c_2=1$. $$y=(x^3+x-1)\,e^x+\cos x.$$ Check: $y(0)=-1+1=0$, and $y'=(x^3+3x^2+x)e^x-\sin x$ gives $y'(0)=0$.
✏️ Example 2 — Resonance decides boundedness
(a) Find the general solution of $y''+4y=8\sin2x+4x^2$. (b) Prove or disprove: for $\omega\gt0$, every solution of $y''+\omega^2y=\sin x$ is bounded on $[0,\infty)$ if and only if $\omega\ne1$.
(a) $8\sin2x$ $\mu=2i$ is a simple root of $\lambda^2+4$: $y_p=x(A\cos2x+B\sin2x)$. Substituting, $(x\,g)''=x\,g''+2g'$ and $g''=-4g$ for $g=A\cos2x+B\sin2x$, so $y_p''+4y_p=2g'=-4A\sin2x+4B\cos2x$. Hence $A=-2$, $B=0$: $y_p=-2x\cos2x$.
(a) $4x^2$ $\mu=0$ is not a root: $y_p=ax^2+bx+c$, $2a+4(ax^2+bx+c)=4x^2$ gives $a=1$, $b=0$, $c=-\tfrac12$. So $$y=c_1\cos2x+c_2\sin2x-2x\cos2x+x^2-\tfrac12.$$
(b) $\omega\ne1$ $\mu=i$ is not a root of $\lambda^2+\omega^2$: $y_p=\dfrac{\sin x}{\omega^2-1}$, and $y=c_1\cos\omega x+c_2\sin\omega x+\dfrac{\sin x}{\omega^2-1}$ is bounded.
(b) $\omega=1$ Now $s=1$: $y_p=-\tfrac{x}{2}\cos x$ (check: $(-\tfrac x2\cos x)''=\sin x+\tfrac x2\cos x$). Every solution is $c_1\cos x+c_2\sin x-\tfrac x2\cos x$, and at $x=2k\pi$ it equals $c_1-k\pi\to-\infty$: every solution is unbounded. So the statement is true. Note that the homogeneous solutions are bounded and the forcing is bounded — unboundedness comes only from the coincidence of frequencies (Interactive 1).
Interactive 1 — Forced Oscillations: Transient, Steady State and Resonance

Left: the solution of $y''+cy'+y=\cos\omega x$ with $y(0)=y'(0)=0$ (solid, computed by RK4) and the particular integral $y_p=A\cos\omega x+B\sin\omega x$ given by undetermined coefficients (dashed). The difference is the complementary function, which dies out when $c\gt0$. Right: the amplitude $\sqrt{A^2+B^2}$ of $y_p$ as a function of $\omega$. Press Play to sweep the forcing frequency, or press Resonance for $c=0$, $\omega=1$, where $i\omega$ is a characteristic root and $y_p=\tfrac{x}{2}\sin x$.

0.700.15
particular integral—
amplitude of y_p—
max |y| on [0, 60]—
complementary part—

Variation of Parameters

Undetermined coefficients fails for $y''+y=\sec x$ and is unavailable for variable coefficients. Lagrange's method works for every continuous forcing once a fundamental set is known: we let the constants of $y_c$ vary.

📐 Theorem 2.16 — Variation of parameters
Let $p_0,\dots,p_{n-1},r$ be continuous on $J$, let $y_1,\dots,y_n$ be a fundamental set of $L[y]=0$ with Wronskian $W$, and fix $x_0\in J$.
  1. Second order. For $y''+p(x)y'+q(x)y=r(x)$, $$y_p(x)=-y_1(x)\int_{x_0}^{x}\frac{y_2(t)\,r(t)}{W(t)}\,dt+y_2(x)\int_{x_0}^{x}\frac{y_1(t)\,r(t)}{W(t)}\,dt$$ is the solution with $y_p(x_0)=y_p'(x_0)=0$. Equivalently $$y_p(x)=\int_{x_0}^{x}K(x,t)\,r(t)\,dt,\qquad K(x,t)=\frac{y_1(t)y_2(x)-y_1(x)y_2(t)}{W(t)}.$$
  2. Order $n$. $$y_p(x)=\sum_{k=1}^{n}y_k(x)\int_{x_0}^{x}\frac{W_k(t)}{W(t)}\,r(t)\,dt,$$ where $W_k$ is the determinant obtained from the Wronskian matrix by replacing its $k$-th column with $(0,\dots,0,1)^T$; it is the solution with $y_p^{(j)}(x_0)=0$ for $j\lt n$.
  3. The kernel. For each fixed $t\in J$, $x\mapsto K(x,t)$ is the solution of the homogeneous equation with $K(t,t)=0$, $\partial_xK(t,t)=1$ (for order $n$: derivatives $0,\dots,0,1$ at $x=t$); it does not depend on the choice of fundamental set. For constant coefficients $K(x,t)=k(x-t)$, where $k$ is the solution with $k(0)=0$, $k'(0)=1$.
The formulas require the equation in normal form: $r$ is the right-hand side after division by the leading coefficient.

Proof. (1) Look for $y=u_1y_1+u_2y_2$ with $C^1$ functions $u_1,u_2$ subject to the extra condition $u_1'y_1+u_2'y_2=0$. Then $y'=u_1y_1'+u_2y_2'$ (no derivatives of $u_i$ appear), and $$y''=u_1y_1''+u_2y_2''+u_1'y_1'+u_2'y_2'.$$ Since $y_i''+py_i'+qy_i=0$, we get $y''+py'+qy=u_1'y_1'+u_2'y_2'$. So $y$ solves the equation provided $$\begin{pmatrix}y_1&y_2\\y_1'&y_2'\end{pmatrix}\begin{pmatrix}u_1'\\u_2'\end{pmatrix}=\begin{pmatrix}0\\r\end{pmatrix}.$$ The matrix has determinant $W(x)\ne0$ (Theorem 2.4), and Cramer's rule gives $u_1'=-y_2r/W$, $u_2'=y_1r/W$, continuous functions. Choose $u_i(x)=\int_{x_0}^x u_i'$. Then $u_i\in C^1$, the computation above is legitimate (and shows $y\in C^2$), and $y(x_0)=0$, $y'(x_0)=u_1(x_0)y_1'(x_0)+u_2(x_0)y_2'(x_0)=0$. Writing both integrals under one sign gives the kernel form.

(2) By the reduction of §1.3, $u=(y,\dots,y^{(n-1)})^T$ satisfies $u'=C(x)u+r(x)e_n$, and the Wronskian matrix $\Phi$ of $y_1,\dots,y_n$ is a fundamental matrix of the homogeneous companion system. The variation-of-parameters (Duhamel) formula for systems (§1.3) gives the solution with $u(x_0)=0$: $u(x)=\Phi(x)\int_{x_0}^x\Phi(t)^{-1}e_n\,r(t)\,dt$. By Cramer's rule, the $k$-th entry of $\Phi^{-1}e_n$ is $W_k/W$. The first component of $u$ is $y_p=\sum_ky_k\int_{x_0}^x(W_k/W)\,r$.

(3) $K(x,t)$ is a combination of $y_1(x),y_2(x)$ with coefficients depending on $t$, hence a solution in $x$; $K(t,t)=0$ and $\partial_xK(x,t)=\dfrac{y_1(t)y_2'(x)-y_1'(x)y_2(t)}{W(t)}$ equals $1$ at $x=t$. These two conditions determine $K(\cdot,t)$ uniquely (Theorem 2.1), whatever fundamental set is used. For constant coefficients, $x\mapsto k(x-t)$ solves the same equation with the same data at $x=t$ (translation invariance), so $K(x,t)=k(x-t)$. ∎

Formula (3) is Duhamel's principle: $K(x,t)$ is the response at time $x$ to a unit impulse delivered at time $t$, and $y_p$ superposes the responses to the impulses $r(t)\,dt$. For $y''+\omega^2y=r$ it reads $y_p=\dfrac1\omega\int_{x_0}^x\sin\omega(x-t)\,r(t)\,dt$. Imposing two-point boundary conditions instead of initial conditions turns the same construction into the Green's function of §2.4.

🧭 Problem-solving strategy — choosing and running a method
  1. Normal form first. Divide by the leading coefficient; note the intervals where the coefficients are continuous.
  2. Find $y_c$ (characteristic roots, Euler substitution, a guessed solution plus reduction of order).
  3. Choose the method for $y_p$. Constant coefficients and $r$ in the UC class: undetermined coefficients with the factor $x^s$, or the operator rules below. Anything else ($\sec x$, $\log x$, $e^x/x$, variable coefficients): variation of parameters.
  4. Variation of parameters, second order: compute $W$; then $u_1=-\int y_2r/W$, $u_2=\int y_1r/W$; constants of integration may be dropped (they only add to $y_c$).
  5. Initial conditions last, on the full $y_c+y_p$; and check $y_p$ by substitution.
✏️ Example 3 — $y''+y=\sec x$
Solve $y''+y=\sec x$, $y(0)=1$, $y'(0)=0$ on $\left(-\tfrac{\pi}{2},\tfrac{\pi}{2}\right)$.
Setup $y_1=\cos x$, $y_2=\sin x$, $W=\cos^2x+\sin^2x=1$; $\sec x$ is continuous on $\left(-\tfrac\pi2,\tfrac\pi2\right)$ and not in the UC class.
Integrals $u_1=-\int\sin x\sec x\,dx=-\int\tan x\,dx=\log\cos x$ (since $\cos x\gt0$), and $u_2=\int\cos x\sec x\,dx=x$. So $$y_p=\cos x\,\log\cos x+x\sin x.$$
IVP $y=c_1\cos x+c_2\sin x+\cos x\log\cos x+x\sin x$. Since $y_p(0)=0$ and $y_p'=-\sin x\log\cos x-\sin x+\sin x+x\cos x$ vanishes at $0$, the data give $c_1=1$, $c_2=0$: $$y=\cos x\,(1+\log\cos x)+x\sin x.$$
Remark As $x\to\pm\tfrac\pi2$ the forcing blows up, but $y$ stays bounded ($\cos x\log\cos x\to0$): the interval of existence is still the whole of $\left(-\tfrac\pi2,\tfrac\pi2\right)$, as Theorem 2.1 promises.
✏️ Example 4 — Variable coefficients, and the normal-form trap
Find the general solution of $x^2y''-2xy'+2y=x^3e^x$ on $(0,\infty)$. What goes wrong if the right-hand side $x^3e^x$ is used in the formula without dividing by $x^2$?
$y_c$ Euler equation: $Q(r)=r(r-1)-2r+2=(r-1)(r-2)$, so $y_1=x$, $y_2=x^2$, $W=x\cdot2x-1\cdot x^2=x^2$.
Normal form $y''-\tfrac2xy'+\tfrac2{x^2}y=xe^x$, so $r=xe^x$.
Integrals $u_1=-\int\dfrac{x^2\cdot xe^x}{x^2}dx=-\int xe^x\,dx=-(x-1)e^x$ and $u_2=\int\dfrac{x\cdot xe^x}{x^2}dx=e^x$. Hence $y_p=-x(x-1)e^x+x^2e^x=xe^x$ and $$y=c_1x+c_2x^2+xe^x.$$ Check: $(xe^x)'=(x+1)e^x$, $(xe^x)''=(x+2)e^x$, and $x^2(x+2)e^x-2x(x+1)e^x+2xe^x=x^3e^x$. ✓
The trap With $r=x^3e^x$ the same steps produce $u_1=-\int x^3e^x$, $u_2=\int x^2e^x$ and a function $x\cdot\big(x^2\text{-times too large}\big)$ — it solves $y''-\tfrac2xy'+\tfrac2{x^2}y=x^3e^x$, a different equation. The derivation of Theorem 2.16 used $y''+py'+qy=u_1'y_1'+u_2'y_2'$, which holds only when the coefficient of $y''$ is $1$.
Interactive 2 — Variation of Parameters as a Sum of Impulse Responses

For $y''+y=r(x)$, $y(0)=y'(0)=0$, Theorem 2.16 gives $y_p(x)=\int_0^x\sin(x-t)\,r(t)\,dt$: each slice $r(t)\,dt$ of the forcing (top strip) launches a small sine wave $r(t)\,dt\cdot\sin(x-t)$ (thin curves) and $y_p$ is their sum. Press Play to switch the forcing on up to time $T$: the thick curve is the response to the forcing on $[0,T]$, computed with $u_1=-\int\sin t\,r$, $u_2=\int\cos t\,r$. It agrees with the exact $y_p$ (dashed) up to $x=T$ and continues as a free oscillation afterwards.

—
T—
y at x = T (formula of Thm 2.16)—
exact y_p(T)—
|difference|—

Operator Methods: $1/f(D)$

For constant coefficients the shift rule gives quick formulas for a particular integral. We write $\dfrac{1}{f(D)}\,r$ for a particular integral of $f(D)y=r$ produced by the rules below; the notation is a bookkeeping device, not an inverse operator (pitfall 5).

📐 Theorem 2.17 — Operator rules for particular integrals
Let $f$ be a polynomial with constant coefficients.
  1. Exponentials. If $f(a)\ne0$: $\ \dfrac{1}{f(D)}e^{ax}=\dfrac{e^{ax}}{f(a)}$. If $a$ is a root of multiplicity $s$: $\ \dfrac{1}{f(D)}e^{ax}=\dfrac{x^se^{ax}}{f^{(s)}(a)}$.
  2. Sines and cosines. If $f(D)=g(D^2)$ and $g(-a^2)\ne0$: $\ \dfrac{1}{g(D^2)}\sin ax=\dfrac{\sin ax}{g(-a^2)}$, and likewise for $\cos ax$. In the resonant case $$\frac{1}{D^2+a^2}\sin ax=-\frac{x}{2a}\cos ax,\qquad\frac{1}{D^2+a^2}\cos ax=\frac{x}{2a}\sin ax.$$ (If $f$ contains odd powers of $D$, replace $D^2$ by $-a^2$ and rationalise, or use $e^{iax}$ and take real or imaginary parts.)
  3. Polynomials. If $f(0)\ne0$ and $R$ is a polynomial of degree $m$, expand $\dfrac{1}{f(\lambda)}=c_0+c_1\lambda+\dots+c_m\lambda^m+O(\lambda^{m+1})$; then $\dfrac{1}{f(D)}R=(c_0+c_1D+\dots+c_mD^m)R$. If $f(\lambda)=\lambda^sg(\lambda)$ with $g(0)\ne0$, apply the rule to $g$ and integrate $s$ times.
  4. Exponential shift. $\dfrac{1}{f(D)}\big(e^{ax}V\big)=e^{ax}\,\dfrac{1}{f(D+a)}V$.

Proof. (1) If $f(a)\ne0$, $f(D)e^{ax}=f(a)e^{ax}$ (Theorem 2.7). If $a$ has multiplicity $s$, write $f(\lambda+a)=\lambda^sh(\lambda)$; Taylor's formula gives $h(0)=f^{(s)}(a)/s!\ne0$. By the shift rule $$f(D)\big[x^se^{ax}\big]=e^{ax}f(D+a)x^s=e^{ax}h(D)D^sx^s=e^{ax}h(D)\,s!=s!\,h(0)\,e^{ax}=f^{(s)}(a)\,e^{ax},$$ because $h(D)$ applied to a constant multiplies it by $h(0)$. (2) $D^2\sin ax=-a^2\sin ax$, so $g(D^2)\sin ax=g(-a^2)\sin ax$. The resonant formulas are checked directly: with $y=-\frac{x}{2a}\cos ax$, $y''=\sin ax+\frac{ax}{2}\cos ax$, so $y''+a^2y=\sin ax$; similarly for the cosine. (3) Let $S(\lambda)=c_0+\dots+c_m\lambda^m$; then $f(\lambda)S(\lambda)=1+\lambda^{m+1}T(\lambda)$ for a polynomial $T$, so $f(D)S(D)R=R+T(D)D^{m+1}R=R$ since $D^{m+1}R=0$. If $f=\lambda^sg$ and $g(D)w=R$, then any $v$ with $D^sv=w$ satisfies $f(D)v=g(D)D^sv=R$. (4) If $f(D+a)w=V$, then $f(D)[e^{ax}w]=e^{ax}f(D+a)w=e^{ax}V$. ∎

✏️ Example 5 — Three operator rules at once
Find a particular integral of $(D^2-3D+2)\,y=e^{2x}+x^2+\sin x$, and write down the general solution.
$e^{2x}$ $f(\lambda)=\lambda^2-3\lambda+2=(\lambda-1)(\lambda-2)$, $f(2)=0$, $f'(\lambda)=2\lambda-3$, $f'(2)=1$: $\dfrac{1}{f(D)}e^{2x}=xe^{2x}$.
$x^2$ $\dfrac{1}{2-3\lambda+\lambda^2}=\dfrac12\cdot\dfrac{1}{1-u}$ with $u=\tfrac{3\lambda-\lambda^2}{2}$, and $\dfrac1{1-u}=1+u+u^2+\cdots$. Up to $\lambda^2$: $u=\tfrac32\lambda-\tfrac12\lambda^2$, $u^2=\tfrac94\lambda^2+\cdots$, so $\dfrac1{f(\lambda)}=\dfrac12+\dfrac34\lambda+\dfrac78\lambda^2+\cdots$. Hence $$\frac{1}{f(D)}x^2=\frac{x^2}{2}+\frac34\cdot2x+\frac78\cdot2=\frac{x^2}{2}+\frac{3x}{2}+\frac74.$$
$\sin x$ Replace $D^2$ by $-1$: $\dfrac{1}{1-3D}\sin x=\dfrac{1+3D}{1-9D^2}\sin x=\dfrac{(1+3D)\sin x}{1+9}=\dfrac{\sin x+3\cos x}{10}$. (Check: for $y=\tfrac{\sin x+3\cos x}{10}$, $y''-3y'+2y=\tfrac{1}{10}\left[(-1+9+2)\sin x+(-3-3+6)\cos x\right]=\sin x$.)
Result $$y=c_1e^x+c_2e^{2x}+xe^{2x}+\frac{x^2}{2}+\frac{3x}{2}+\frac74+\frac{\sin x+3\cos x}{10}.$$ Check of the polynomial part: $1-3\left(x+\tfrac32\right)+x^2+3x+\tfrac72=x^2$. ✓

Series Solutions: Ordinary Points, Frobenius, Legendre and Bessel

Most second-order equations with variable coefficients have no solutions in elementary functions. When the coefficients are analytic, however, the solutions are analytic too and can be computed as power series; near certain singular points they are power series multiplied by $x^r$ (and possibly $\log x$). We write the equation as $y''+P(x)y'+Q(x)y=0$.

📘 Definition 2.8 — Ordinary, regular singular and irregular singular points
A point $x_0$ is an ordinary point of $y''+P(x)y'+Q(x)y=0$ if $P$ and $Q$ are analytic at $x_0$ (equal to convergent power series in $x-x_0$ near $x_0$); otherwise it is a singular point. A singular point is regular if $(x-x_0)P(x)$ and $(x-x_0)^2Q(x)$ are analytic at $x_0$, and irregular otherwise. For $a_2(x)y''+a_1(x)y'+a_0(x)y=0$ with polynomial coefficients without common factor, $x_0$ is ordinary iff $a_2(x_0)\ne0$. At a regular singular point $x_0=0$, with $xP(x)=\sum p_kx^k$ and $x^2Q(x)=\sum q_kx^k$, the indicial equation is $$F(r)=r(r-1)+p_0r+q_0=0.$$
📐 Theorem 2.18 — Power series solutions at an ordinary point
Let $P$ and $Q$ be given by power series in $x-x_0$ that converge for $|x-x_0|\lt R$. Then every solution of $y''+Py'+Qy=0$ on $(x_0-R,x_0+R)$ is analytic: $y=\sum_{k\ge0}a_k(x-x_0)^k$ with the series converging for $|x-x_0|\lt R$. The coefficients $a_0=y(x_0)$ and $a_1=y'(x_0)$ are arbitrary and the others are determined by a recurrence. In particular the radius of convergence is at least the distance from $x_0$ to the nearest singular point of $P$ or $Q$ in the complex plane.

Proof (sketch). Formal solution. Write $P=\sum p_k(x-x_0)^k$, $Q=\sum q_k(x-x_0)^k$ and substitute $y=\sum a_k(x-x_0)^k$. Collecting the coefficient of $(x-x_0)^k$: $$(k+2)(k+1)\,a_{k+2}=-\sum_{j=0}^{k}\Big[(j+1)\,a_{j+1}\,p_{k-j}+a_j\,q_{k-j}\Big],$$ which determines $a_2,a_3,\dots$ from $a_0,a_1$. Convergence (Cauchy's method of majorants). Fix $0\lt\rho\lt R$. The terms of a convergent series are bounded, so $|p_k|,|q_k|\le M\rho^{-k}$ for some $M\gt0$. Let $b_0\ge|a_0|$, $b_1\ge|a_1|$ be positive and define $$(k+2)(k+1)\,b_{k+2}=M\sum_{j=0}^{k}\Big[(j+1)\,b_{j+1}+b_j\Big]\rho^{-(k-j)}.$$ By induction, $|a_k|\le b_k$ for all $k$. Subtracting $\rho^{-1}$ times the relation for $k-1$ from the relation for $k$ telescopes the sum: $$(k+2)(k+1)\,b_{k+2}=\tfrac{1}{\rho}(k+1)k\,b_{k+1}+M\big[(k+1)b_{k+1}+b_k\big].$$ The $j=k-1$ term of the relation for $k-1$ gives $(k+1)k\,b_{k+1}\ge Mk\,b_k$, so $b_k/b_{k+1}\le(k+1)/M$, and dividing the last identity by $(k+2)(k+1)b_{k+1}$ shows $b_{k+2}/b_{k+1}\to1/\rho$. By the ratio test $\sum b_k|x-x_0|^k$ converges for $|x-x_0|\lt\rho$, hence so does $\sum a_k(x-x_0)^k$. Since $\rho\lt R$ was arbitrary, the radius is at least $R$. It is the solution. A convergent power series may be differentiated termwise, so the sum solves the equation; by uniqueness (Theorem 2.1) it is the solution with data $a_0,a_1$, and every solution arises this way. Finally, a function analytic in a disc of the complex plane has a Taylor series converging in that disc, which explains the complex distance. ∎

📘 Definition 2.9 — Legendre's and Bessel's equations

Legendre's equation of order $\nu$ is $(1-x^2)y''-2xy'+\nu(\nu+1)y=0$. For $\nu=n\in\{0,1,2,\dots\}$ the Legendre polynomial $P_n$ is its polynomial solution of degree $n$ normalised by $P_n(1)=1$: $P_0=1$, $P_1=x$, $P_2=\tfrac12(3x^2-1)$, $P_3=\tfrac12(5x^3-3x)$.

Bessel's equation of order $\nu\ge0$ is $x^2y''+xy'+(x^2-\nu^2)y=0$. The Bessel function of the first kind of order $\nu$ is $$J_\nu(x)=\sum_{k=0}^{\infty}\frac{(-1)^k}{k!\,\Gamma(k+\nu+1)}\left(\frac{x}{2}\right)^{2k+\nu},$$ and $J_{-\nu}$ is defined by the same series with $\nu$ replaced by $-\nu$ (terms with $\Gamma$ at a pole are $0$).

📐 Theorem 2.19 — Frobenius' theorem at a regular singular point
Let $x_0=0$ be a regular singular point, with $xP(x)=\sum p_kx^k$ and $x^2Q(x)=\sum q_kx^k$ convergent for $|x|\lt R$, and let $r_1,r_2$ be the roots of the indicial equation, labelled so that $\operatorname{Re}r_1\ge\operatorname{Re}r_2$. Then on $0\lt x\lt R$:
  1. $y_1=x^{r_1}\sum_{k\ge0}a_kx^k$ ($a_0=1$) is a solution;
  2. if $r_1-r_2\notin\mathbb{Z}$: $y_2=x^{r_2}\sum_{k\ge0}b_kx^k$ ($b_0=1$) is a second, independent solution;
  3. if $r_1=r_2$: $y_2=y_1\log x+x^{r_1}\sum_{k\ge1}b_kx^k$ — a logarithm always appears;
  4. if $r_1-r_2=N\in\mathbb{N}$: $y_2=c\,y_1\log x+x^{r_2}\sum_{k\ge0}b_kx^k$ ($b_0=1$), where the constant $c$ may or may not be zero.
All the series converge for $|x|\lt R$; on $-R\lt x\lt0$ replace $x^r$ by $|x|^r$ and $\log x$ by $\log|x|$.

Proof (sketch). Substituting $y=x^r\sum a_kx^k$ and collecting the coefficient of $x^{r+k}$ gives $$F(r+k)\,a_k=-\sum_{j=0}^{k-1}\Big[(r+j)\,p_{k-j}+q_{k-j}\Big]a_j\qquad(k\ge1),$$ and $F(r)a_0=0$ for $k=0$, which is why $r$ must be an indicial root. For $r=r_1$, $F(r_1+k)\ne0$ for all $k\ge1$ (its roots are $r_1$ and $r_2$, and $r_1+k=r_2$ would contradict $\operatorname{Re}r_1\ge\operatorname{Re}r_2$), so all $a_k$ are determined: (1). For $r=r_2$ the only possible obstruction is $F(r_2+k)=0$, i.e. $k=r_1-r_2$, which happens only in case (4); otherwise (2) follows the same way. Convergence is proved with majorants as in Theorem 2.18. In case (3) the solution $y(x,r)$ built with general $r$ satisfies $L[y(x,r)]=F(r)x^r=(r-r_1)^2x^r$, so $\partial_ry(x,r)\big|_{r=r_1}$ is a solution — differentiating $x^r$ in $r$ produces the term $y_1\log x$. In case (4) reduction of order (Theorem 2.6) applied to $y_1$ gives the stated form, the logarithm coming from a term $c/x$ in the integrand; it is absent precisely when the recurrence for $r_2$ happens to be consistent at $k=N$. Independence follows from the different leading behaviours $x^{r_1}$ and $x^{r_2}$ (or the $\log$). ∎

📐 Theorem 2.20 — Legendre polynomials and Bessel functions (statement level)

Legendre. (a) $x=0$ is an ordinary point and $x=\pm1$ are regular singular points; the series solutions about $0$ converge for $|x|\lt1$, with recurrence $$a_{k+2}=\frac{(k-\nu)(k+\nu+1)}{(k+1)(k+2)}\,a_k.$$ (b) For $\nu=n\in\{0,1,2,\dots\}$ one of the two series terminates, giving $P_n$; Rodrigues' formula $P_n(x)=\dfrac{1}{2^nn!}\dfrac{d^n}{dx^n}(x^2-1)^n$; generating function $(1-2xt+t^2)^{-1/2}=\sum_{n\ge0}P_n(x)t^n$; $P_n(1)=1$, $P_n(-x)=(-1)^nP_n(x)$; recurrence $(n+1)P_{n+1}=(2n+1)xP_n-nP_{n-1}$; orthogonality $$\int_{-1}^{1}P_mP_n\,dx=\frac{2}{2n+1}\,\delta_{mn}.$$ (c) The second solution $Q_n$ is unbounded near $x=\pm1$ (logarithmically); Legendre's equation has a nonzero solution bounded on $(-1,1)$ only when $\nu(\nu+1)=n(n+1)$ for some integer $n\ge0$, and then it is a multiple of $P_n$.

Bessel. (d) $x=0$ is a regular singular point with indicial roots $\pm\nu$; $J_\nu$ is a solution on $(0,\infty)$. If $\nu\notin\mathbb{Z}$, $\{J_\nu,J_{-\nu}\}$ is a fundamental set (even when $2\nu$ is an odd integer, e.g. $J_{\pm1/2}(x)=\sqrt{\tfrac{2}{\pi x}}\,\sin x$, $\sqrt{\tfrac{2}{\pi x}}\,\cos x$). If $\nu=n\in\mathbb{Z}$, $J_{-n}=(-1)^nJ_n$, and a second solution $Y_n$ contains $J_n\log x$ and is unbounded as $x\to0^+$. (e) $\dfrac{d}{dx}\big(x^\nu J_\nu\big)=x^\nu J_{\nu-1}$, $\dfrac{d}{dx}\big(x^{-\nu}J_\nu\big)=-x^{-\nu}J_{\nu+1}$, hence $J_{\nu-1}+J_{\nu+1}=\dfrac{2\nu}{x}J_\nu$, $J_{\nu-1}-J_{\nu+1}=2J_\nu'$, and $J_0'=-J_1$; generating function $\exp\!\left(\tfrac{x}{2}\left(t-\tfrac1t\right)\right)=\sum_{n\in\mathbb{Z}}J_n(x)t^n$. (f) Each $J_\nu$ has infinitely many positive zeros, all simple; the gaps between consecutive zeros tend to $\pi$ (§2.1, normal form), and the positive zeros of $J_\nu$ and $J_{\nu+1}$ interlace.

Proof of selected parts. (a) Substituting $y=\sum a_kx^k$ into Legendre's equation, the coefficient of $x^k$ is $(k+2)(k+1)a_{k+2}-\big[k(k-1)+2k-\nu(\nu+1)\big]a_k$, and $k(k+1)-\nu(\nu+1)=(k-\nu)(k+\nu+1)$. The singular points of $P=\frac{-2x}{1-x^2}$, $Q=\frac{\nu(\nu+1)}{1-x^2}$ are $\pm1$, at distance $1$ (Theorem 2.18). (b) If $\nu=n$, the factor $k-n$ kills $a_{n+2}$ and all later coefficients of the same parity as $n$. (d) The indicial equation of Bessel's equation is $r^2-\nu^2=0$; with $y=\sum a_kx^{k+\nu}$ the recurrence is $k(k+2\nu)a_k=-a_{k-2}$, so $a_1=0$, odd coefficients vanish and $a_{2m}=\dfrac{(-1)^ma_0}{2^{2m}m!\,(\nu+1)\cdots(\nu+m)}$; the choice $a_0=\dfrac1{2^\nu\Gamma(\nu+1)}$ gives $J_\nu$. (e) Termwise: $x^\nu J_\nu=\sum\dfrac{(-1)^kx^{2k+2\nu}}{2^{2k+\nu}k!\,\Gamma(k+\nu+1)}$, and differentiating $x^{2k+2\nu}$ produces $2(k+\nu)$, which cancels against $\Gamma(k+\nu+1)=(k+\nu)\Gamma(k+\nu)$, leaving $x^\nu J_{\nu-1}$. The other identities follow by expanding the two derivatives and adding or subtracting. The remaining statements (Rodrigues, generating functions, orthogonality, unboundedness of $Q_n$ and $Y_n$) are standard and are explored in Exercises IV.6–IV.8 and in §2.3, where orthogonality is derived from the Sturm–Liouville form $\big((1-x^2)y'\big)'+\nu(\nu+1)y=0$. ∎

✏️ Example 6 — Frobenius with non-integer difference of roots
Find two independent Frobenius solutions of $2xy''+y'-y=0$ on $(0,\infty)$ and identify them in closed form.
Type of point $P=\tfrac{1}{2x}$, $Q=-\tfrac1{2x}$: $xP=\tfrac12$ and $x^2Q=-\tfrac x2$ are analytic, so $0$ is a regular singular point with $p_0=\tfrac12$, $q_0=0$. Indicial equation: $r(r-1)+\tfrac12r=r\left(r-\tfrac12\right)=0$, roots $r_1=\tfrac12$, $r_2=0$; the difference $\tfrac12\notin\mathbb{Z}$, so case (2) applies — no logarithm.
Recurrence With $y=\sum a_kx^{k+r}$: $2xy''+y'=\sum(k+r)(2k+2r-1)a_kx^{k+r-1}$ and $y=\sum a_{k-1}x^{k+r-1}$, so $$(k+r)(2k+2r-1)\,a_k=a_{k-1}\qquad(k\ge1).$$
$r=0$ $a_k=\dfrac{a_{k-1}}{k(2k-1)}$: $y_2=1+x+\dfrac{x^2}{6}+\dfrac{x^3}{90}+\cdots$. Since $\dfrac{2^k}{(2k)!}\Big/\dfrac{2^{k-1}}{(2k-2)!}=\dfrac{2}{2k(2k-1)}=\dfrac1{k(2k-1)}$, $a_k=\dfrac{2^k}{(2k)!}$ and $$y_2=\sum_{k\ge0}\frac{(2x)^k}{(2k)!}=\cosh\sqrt{2x}.$$
$r=\tfrac12$ $a_k=\dfrac{a_{k-1}}{k(2k+1)}$, so $a_k=\dfrac{2^k}{(2k+1)!}$ and $$y_1=x^{1/2}\sum_{k\ge0}\frac{2^kx^k}{(2k+1)!}=\frac{\sinh\sqrt{2x}}{\sqrt2}.$$ Both series converge for all $x$ ($R=\infty$, as $xP$ and $x^2Q$ are polynomials). The general solution on $(0,\infty)$ is $A\cosh\sqrt{2x}+B\sinh\sqrt{2x}$ — which the substitution $x=s^2/2$ would also reveal.
✏️ Example 7 — Prove or disprove: Legendre's equation with $n=2$
For $(1-x^2)y''-2xy'+6y=0$ decide: (a) there is a polynomial solution; (b) every solution is a polynomial; (c) every power-series solution about $0$ converges at least on $(-1,1)$; (d) every solution is bounded on $(-1,1)$.
(a) True With $\nu=2$, $a_{k+2}=\dfrac{(k-2)(k+3)}{(k+1)(k+2)}a_k$. Even part: $a_2=-3a_0$, $a_4=0$, so $a_0(1-3x^2)=-2a_0P_2$. Check: for $P_2=\tfrac12(3x^2-1)$, $(1-x^2)\cdot3-2x\cdot3x+3(3x^2-1)=0$.
(b) False Odd part: $a_3=-\tfrac23a_1$, $a_5=\tfrac{1\cdot6}{4\cdot5}a_3=-\tfrac15a_1$, $a_7=\tfrac{3\cdot8}{6\cdot7}a_5=-\tfrac4{35}a_1,\dots$; the factor $k-2$ never vanishes for odd $k$, so the series $x-\tfrac23x^3-\tfrac15x^5-\tfrac4{35}x^7-\cdots$ does not terminate. It is not a polynomial.
(c) True The singular points of $P,Q$ are $\pm1$ (Theorem 2.18); also $a_{k+2}/a_k\to1$, so the radius is exactly $1$ for the odd series.
(d) False On $\left(\tfrac1{\sqrt3},1\right)$, where $P_2\ne0$, reduction of order gives a second solution $y_2=P_2\displaystyle\int_{1/\sqrt3+\epsilon}^{x}\frac{ds}{(1-s^2)P_2(s)^2}$ (Theorem 2.6, with $e^{-\int P}=\frac1{1-x^2}$ as in §2.1, Example 2). Near $s=1$ the integrand behaves like $\frac{1}{2(1-s)}$, so the integral tends to $+\infty$ while $P_2\to1$: $y_2\to\infty$ as $x\to1^-$. Every solution that is not a multiple of $P_2$ is $c_1P_2+c_2y_2$ with $c_2\ne0$, hence unbounded. (In fact the odd series above equals $-\tfrac12Q_2$, with $Q_2=\tfrac14(3x^2-1)\log\frac{1+x}{1-x}-\tfrac32x$.)
⚠️ Counterexamples and pitfalls
  1. Variation of parameters needs the normal form. For $x^2y''-2xy'+2y=x^3e^x$ the forcing in the formula is $xe^x$, not $x^3e^x$ (Example 4); for $x^2y''+xy'-y=x^2$ it is $1$, giving $y_p=\tfrac{x^2}{3}$.
  2. Undetermined coefficients is for constant coefficients and UC forcing only. $y''+y=\sec x$, $y''+y=\log x$, $y''-2y'+y=e^x/x$, or any Euler equation with forcing $x^2$ written in $x$ — use variation of parameters (or, for Euler equations, first substitute $x=e^t$).
  3. Resonance needs the factor $x^s$. $y''+y=\sin x$: $A\cos x+B\sin x$ fails; $y_p=-\tfrac x2\cos x$. $y''-2y'+y=e^x$: even $Axe^x$ fails ($s=2$); $y_p=\tfrac12x^2e^x$.
  4. Bounded forcing and bounded free motion do not give bounded solutions. All solutions of $y''+y=\sin x$ are unbounded; with damping ($y''+cy'+y=r$, $c\gt0$) every solution is bounded when $r$ is (Exercise II.7).
  5. $1/f(D)$ is not an inverse. $f(D)\left[\tfrac1{f(D)}r\right]=r$, but $\tfrac1{f(D)}\left[f(D)y\right]$ recovers $y$ only up to an element of $\ker f(D)$: $\tfrac1D(D\,1)=\tfrac1D0=0\ne1$.
  6. The rule $D^2\to-a^2$ fails at resonance. $\tfrac{1}{D^2+4}\cos2x$ is not $\tfrac{\cos2x}{0}$ but $\tfrac x4\sin2x$; and for $f$ with odd powers of $D$ one must rationalise ($\tfrac1{1-3D}\sin x=\tfrac{\sin x+3\cos x}{10}$).
  7. Particular integrals are not unique. $xe^x\log x$ and $xe^x(\log x-1)$ are both particular integrals of $y''-2y'+y=e^x/x$; they differ by $-xe^x\in y_c$.
  8. An integer difference of indicial roots does not force a logarithm. Bessel of order $\tfrac12$: roots $\pm\tfrac12$ differ by $1$, but $x^{-1/2}\cos x$ and $x^{-1/2}\sin x$ are both Frobenius series. Equal roots always give a logarithm (Bessel of order $0$).
  9. Radius of convergence: look in $\mathbb{C}$. $(1+x^2)y''+y=0$ has no real singular point, yet its series about $0$ have radius $1$, because of $\pm i$.
  10. Ordinary vs. regular singular: check the right powers. For $x^3y''+y=0$, $x^2Q=\tfrac1x$ is not analytic: $0$ is an irregular singular point and Frobenius does not apply. For $x^2y''+xy'+y=0$ it is regular.
  11. Not every solution of Legendre's equation is a polynomial, even for integer $n$; and for non-integer $\nu$ no nonzero solution is bounded on $(-1,1)$.

Exercises

I
Undetermined coefficients and annihilators.
  • 1 Find a particular integral of $y''-y'-2y=4x^2$.
  • 2 Find a particular integral of $y''+2y'+5y=10\cos x$.
  • 3 Find a particular integral of $y'''-y'=e^x+1$.
  • 4 Write down, without computing the coefficients, the form of a particular integral of $y^{(4)}-2y''+y=xe^x+x^2\cos x$.
  • 5 Find a constant-coefficient annihilator of $r(x)=x^2e^{3x}+\sin2x-5$.
  • 6 Solve $y''+y=2\cos x$, $y(0)=1$, $y'(0)=0$.
  • 7 For which $\omega\gt0$ are all solutions of $y''+9y=\cos\omega x$ bounded on $[0,\infty)$?
  • 8 Show that neither $Ae^{2x}$ nor $Axe^{2x}$ can be a particular integral of $y''-4y'+4y=e^{2x}$, and find one.
1 $0$ is not a root of $\lambda^2-\lambda-2$: try $ax^2+bx+c$: $2a-(2ax+b)-2(ax^2+bx+c)=4x^2$ gives $a=-2$, $b=2$, $c=-3$: $y_p=-2x^2+2x-3$.
2 $P(i)=-1+2i+5=4+2i$; $y_p=\operatorname{Re}\dfrac{10e^{ix}}{4+2i}=\operatorname{Re}\big((2-i)e^{ix}\big)=2\cos x+\sin x$.
3 $f(\lambda)=\lambda^3-\lambda$ has simple roots $0,\pm1$; $f'(\lambda)=3\lambda^2-1$. By Theorem 2.17(1): $\dfrac{xe^x}{f'(1)}=\dfrac{xe^x}{2}$ and $\dfrac{x}{f'(0)}=-x$. $y_p=\tfrac12xe^x-x$.
4 $P(\lambda)=(\lambda^2-1)^2$: $\pm1$ double. For $xe^x$: $s=2$, $k=1$: $x^2(Ax+B)e^x$. For $x^2\cos x$: $\pm i$ not roots: $(Cx^2+Dx+E)\cos x+(Fx^2+Gx+H)\sin x$.
5 $(D-3)^3$ kills $x^2e^{3x}$, $D^2+4$ kills $\sin2x$, $D$ kills $-5$: $A(D)=D(D-3)^3(D^2+4)$.
6 Resonant: $y_p=x\sin x$ (Theorem 2.17(2): $\tfrac{1}{D^2+1}2\cos x=2\cdot\tfrac x2\sin x$). $y=c_1\cos x+c_2\sin x+x\sin x$; $c_1=1$, $y'(0)=c_2=0$: $y=\cos x+x\sin x$.
7 All $\omega\ne3$: then $y_p=\dfrac{\cos\omega x}{9-\omega^2}$; for $\omega=3$, $y_p=\tfrac{x}{6}\sin3x$ and every solution is unbounded.
8 $2$ is a double root: $P(D)[e^{2x}u]=e^{2x}u''$, which is $0$ for $u=A$ and $u=Ax$. We need $u''=1$: $u=\tfrac12x^2$, $y_p=\tfrac12x^2e^{2x}$.
II
Variation of parameters.
  • 1 Find a particular integral of $y''+y=\tan x$ on $\left(-\tfrac\pi2,\tfrac\pi2\right)$.
  • 2 Find a particular integral of $y''-2y'+y=\dfrac{e^x}{x}$ on $(0,\infty)$.
  • 3 Solve $x^2y''+xy'-y=x^2$ on $(0,\infty)$.
  • 4 Show that the solution of $y''+\omega^2y=r(x)$, $y(0)=y'(0)=0$, is $y=\dfrac1\omega\displaystyle\int_0^x\sin\omega(x-t)\,r(t)\,dt$, and evaluate it for $r\equiv1$.
  • 5 Use the order-$n$ formula of Theorem 2.16 to show that the solution of $y'''=r(x)$ with $y(0)=y'(0)=y''(0)=0$ is $y=\tfrac12\displaystyle\int_0^x(x-t)^2r(t)\,dt$.
  • 6 Solve $x^2y''-3xy'+4y=x^2\log x$ on $(0,\infty)$.
  • 7 Let $r$ be continuous and bounded on $[0,\infty)$, $|r|\le M$. Prove that every solution of $y''+3y'+2y=r$ is bounded on $[0,\infty)$, and that the solution with zero initial data satisfies $|y|\le M/2$.
  • 8 Find a third-order example: solve $y'''+y'=\tan x$ on $\left(-\tfrac\pi2,\tfrac\pi2\right)$ by the order-$n$ formula.
1 $W=1$; $u_1=-\int\sin x\tan x\,dx=-\int\frac{1-\cos^2x}{\cos x}dx=\sin x-\log(\sec x+\tan x)$, $u_2=\int\sin x\,dx=-\cos x$. $y_p=\cos x\sin x-\cos x\log(\sec x+\tan x)-\sin x\cos x=-\cos x\log(\sec x+\tan x)$.
2 $y_1=e^x$, $y_2=xe^x$, $W=e^{2x}$. $u_1=-\int\frac{xe^x\cdot e^x/x}{e^{2x}}dx=-x$, $u_2=\int\frac{e^x\cdot e^x/x}{e^{2x}}dx=\log x$. $y_p=-xe^x+xe^x\log x$; dropping $-xe^x\in y_c$: $y_p=xe^x\log x$.
3 $y_1=x$, $y_2=x^{-1}$ (indicial $r^2-1$), $W=-\tfrac2x$; normal form $r=1$. $u_1=-\int\frac{x^{-1}}{-2/x}dx=\tfrac x2$, $u_2=\int\frac{x}{-2/x}dx=-\tfrac{x^3}{6}$. $y_p=\tfrac{x^2}{2}-\tfrac{x^2}{6}=\tfrac{x^2}{3}$; $y=c_1x+c_2x^{-1}+\tfrac13x^2$.
4 $k(x)=\frac{\sin\omega x}{\omega}$ has $k(0)=0$, $k'(0)=1$; Theorem 2.16(3) gives $K(x,t)=\frac{\sin\omega(x-t)}{\omega}$. For $r\equiv1$: $\frac1\omega\int_0^x\sin\omega(x-t)\,dt=\dfrac{1-\cos\omega x}{\omega^2}$.
5 Fundamental set $1,x,x^2$, $W=2$; $W_1=x^2$, $W_2=-2x$, $W_3=1$ (replace columns by $(0,0,1)^T$ and expand). $y=\int_0^x\tfrac{t^2}{2}r\,dt-x\int_0^xt\,r\,dt+\tfrac{x^2}{2}\int_0^xr\,dt=\tfrac12\int_0^x(x-t)^2r(t)\,dt$ — Cauchy's formula for repeated integration.
6 $y_1=x^2$, $y_2=x^2\log x$, $W=x^3$; normal-form forcing $\log x$. $u_1=-\int\frac{x^2\log x\cdot\log x}{x^3}dx=-\tfrac13(\log x)^3$, $u_2=\int\frac{x^2\log x}{x^3}dx=\tfrac12(\log x)^2$. $y_p=\tfrac16x^2(\log x)^3$, and $y=x^2\left(c_1+c_2\log x+\tfrac16(\log x)^3\right)$.
7 Roots $-1,-2$: $k(s)=e^{-s}-e^{-2s}\ge0$ ($k(0)=0$, $k'(0)=1$). The zero-data solution is $\int_0^xk(x-t)r(t)\,dt$, so $|y|\le M\int_0^\infty k=M\left(1-\tfrac12\right)=\tfrac M2$. Every other solution adds $c_1e^{-x}+c_2e^{-2x}$, bounded on $[0,\infty)$.
8 Fundamental set $1,\cos x,\sin x$; $W=1$, $W_1=1$, $W_2=-\cos x$, $W_3=-\sin x$. $y_p=\int\tan x-\cos x\int\sin x\,dx-\sin x\int\frac{\sin^2x}{\cos x}dx=-\log\cos x+\cos^2x-\sin x\big(\log(\sec x+\tan x)-\sin x\big)$. Dropping the constant $\cos^2x+\sin^2x=1$: $y_p=-\log\cos x-\sin x\log(\sec x+\tan x)$; $y=c_1+c_2\cos x+c_3\sin x+y_p$.
III
Operator methods.
  • 1 Find $\dfrac{1}{D^2+4}e^{3x}$.
  • 2 Find $\dfrac{1}{D^2+4}\cos2x$ and verify it.
  • 3 Find a particular integral of $(D-1)^2y=x^2e^x$.
  • 4 Find a particular integral of $(D^2+D+1)\,y=x^2$.
  • 5 Find a particular integral of $y''+y=x\sin x$ using $x\sin x=\operatorname{Im}(xe^{ix})$ and the shift rule.
  • 6 Explain, with an example, why "$\tfrac1{f(D)}f(D)y=y$" is false, and what is true instead.
1 $f(3)=13$: $\dfrac{e^{3x}}{13}$.
2 Resonant: $\dfrac{x}{4}\sin2x$. Check: $(\tfrac x4\sin2x)''=\cos2x-x\sin2x$, plus $4\cdot\tfrac x4\sin2x$ gives $\cos2x$.
3 Shift: $e^x\dfrac{1}{D^2}x^2=e^x\dfrac{x^4}{12}$.
4 $\dfrac{1}{1+\lambda+\lambda^2}=1-\lambda+0\cdot\lambda^2+O(\lambda^3)$ (indeed $(1+\lambda+\lambda^2)(1-\lambda)=1-\lambda^3$). So $y_p=(1-D)x^2=x^2-2x$. Check: $2+(2x-2)+x^2-2x=x^2$.
5 $\dfrac{1}{D^2+1}xe^{ix}=e^{ix}\dfrac{1}{D^2+2iD}x=e^{ix}\dfrac{1}{2iD}\left(1-\tfrac{D}{2i}+\cdots\right)x=e^{ix}\dfrac{1}{2iD}\left(x+\tfrac i2\right)=e^{ix}\left(-\tfrac{i}{4}x^2+\tfrac14x\right)$. Imaginary part: $y_p=\tfrac14\left(x\sin x-x^2\cos x\right)$.
6 $D(1)=0$, and the rules give $\tfrac1D0=0$, not $1$. What is true: $f(D)\left[\tfrac1{f(D)}r\right]=r$, while $\tfrac1{f(D)}[f(D)y]=y+h$ for some $h\in\ker f(D)$ — the operator rules choose one particular integral and lose the complementary function.
IV
Series solutions, Legendre and Bessel.
  • 1 Locate and classify all singular points of $x(x-1)^2y''+y'+xy=0$.
  • 2 Find the recurrence and the first four nonzero terms of the series solution of Airy's equation $y''+xy=0$ with $y(0)=1$, $y'(0)=0$.
  • 3 Without solving, give lower bounds for the radius of convergence of the power-series solutions of (a) $(1+x^2)y''+y=0$ about $0$; (b) $(x^2+4)y''+xy'+y=0$ about $1$.
  • 4 Find the indicial roots of $2x^2y''+3xy'-(1+x)y=0$ at $0$ and say which case of Frobenius' theorem applies.
  • 5 From the series, prove $J_0'=-J_1$ and $(xJ_1)'=xJ_0$.
  • 6 Prove $J_{1/2}(x)=\sqrt{\tfrac{2}{\pi x}}\sin x$ from the series, using $\Gamma\left(k+\tfrac32\right)=\dfrac{(2k+1)!\sqrt\pi}{2^{2k+1}k!}$.
  • 7 Compute $P_3$ from Rodrigues' formula, check that it solves Legendre's equation with $n=3$, and verify $\int_{-1}^1P_3^2\,dx=\tfrac27$.
  • 8 Show that the only solutions of $xy''+y'+xy=0$ that are bounded near $0^+$ are the multiples of $J_0$.
1 $P=\frac{1}{x(x-1)^2}$, $Q=\frac{1}{(x-1)^2}$. At $0$: $xP=\frac1{(x-1)^2}$ and $x^2Q=\frac{x^2}{(x-1)^2}$ are analytic — regular singular. At $1$: $(x-1)P=\frac{1}{x(x-1)}$ is not analytic — irregular singular. All other points are ordinary.
2 $(k+2)(k+1)a_{k+2}=-a_{k-1}$ ($k\ge1$) and $2a_2=0$. With $a_0=1$, $a_1=0$: $a_3=-\tfrac16$, $a_6=\tfrac{1}{180}$, $a_9=-\tfrac{1}{12960}$: $y=1-\tfrac{x^3}{6}+\tfrac{x^6}{180}-\tfrac{x^9}{12960}+\cdots$ (radius $\infty$).
3 (a) singularities $\pm i$: radius $\ge1$. (b) singularities $\pm2i$, at distance $|1\mp2i|=\sqrt5$ from $1$: radius $\ge\sqrt5$.
4 Divide by $2$: $p_0=\tfrac32$, $q_0=-\tfrac12$. $r(r-1)+\tfrac32r-\tfrac12=r^2+\tfrac12r-\tfrac12=\tfrac12(2r-1)(r+1)$: roots $\tfrac12$ and $-1$, difference $\tfrac32\notin\mathbb{Z}$ — case (2), two Frobenius series, no logarithm.
5 $J_0=\sum\frac{(-1)^k}{(k!)^2}\left(\frac x2\right)^{2k}$, so $J_0'=\sum_{k\ge1}\frac{(-1)^k}{k!(k-1)!}\left(\frac x2\right)^{2k-1}=-\sum_{m\ge0}\frac{(-1)^m}{m!(m+1)!}\left(\frac x2\right)^{2m+1}=-J_1$. The second identity is Theorem 2.20(e) with $\nu=1$.
6 The $k$-th term is $\frac{(-1)^k}{k!\,\Gamma(k+3/2)}\left(\frac x2\right)^{2k+1/2}=\frac{(-1)^k2^{2k+1}}{(2k+1)!\sqrt\pi}\cdot\frac{x^{2k+1/2}}{2^{2k+1/2}}=\sqrt{\frac{2}{\pi x}}\,\frac{(-1)^kx^{2k+1}}{(2k+1)!}$; summing gives $\sqrt{\tfrac2{\pi x}}\sin x$.
7 $(x^2-1)^3=x^6-3x^4+3x^2-1$; third derivative $120x^3-72x$; divided by $2^3\cdot3!=48$: $P_3=\tfrac52x^3-\tfrac32x$. Check: $(1-x^2)\cdot15x-2x\left(\tfrac{15}2x^2-\tfrac32\right)+12P_3=15x-15x^3-15x^3+3x+30x^3-18x=0$. $\int_{-1}^1\tfrac14(5x^3-3x)^2dx=\tfrac14\left(\tfrac{50}{7}-12+6\right)=\tfrac27$.
8 Multiply by $x$: Bessel of order $0$, indicial roots $0,0$. By Theorem 2.19(3) a second solution is $y_2=J_0\log x+\sum_{k\ge1}b_kx^k$, and $y_2\to-\infty$ as $x\to0^+$ (since $J_0(0)=1$). A solution $c_1J_0+c_2y_2$ is bounded near $0$ iff $c_2=0$.
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

E1. CSIR Part B A particular integral of $y''+y=\operatorname{cosec}x$ on $(0,\pi)$ is (A) $-x\cos x+\sin x\log\sin x$; (B) $x\cos x+\sin x\log\sin x$; (C) $-x\cos x-\sin x\log\sin x$; (D) $x\sin x+\cos x\log\sin x$.

Idea Variation of parameters with $y_1=\cos x$, $y_2=\sin x$, $W=1$.
Compute $u_1=-\int\sin x\operatorname{cosec}x\,dx=-x$, $u_2=\int\cot x\,dx=\log\sin x$: $y_p=-x\cos x+\sin x\log\sin x$. Check: $y_p''+y_p=\operatorname{cosec}x$. Options (B), (C) have a sign error in one term; (D) is the pattern of $y''+y=\sec x$ with the wrong logarithm and solves neither.
Answer (A).

E2. CSIR Part B GATE MA A particular integral of $y''-3y'+2y=2xe^x$ is (A) $-(x^2+2x)e^x$; (B) $(x^2+2x)e^x$; (C) $-x^2e^x$; (D) $xe^x$.

Idea $1$ is a simple root of $(\lambda-1)(\lambda-2)$, so $y_p=x(Ax+B)e^x$; use the shift rule.
Compute $P(D)[e^xu]=e^x\,D(D-1)u=e^x(u''-u')$. Need $u''-u'=2x$ with $u=Ax^2+Bx$: $2A-2Ax-B=2x$, so $A=-1$, $B=-2$: $y_p=-(x^2+2x)e^x$. The others fail: (B) gives $-2xe^x$ (sign), (C) gives $P(D)[-x^2e^x]=e^x(-2+2x)$, and (D) gives $P(D)[xe^x]=e^x(0-1)=-e^x$.
Answer (A).

E3. CSIR Part B GATE MA For $4x^2y''+4xy'+(4x^2-1)y=0$, which statement is correct? (A) The indicial roots are $\pm\tfrac12$ and every second solution involves $\log x$. (B) The indicial roots are $\pm\tfrac12$ and there are two independent Frobenius series solutions without logarithm. (C) The indicial roots are $0$ and $1$. (D) $x=0$ is an irregular singular point.

Idea Divide by $4$: Bessel's equation of order $\tfrac12$. $p_0=1$, $q_0=-\tfrac14$: $r^2-\tfrac14=0$, so $0$ is a regular singular point with roots $\pm\tfrac12$ — (C), (D) are false.
Decide The roots differ by the integer $1$, so case (4) of Frobenius' theorem applies, where the logarithm may vanish — and here it does: $x^{-1/2}\cos x$ and $x^{-1/2}\sin x$ are both of Frobenius form (Theorem 2.20(d)). So (A) is false.
Answer (B).

E4. CSIR Part C Let $f$ be continuous on $\mathbb{R}$ and let $y$ be the solution of $y''+4y=f(x)$, $y(0)=y'(0)=0$. Which of the following are true? (One or more options may be correct.) (A) $y(x)=\tfrac12\int_0^x\sin2(x-t)\,f(t)\,dt$. (B) If $f$ is bounded on $[0,\infty)$, then so is $y$. (C) If $f(x)=\cos x$, then $y=\tfrac13(\cos x-\cos2x)$. (D) If $f\ge0$ on $\mathbb{R}$, then $y\ge0$ on $[0,\infty)$.

(A) True Theorem 2.16(3) with $k(s)=\tfrac12\sin2s$.
(B) False $f=\sin2x$ (resonance): $y=\tfrac18(\sin2x-2x\cos2x)$, unbounded.
(C) True $y''=\tfrac13(-\cos x+4\cos2x)$, so $y''+4y=\tfrac13(3\cos x)=\cos x$; $y(0)=0$, $y'(0)=\tfrac13(-\sin0+2\sin0)=0$.
(D) False Take $f=1+\cos x\ge0$. By (C) and $\tfrac{1}{D^2+4}1=\tfrac14$: $y=\tfrac14(1-\cos2x)+\tfrac13(\cos x-\cos2x)$, and $y(\pi)=0+\tfrac13(-1-1)=-\tfrac23\lt0$. The kernel $\sin2(x-t)$ changes sign, so positivity is not preserved.
Answer (A) and (C).

E5. CSIR Part C Which of the following are true? (One or more options may be correct.) (A) $P_n(1)=1$ for every $n\ge0$. (B) $\int_{-1}^1xP_3(x)\,dx=0$. (C) $J_0$ and $J_1$ have a common positive zero. (D) Every solution of Legendre's equation with $n=1$ is bounded on $(-1,1)$.

(A) True Put $x=1$ in the generating function: $(1-t)^{-1}=\sum t^n$.
(B) True $x=P_1$, and $P_1\perp P_3$; directly, $\int_{-1}^1\tfrac12(5x^4-3x^2)dx=\tfrac12(2-2)=0$.
(C) False If $J_0(a)=J_1(a)=0$ with $a\gt0$, then $J_0'(a)=-J_1(a)=0$, so $J_0$ would be a solution of Bessel's equation with a double zero at the ordinary point $a$, forcing $J_0\equiv0$ (Theorem 2.1).
(D) False The second solution $Q_1=\tfrac x2\log\frac{1+x}{1-x}-1$ (§2.1, Example 3) tends to $\infty$ as $x\to\pm1$.
Answer (A) and (B).

E6. CSIR Part C Consider $y''-2y'+y=r(x)$. Which of the following are true? (One or more options may be correct.) (A) For $r=e^x$ there is a particular integral of the form $Axe^x$. (B) For $r=e^x/x$ on $(0,\infty)$, $xe^x\log x$ is a particular integral. (C) For $r\equiv1$, every solution tends to $+\infty$ as $x\to\infty$. (D) For $r\equiv0$, the solution with $y(0)=0$, $y'(0)=1$ is $xe^x$.

(A) False $1$ is a double root, so $(D-1)^2[Axe^x]=e^xD^2(Ax)=0$; one needs $\tfrac12x^2e^x$.
(B) True Exercise II.2.
(C) False $y=1+(c_1+c_2x)e^x$; with $c_1=c_2=0$, $y\equiv1$; with $c_1=-1$, $c_2=0$, $y\to-\infty$.
(D) True $(c_1+c_2x)e^x$ with $c_1=0$ and $y'(0)=c_2=1$.
Answer (B) and (D).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. Structure and undetermined coefficients. Theorem 2.14 in five minutes. Annihilators and Theorem 2.15 — prove it, because the proof explains why $x^s$ appears. Examples 1 and 2 on the board; project Interactive 1 and let the class find the frequency of maximal response for $c=0.2$ before you show the curve; then press Resonance.
  2. Variation of parameters and operators. Theorem 2.16(1) with the full derivation (stress the auxiliary condition $u_1'y_1+u_2'y_2=0$), the kernel and Duhamel's principle; Interactive 2 in the resonant mode. Examples 3 and 4 — let a student fall into the normal-form trap first. Theorem 2.17 and Example 5 as a fast technique.
  3. Series. Definition 2.8 with quick classification drills; Theorem 2.18 with the Airy recurrence (Exercise IV.2) done live; Frobenius (Theorem 2.19) and Example 6; Legendre and Bessel facts (Theorem 2.20) with Example 7 and Exam-corner E3, E5.

Discussion questions. (1) Undetermined coefficients and variation of parameters must give answers that differ by an element of $y_c$. Check this for $y''+y=\sin x$. (2) Why does damping make the response to every bounded forcing bounded, and what plays the role of $\int_0^\infty|k|$ for an undamped oscillator? (3) The series of $(1+x^2)y''+y=0$ about $0$ has radius $1$. What does the real line "know" about the complex points $\pm i$?

Misconceptions to watch for. Forgetting $x^s$ (or using $x$ when $s=2$); applying the variation-of-parameters formula to an equation not in normal form; dividing by $f(a)=0$ in the operator rules; treating $1/f(D)$ as a two-sided inverse; believing that an integer difference of indicial roots always produces a logarithm; computing the radius of convergence from real singularities only; thinking every solution of Legendre's equation with integer $n$ is a polynomial.

Suggested homework. I(2, 4, 6, 8), II(1, 3, 5, 7), III(3, 5), IV(1, 2, 4, 6, 8); Exam corner E1, E4, E6.

🔬 Research–Teaching NexusResearch-tutored · optional, about 60 minutes

Research question. At what speed is a road hump most uncomfortable? Model a car body on its suspension as a damped oscillator driven through the road profile, and use Duhamel's integral to find the speed that maximises the vertical displacement of the body.

Why it matters. Traffic engineers in the United Kingdom, the Netherlands and India design humps and speed tables so that they are uncomfortable at excessive speed yet passable for buses and ambulances; vehicle engineers tune suspensions for the same profiles. Both rely on the response of a damped oscillator to a short input pulse — exactly the integral $\int K(x,t)\,r(t)\,dt$ of Theorem 2.16.

What to do.

  1. Model: $y''+2\zeta\omega_0y'+\omega_0^2y=\omega_0^2u(t)$ with natural frequency $1.2$ Hz ($\omega_0=2\pi\cdot1.2\ \text{rad/s}$), damping ratio $\zeta=0.3$, and a hump of length $\ell=3.7$ m and height $h=0.075$ m crossed at speed $v$: $u(t)=h\sin(\pi t/T)$ for $0\le t\le T=\ell/v$, and $0$ afterwards.
  2. Find the impulse response $k(t)$ ($k(0)=0$, $k'(0)=1$) and write $y(t)=\omega_0^2\int_0^tk(t-s)\,u(s)\,ds$. Evaluate it numerically (a convolution sum) and check it against a direct numerical solution of the ODE.
  3. Compute the peak of $|y|$ for speeds from $5$ to $60$ km/h and plot it. At what speed is the peak largest, and how does the crossing time $T$ compare with the natural period $1/1.2$ s?
  4. Compare with the steady-state amplitude curve $1/\sqrt{(1-\Omega^2)^2+4\zeta^2\Omega^2}$ ($\Omega=\omega/\omega_0$) of Interactive 1: where is its maximum and what is its height?

Tools: Python (NumPy, SciPy's solve_ivp), or a spreadsheet with a fine time step.

Hand in: The peak-response curve, the worst speed, a check of Duhamel against the direct solver, and a short paragraph on what a hump designer should conclude.

Going further. Add a second degree of freedom (the wheel) to obtain a "quarter-car" model; the system is then $x'=Ax+b(t)$ of §1.3, and the same Duhamel formula applies with $e^{(t-s)A}$.

Instructor note: with the data above, the peak displacement is largest at about $16.7$ km/h ($T\approx0.80$ s, close to the natural period $0.83$ s), where it is about $0.093$ m — roughly $1.25$ times the hump height. It is about $0.086$ m at $10$ km/h, $0.082$ m at $30$ km/h and $0.058$ m at $50$ km/h (fast crossings are filtered by the suspension, though the accelerations grow). Duhamel and solve_ivp agree to about $10^{-7}$ m. The steady-state amplitude curve peaks at $\Omega=\sqrt{1-2\zeta^2}\approx0.906$ with height $1/\left(2\zeta\sqrt{1-\zeta^2}\right)\approx1.747$.

🧪 Self-check quiz

0/5 correct

Q1. The correct form of a particular integral of $y''+y=x\cos x$ is

Q2. Before applying the variation-of-parameters formula to $a_2(x)y''+a_1(x)y'+a_0(x)y=g(x)$ one must

Q3. $\dfrac{1}{D^2+9}\sin3x$ equals

Q4. At $x=0$, Bessel's equation $x^2y''+xy'+(x^2-\nu^2)y=0$ has

Q5. The power-series solutions of $(x^2+9)\,y''+y=0$ about $x=0$ are guaranteed to converge for