Reduction of order (source code)

= Reduction of order
{wiki}

Given a known solution $y_1$ of $y''+p(x)y'+q(x)y=0$, <reduction of order> seeks another solution as $y_2=v y_1$. On an interval where $y_1\ne0$, substitution cancels the terms containing $v$ and gives
$$
y_1v''+(2y_1'+py_1)v'=0.
$$
This is first order in $v'$, so
$$
y_2(x)=y_1(x)\int^x\frac{e^{-\int^s p(r)\,dr}}{y_1(s)^2}\,ds.
$$
Its <Wronskian> with $y_1$ is $e^{-\int p}$, nonzero, proving independence. An additive constant in the integral merely adds a multiple of $y_1$.

For $y''+y=0$ and $y_1=\cos x$, the formula gives $y_2=\cos x\tan x=\sin x$ where $\cos x\ne0$. Although the integral factor has poles, the actual second solution continues smoothly through them. The <reduction of order across a zero of the known solution> explains why one continues the solution using the original regular equation rather than declaring the pole of an auxiliary integral a solution singularity.