5.1.2.3 Solved by finding first intergal (exact ode)
5.1.2.3.1 Example 1 \(xy^{\prime \prime \prime }+\left ( x^{2}-3\right ) y^{\prime \prime }+4xy^{\prime }+2y=0\)

ode internal name "higher_order_exact"

This applies only to linear higher order which are exact. Solved by finding its first integral, which will be an ode of order one less. Let look at third order ode first

\[ p_{3}\left ( x\right ) y^{\prime \prime \prime }+p_{2}\left ( x\right ) y^{\prime \prime }+p_{1}y^{\prime }+p_{0}y=f\left ( x\right ) \]

The condition of exactness is

\begin{equation} p_{3}^{\prime \prime \prime }-p_{2}^{\prime \prime }+p_{1}^{\prime }-p_{0}=0 \tag {1}\end{equation}

If this condition is satisfied then first integral is

\begin{align} \left ( p_{3}y^{\prime \prime }+\left ( p_{2}-p_{3}^{\prime }\right ) y^{\prime }+\left ( p_{1}-p_{2}^{\prime }+p_{3}^{\prime \prime }\right ) y\right ) ^{\prime } & =f\left ( x\right ) \nonumber \\ p_{3}y^{\prime \prime }+\left ( p_{2}-p_{3}^{\prime }\right ) y^{\prime }+\left ( p_{1}-p_{2}^{\prime }+p_{3}^{\prime \prime }\right ) y & =\int f\left ( x\right ) dx+c_{1} \tag {2}\end{align}

This is now second order ode which is solved for \(y\).  For a 4th order ode

\[ p_{4}\left ( x\right ) y^{\prime \prime \prime \prime }+p_{3}\left ( x\right ) y^{\prime \prime \prime }+p_{2}\left ( x\right ) y^{\prime \prime }+p_{1}y^{\prime }+p_{0}y=f\left ( x\right ) \]

The condition is

\begin{equation} p_{4}^{\prime \prime \prime \prime }-p_{3}^{\prime \prime \prime }+p_{2}^{\prime \prime }-p_{1}^{\prime }-p_{0}=0 \tag {3}\end{equation}

If the above is satisfied, then the first integral is

\begin{align} \left ( p_{4}y^{\prime \prime \prime }+\left ( p_{3}-p_{4}^{\prime }\right ) y^{\prime \prime }+\left ( p_{2}-p_{3}^{\prime }+p_{4}^{\prime }\right ) y^{\prime }+\left ( p_{1}-p_{2}^{\prime }+p_{3}^{\prime \prime }-p_{4}^{\prime \prime \prime }\right ) y\right ) ^{\prime } & =f\left ( x\right ) \nonumber \\ p_{4}y^{\prime \prime \prime }+\left ( p_{3}-p_{4}^{\prime }\right ) y^{\prime \prime }+\left ( p_{2}-p_{3}^{\prime }+p_{4}^{\prime }\right ) y^{\prime }+\left ( p_{1}-p_{2}^{\prime }+p_{3}^{\prime \prime }-p_{4}^{\prime \prime \prime }\right ) y & =\int f\left ( x\right ) dx+c_{1} \tag {4}\end{align}

And so on. Hence given general higher order ode

\[ p_{n}y^{\left ( n\right ) }+p_{n-1}y^{\left ( n-1\right ) }+\cdots +p_{2}y^{^{\prime \prime }}+p_{1}y^{\prime }+p_{0}y=f\left ( x\right ) \]

The condition for exactness is

\[ p_{n}^{\left ( n\right ) }-p_{n-1}^{\left ( n-1\right ) }+p_{n-2}^{\left ( n-2\right ) }+\cdots +\left ( -1\right ) ^{n}p_{n}^{\left ( n\right ) }+\cdots =0 \]

And the first integral is

\[ p_{n}y^{\left ( n-1\right ) }+\left ( p_{n-1}-p_{n}^{\prime }\right ) y^{\left ( n-2\right ) }+\cdots +\left ( p_{1}-p_{2}^{\prime }+\cdots +\left ( -1\right ) ^{n}p_{n}^{\left ( n-1\right ) }+\cdots +p_{n}^{\left ( n-1\right ) }\right ) y=\int f\left ( x\right ) dx+c_{1}\]

5.1.2.3.1 Example 1 \(xy^{\prime \prime \prime }+\left ( x^{2}-3\right ) y^{\prime \prime }+4xy^{\prime }+2y=0\) Comparing to standard form \(p_{3}y^{\prime \prime \prime }+p_{2}y^{\prime \prime }+p_{1}y^{\prime }+p_{0}y=f\left ( x\right ) \) shows that

\begin{align*} p_{3} & =x\\ p_{2} & =x^{2}-3\\ p_{1} & =4x\\ p_{0} & =2\\ f\left ( x\right ) & =0 \end{align*}

Checking if it is exact

\begin{align*} p_{3}^{\prime \prime \prime }-p_{2}^{\prime \prime }+p_{1}^{\prime }-p_{0} & =0-2+4-2\\ & =0 \end{align*}

Hence it is exact. The first integral is therefore

\begin{align*} \left ( p_{3}y^{\prime \prime }+\left ( p_{2}-p_{3}^{\prime }\right ) y^{\prime }+\left ( p_{1}-p_{2}^{\prime }+p_{3}^{\prime \prime }\right ) y\right ) ^{\prime } & =f\left ( x\right ) \\ \left ( xy^{\prime \prime }+\left ( x^{2}-3-1\right ) y^{\prime }+\left ( 4x-2x+0\right ) y\right ) ^{\prime } & =0\\ \left ( xy^{\prime \prime }+\left ( x^{2}-4\right ) y^{\prime }+2xy\right ) ^{\prime } & =0 \end{align*}

Hence the first integral is

\[ xy^{\prime \prime }+\left ( x^{2}-4\right ) y^{\prime }+2xy=c_{1}\]

Let us now check if this is also exact. This has form

\[ p_{2}y^{\prime \prime }+p_{1}y^{\prime }+p_{0}=f\left ( x\right ) \]

Where now

\begin{align*} p_{2} & =x\\ p_{1} & =\left ( x^{2}-4\right ) \\ p_{0} & =2x\\ f\left ( x\right ) & =c_{1}\end{align*}

Checking if it is exact

\begin{align*} p_{2}^{\prime \prime }-p_{1}^{\prime }+p_{0} & =0-2x+2x\\ & =0 \end{align*}

Show it is exact. Therefore its first integral is

\begin{align*} \left ( p_{2}y^{\prime }+\left ( p_{1}-p_{2}^{\prime }\right ) y\right ) ^{\prime } & =f\left ( x\right ) \\ \left ( xy^{\prime }+\left ( \left ( x^{2}-4\right ) -1\right ) y\right ) ^{\prime } & =c_{1}\\ \left ( xy^{\prime }+\left ( x^{2}-5\right ) y\right ) ^{\prime } & =c_{1}\end{align*}

Hence first integral is

\begin{align*} xy^{\prime }+\left ( x^{2}-5\right ) y & =\int c_{1}dx+c_{2}\\ & =c_{1}x+c_{2}\end{align*}

This is first oder linear ode which is now easily solved.