2.99 problem 675

2.99.1 Solving as homogeneousTypeD2 ode
2.99.2 Solving as riccati ode
2.99.3 Maple step by step solution

Internal problem ID [9009]
Internal file name [OUTPUT/7944_Monday_June_06_2022_12_59_16_AM_45233455/index.tex]

Book: Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section: Chapter 1, Additional non-linear first order
Problem number: 675.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "riccati", "homogeneousTypeD2"

Maple gives the following as the ode type

[[_homogeneous, `class D`], _Riccati]

\[ \boxed {y^{\prime }-\frac {y+x^{3} a \,{\mathrm e}^{x}+a \,x^{4}+a \,x^{3}-x y^{2} {\mathrm e}^{x}-x^{2} y^{2}-x y^{2}}{x}=0} \]

2.99.1 Solving as homogeneousTypeD2 ode

Using the change of variables \(y = u \left (x \right ) x\) on the above ode results in new ode in \(u \left (x \right )\) \begin {align*} -x^{3} a \,{\mathrm e}^{x}-a \,x^{4}+x^{3} u \left (x \right )^{2} {\mathrm e}^{x}+x^{4} u \left (x \right )^{2}-a \,x^{3}+x^{3} u \left (x \right )^{2}+\left (u^{\prime }\left (x \right ) x +u \left (x \right )\right ) x -u \left (x \right ) x = 0 \end {align*}

In canonical form the ODE is \begin {align*} u' &= F(x,u)\\ &= f( x) g(u)\\ &= x \left (-u^{2}+a \right ) \left ({\mathrm e}^{x}+x +1\right ) \end {align*}

Where \(f(x)=\left ({\mathrm e}^{x}+x +1\right ) x\) and \(g(u)=-u^{2}+a\). Integrating both sides gives \begin{align*} \frac {1}{-u^{2}+a} \,du &= \left ({\mathrm e}^{x}+x +1\right ) x \,d x \\ \int { \frac {1}{-u^{2}+a} \,du} &= \int {\left ({\mathrm e}^{x}+x +1\right ) x \,d x} \\ \frac {\operatorname {arctanh}\left (\frac {u}{\sqrt {a}}\right )}{\sqrt {a}}&=\frac {x^{2}}{2}+\frac {x^{3}}{3}+x \,{\mathrm e}^{x}-{\mathrm e}^{x}+c_{2} \\ \end{align*} The solution is \[ \frac {\operatorname {arctanh}\left (\frac {u \left (x \right )}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {x^{2}}{2}-\frac {x^{3}}{3}-x \,{\mathrm e}^{x}+{\mathrm e}^{x}-c_{2} = 0 \] Replacing \(u(x)\) in the above solution by \(\frac {y}{x}\) results in the solution for \(y\) in implicit form \begin {align*} \frac {\operatorname {arctanh}\left (\frac {y}{x \sqrt {a}}\right )}{\sqrt {a}}-\frac {x^{2}}{2}-\frac {x^{3}}{3}-x \,{\mathrm e}^{x}+{\mathrm e}^{x}-c_{2} = 0\\ -\frac {-3 \,\operatorname {arctanh}\left (\frac {y}{x \sqrt {a}}\right )+\left (\left (3 x -3\right ) {\mathrm e}^{x}+x^{3}+\frac {3 x^{2}}{2}+3 c_{2} \right ) \sqrt {a}}{3 \sqrt {a}} = 0 \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} -\frac {-3 \,\operatorname {arctanh}\left (\frac {y}{x \sqrt {a}}\right )+\left (\left (3 x -3\right ) {\mathrm e}^{x}+x^{3}+\frac {3 x^{2}}{2}+3 c_{2} \right ) \sqrt {a}}{3 \sqrt {a}} &= 0 \\ \end{align*}

Verification of solutions

\[ -\frac {-3 \,\operatorname {arctanh}\left (\frac {y}{x \sqrt {a}}\right )+\left (\left (3 x -3\right ) {\mathrm e}^{x}+x^{3}+\frac {3 x^{2}}{2}+3 c_{2} \right ) \sqrt {a}}{3 \sqrt {a}} = 0 \] Verified OK.

2.99.2 Solving as riccati ode

In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= -\frac {-y -x^{3} a \,{\mathrm e}^{x}-a \,x^{4}-a \,x^{3}+{\mathrm e}^{x} y^{2} x +x^{2} y^{2}+x \,y^{2}}{x} \end {align*}

This is a Riccati ODE. Comparing the ODE to solve \[ y' = x^{2} a \,{\mathrm e}^{x}+a \,x^{3}-{\mathrm e}^{x} y^{2}+a \,x^{2}-x \,y^{2}-y^{2}+\frac {y}{x} \] With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \] Shows that \(f_0(x)=-\frac {-x^{3} a \,{\mathrm e}^{x}-a \,x^{4}-a \,x^{3}}{x}\), \(f_1(x)=\frac {1}{x}\) and \(f_2(x)=-\frac {x \,{\mathrm e}^{x}+x^{2}+x}{x}\). Let \begin {align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{-\frac {\left (x \,{\mathrm e}^{x}+x^{2}+x \right ) u}{x}} \tag {1} \end {align*}

Using the above substitution in the given ODE results (after some simplification)in a second order ODE to solve for \(u(x)\) which is \begin {align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end {align*}

But \begin {align*} f_2' &=-\frac {x \,{\mathrm e}^{x}+{\mathrm e}^{x}+2 x +1}{x}+\frac {x \,{\mathrm e}^{x}+x^{2}+x}{x^{2}}\\ f_1 f_2 &=-\frac {x \,{\mathrm e}^{x}+x^{2}+x}{x^{2}}\\ f_2^2 f_0 &=-\frac {\left (x \,{\mathrm e}^{x}+x^{2}+x \right )^{2} \left (-x^{3} a \,{\mathrm e}^{x}-a \,x^{4}-a \,x^{3}\right )}{x^{3}} \end {align*}

Substituting the above terms back in equation (2) gives \begin {align*} -\frac {\left (x \,{\mathrm e}^{x}+x^{2}+x \right ) u^{\prime \prime }\left (x \right )}{x}+\frac {\left (x \,{\mathrm e}^{x}+{\mathrm e}^{x}+2 x +1\right ) u^{\prime }\left (x \right )}{x}-\frac {\left (x \,{\mathrm e}^{x}+x^{2}+x \right )^{2} \left (-x^{3} a \,{\mathrm e}^{x}-a \,x^{4}-a \,x^{3}\right ) u \left (x \right )}{x^{3}} &=0 \end {align*}

Solving the above ODE (this ode solved using Maple, not this program), gives

\[ u \left (x \right ) = c_{1} \sin \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )+c_{2} \cos \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right ) \] The above shows that \[ u^{\prime }\left (x \right ) = \left ({\mathrm e}^{x}+x +1\right ) \left (c_{1} \cos \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )-c_{2} \sin \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )\right ) \sqrt {-a}\, x \] Using the above in (1) gives the solution \[ y = \frac {\left ({\mathrm e}^{x}+x +1\right ) \left (c_{1} \cos \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )-c_{2} \sin \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )\right ) \sqrt {-a}\, x^{2}}{\left (x \,{\mathrm e}^{x}+x^{2}+x \right ) \left (c_{1} \sin \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )+c_{2} \cos \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )\right )} \] Dividing both numerator and denominator by \(c_{1}\) gives, after renaming the constant \(\frac {c_{2}}{c_{1}}=c_{3}\) the following solution

\[ y = \frac {x \sqrt {-a}\, \left (c_{3} \cos \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )-\sin \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )\right )}{c_{3} \sin \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )+\cos \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {x \sqrt {-a}\, \left (c_{3} \cos \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )-\sin \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )\right )}{c_{3} \sin \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )+\cos \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )} \\ \end{align*}

Verification of solutions

\[ y = \frac {x \sqrt {-a}\, \left (c_{3} \cos \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )-\sin \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )\right )}{c_{3} \sin \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )+\cos \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}\right ) \sqrt {-a}}{6}\right )} \] Verified OK.

2.99.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & -x^{3} a \,{\mathrm e}^{x}-a \,x^{4}+x y^{2} {\mathrm e}^{x}+x^{2} y^{2}-a \,x^{3}+x y^{2}+y^{\prime } x -y=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=\frac {y+x^{3} a \,{\mathrm e}^{x}+a \,x^{4}+a \,x^{3}-x y^{2} {\mathrm e}^{x}-x^{2} y^{2}-x y^{2}}{x} \end {array} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying homogeneous D 
<- homogeneous successful`
 

Solution by Maple

Time used: 0.016 (sec). Leaf size: 37

dsolve(diff(y(x),x) = (y(x)+x^3*a*exp(x)+a*x^4+x^3*a-x*y(x)^2*exp(x)-x^2*y(x)^2-x*y(x)^2)/x,y(x), singsol=all)
 

\[ y \left (x \right ) = \tanh \left (\frac {\left (\left (6 x -6\right ) {\mathrm e}^{x}+2 x^{3}+3 x^{2}+6 c_{1} \right ) \sqrt {a}}{6}\right ) \sqrt {a}\, x \]

Solution by Mathematica

Time used: 12.255 (sec). Leaf size: 45

DSolve[y'[x] == (a*x^3 + a*E^x*x^3 + a*x^4 + y[x] - x*y[x]^2 - E^x*x*y[x]^2 - x^2*y[x]^2)/x,y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \sqrt {a} x \tanh \left (\frac {1}{6} \sqrt {a} \left (2 x^3+3 x^2+6 e^x (x-1)+6 c_1\right )\right ) \]