2.1.14.2 Solved using first_order_ode_exact

Entering first order ode exact solver

\[\begin {aligned} y^{\prime } c&=a x \end {aligned}\]

A differential equation of of the form

\begin{align*} M\left ( x,y\right ) +N\left ( x,y\right ) \frac {dy}{dx}&=0\tag {A} \end{align*}

is solved by assuming there exists a function \(\phi \left ( x,y\right ) =c\) where \(c\) is constant that satisfies the ode. Taking derivative of \(\phi \) w.r.t. \(x\) gives

\begin{align*} \frac {d}{dx}\phi \left ( x,y\right ) &=0 \end{align*}

Therefore

\begin{equation} \frac {\partial \phi }{\partial x}+\frac {\partial \phi }{\partial y}\frac {dy}{dx}=0\tag {B}\end{equation}

Comparing (A,B) shows that

\begin{align*} \frac {\partial \phi }{\partial x} & =M\\ \frac {\partial \phi }{\partial y} & =N \end{align*}

Since \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) then for the above to be valid the following condition is required

\[ \frac {\partial M}{\partial y}=\frac {\partial N}{\partial x}\]

if the above condition is satisfied, the original ode is called exact.

The function \(\phi \left ( x,y\right ) \) needs to be determined. If this condition is not satisfied this method will not work. In this case an integrating factor might exist to force this condition to be satisfied.

The first step is to write the ODE in following standard form and then check for exactness.

\[ M(x,y) \mathop {\mathrm {d}x}+ N(x,y) \mathop {\mathrm {d}y}=0 \tag {1A} \]

Therefore the given ODE becomes

\begin{align*} \left (c\right )\mathop {\mathrm {d}y} &= \left (a x\right )\mathop {\mathrm {d}x}\\ \left (-a x\right )\mathop {\mathrm {d}x} + \left (c\right )\mathop {\mathrm {d}y} &= 0 \tag {2A} \end{align*}

Comparing (1A) and (2A) shows that

\begin{align*} M(x,y) &= -a x\\ N(x,y) &= c \end{align*}

The ODE is now checked if it is exact or not. An ODE is exact if the following condition is satisfied

\[ \frac {\partial M}{\partial y} = \frac {\partial N}{\partial x} \]

Therefore

\begin{align*} \frac {\partial M}{\partial y} &= \frac {\partial }{\partial y} \left (-a x\right )\\ &= 0 \end{align*}

and

\begin{align*} \frac {\partial N}{\partial x} &= \frac {\partial }{\partial x} \left (c\right )\\ &= 0 \end{align*}

Since \(\frac {\partial M}{\partial y}= \frac {\partial N}{\partial x}\) then the ODE is exact.

The following equations are set up to find the function \(\phi \left (x,y\right )\)

\begin{align*} \frac {\partial \phi }{\partial x } &= M\tag {1} \\ \frac {\partial \phi }{\partial y } &= N\tag {2} \end{align*}

Integrating (1) w.r.t. \(x\) gives

\begin{align*} \int \frac {\partial \phi }{\partial x} \mathop {\mathrm {d}x} &= \int M\mathop {\mathrm {d}x}\\ \int \frac {\partial \phi }{\partial x} \mathop {\mathrm {d}x} &= \int -a x\mathop {\mathrm {d}x}\\ \phi &= -\frac {x^{2} a}{2}+ f(y)\tag {3} \end{align*}

Where \(f(y)\) is used for the constant of integration because \(\phi \) is a function of both \(x\) and \(y\). Taking derivative of (3) w.r.t \(y\) gives

\begin{align*} \frac {\partial \phi }{\partial y} = 0+f'(y)\tag {4} \end{align*}

But equation (2) says that \(\frac {\partial \phi }{\partial y} = c\). Therefore equation (4) becomes

\begin{align*} c &= 0+f'(y)\tag {5} \end{align*}

Solving equation (5) for \( f'(y)\) gives

\begin{align*} f'(y) &= c \end{align*}

Integrating the above w.r.t \(y\) gives

\begin{align*} \int f'(y) \mathop {\mathrm {d}y} &= \int \left ( c\right ) \mathop {\mathrm {d}y}\\ f(y) &= c y+ c_1 \end{align*}

Eq(3) becomes

\begin{align*} \phi &= -\frac {x^{2} a}{2}+c y+ c_1 \end{align*}

Since \(\phi \) is a constant function, then by combining constants the above simplifies to

\begin{align*} c_1 &= -\frac {x^{2} a}{2}+c y \end{align*}

Solving for \(y\) from \(-\frac {x^{2} a}{2}+c y = c_1\) gives

\begin{align*} y &= \frac {x^{2} a +2 c_1}{2 c} \\ \end{align*}

Summary of solutions found

\[ y = \frac {x^{2} a +2 c_1}{2 c} \]