3.10 Exact linear second order ode \(p_{2}\left ( x\right ) y^{\prime \prime }+p_{1}\left ( x\right ) y^{\prime }+p_{0}\left ( x\right ) y=f\left ( x\right ) \)
ode internal name "exact_linear_second_order_ode"
The ode
\begin{equation} p_{2}\left ( x\right ) y^{\prime \prime }+p_{1}\left ( x\right ) y^{\prime }+p_{0}\left ( x\right ) y=f\left ( x\right ) \tag {1}\end{equation}
is called exact if the following condition is met
\begin{equation} p_{2}^{\prime \prime }-p_{1}^{\prime }+p_{0}=0 \tag {1A}\end{equation}
In this case, then
\begin{equation} \frac {d}{dx}\left ( p_{2}y^{\prime }+\left ( p_{1}-p_{2}^{\prime }\right ) y\right ) =p_{2}y^{\prime \prime }+p_{1}y^{\prime }+p_{0}y \tag {2}\end{equation}
Which implies we can write (1) as
\begin{equation} \frac {d}{dx}\left ( p_{2}y^{\prime }+\left ( p_{1}-p_{2}^{\prime }\right ) y\right ) =f\left ( x\right ) \tag {2A}\end{equation}
Or
\begin{equation} p_{2}y^{\prime }+\left ( p_{1}-p_{2}^{\prime }\right ) y=\int f\left ( x\right ) dx+c_{1} \tag {3}\end{equation}
Sometimes (2A) is called the adjoint ode of (1). Eq (3) is called the first integral equation
of (1). It has order one less than (1). Let us see how to find the condition that first
integral exist or not.
\[ p_{2}y^{\prime \prime }+p_{1}y^{\prime }+p_{0}y=\left ( p_{2}y^{\prime }+\left ( p_{1}-p_{2}^{\prime }\right ) y\right ) ^{\prime }\]
Expanding gives
\begin{align*} p_{2}y^{\prime \prime }+p_{1}y^{\prime }+p_{0}y & =p_{2}^{\prime }y^{\prime }+p_{2}y^{\prime \prime }+\left ( p_{1}^{\prime }-p_{2}^{\prime \prime }\right ) y+\left ( p_{1}-p_{2}^{\prime }\right ) y^{\prime }\\ & =p_{2}y^{\prime \prime }+\left ( p_{2}^{\prime }+p_{1}-p_{2}^{\prime }\right ) y^{\prime }+\left ( p_{1}^{\prime }-p_{2}^{\prime \prime }\right ) y\\ & =p_{2}y^{\prime \prime }+p_{1}y^{\prime }+\left ( p_{1}^{\prime }-p_{2}^{\prime \prime }\right ) y \end{align*}
Comparing coefficients
\begin{align*} p_{0} & =p_{1}^{\prime }-p_{2}^{\prime \prime }\\ p_{2}^{\prime \prime }-p_{1}^{\prime }+p_{0} & =0 \end{align*}
This is the condition for exactness stated in (1A). i.e. if ODE (1) satisfies this condition
then the ODE is exact and has first integral which we now can be easily solve since it is
ode of order one less. See section on higher order ode’s of how this can be extended to
higher order ode’s.