Solution (source code)

= Solution

An <integrating factor> directly solves a linear first-order equation; a general second-order equation needs an additional reduction. There are several sufficient cases, with all divisions restricted to intervals where their denominators are nonzero.

If $A=0$ and $B\ne0$, divide by $B$ to obtain $y'+(C/B)y=D/B$. The integrating factor is $\mu=\exp(\int C/B\,dx)$ and
$$
y=\mu^{-1}\left(K+\int\mu D/B\,dx\right).
$$
If $C=0$ and $A\ne0$, put $u=y'$. Then $u'+(B/A)u=D/A$ is first order, with integrating factor $\nu=\exp(\int B/A\,dx)$; solve for $u$ and integrate once more for $y$.

A further reducible class has $C=B'-A''$, for then
$$
Ay''+By'+Cy=\frac d{dx}\bigl[Ay'+(B-A')y\bigr].
$$
One <integration> produces a first-order equation for $y$, whose integrating factor after division by $A$ is $\exp(\int(B-A')/A\,dx)$.

Multiplication can always put a regular second-order equation into self-adjoint form by choosing $w=\exp(\int(B-A')/A\,dx)$, since
$$
w(Ay''+By'+Cy)=(wAy')'+wCy.
$$
However, the remaining $wCy$ term generally prevents one integration from solving it. The <limitations of integrating factors for second-order equations> explain why this formal transformation alone is not a general solution method. These sufficient classes do not purport to classify every specially solvable coefficient choice.