13.14 problem 368

13.14.1 Solving as homogeneousTypeD2 ode
13.14.2 Solving as riccati ode
13.14.3 Maple step by step solution

Internal problem ID [3624]
Internal file name [OUTPUT/3117_Sunday_June_05_2022_08_52_40_AM_94394201/index.tex]

Book: Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section: Various 13
Problem number: 368.
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`], _rational, _Riccati]

\[ \boxed {x \left (c \,x^{2}+b x +a \right ) y^{\prime }-\left (c \,x^{2}+b x +a \right ) y-y^{2}=-x^{2}} \]

13.14.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 \left (c \,x^{2}+b x +a \right ) \left (u^{\prime }\left (x \right ) x +u \left (x \right )\right )-\left (c \,x^{2}+b x +a \right ) u \left (x \right ) x -u \left (x \right )^{2} x^{2} = -x^{2} \end {align*}

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

Where \(f(x)=\frac {1}{c \,x^{2}+b x +a}\) and \(g(u)=u^{2}-1\). Integrating both sides gives \begin{align*} \frac {1}{u^{2}-1} \,du &= \frac {1}{c \,x^{2}+b x +a} \,d x \\ \int { \frac {1}{u^{2}-1} \,du} &= \int {\frac {1}{c \,x^{2}+b x +a} \,d x} \\ -\operatorname {arctanh}\left (u \right )&=\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}+c_{2} \\ \end{align*} The solution is \[ -\operatorname {arctanh}\left (u \left (x \right )\right )-\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}-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*} -\operatorname {arctanh}\left (\frac {y}{x}\right )-\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}-c_{2} = 0\\ -\operatorname {arctanh}\left (\frac {y}{x}\right )-\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}-c_{2} = 0 \end {align*}

Summary

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

Verification of solutions

\[ -\operatorname {arctanh}\left (\frac {y}{x}\right )-\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}-c_{2} = 0 \] Verified OK.

13.14.2 Solving as riccati ode

In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= \frac {c \,x^{2} y +b x y +a y -x^{2}+y^{2}}{x \left (c \,x^{2}+b x +a \right )} \end {align*}

This is a Riccati ODE. Comparing the ODE to solve \[ y' = \frac {x c y}{c \,x^{2}+b x +a}+\frac {b y}{c \,x^{2}+b x +a}+\frac {a y}{x \left (c \,x^{2}+b x +a \right )}-\frac {x}{c \,x^{2}+b x +a}+\frac {y^{2}}{x \left (c \,x^{2}+b x +a \right )} \] 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}{c \,x^{2}+b x +a}\), \(f_1(x)=\frac {1}{x}\) and \(f_2(x)=\frac {1}{x \left (c \,x^{2}+b x +a \right )}\). Let \begin {align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{\frac {u}{x \left (c \,x^{2}+b x +a \right )}} \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 {1}{x^{2} \left (c \,x^{2}+b x +a \right )}-\frac {2 c x +b}{x \left (c \,x^{2}+b x +a \right )^{2}}\\ f_1 f_2 &=\frac {1}{x^{2} \left (c \,x^{2}+b x +a \right )}\\ f_2^2 f_0 &=-\frac {1}{x \left (c \,x^{2}+b x +a \right )^{3}} \end {align*}

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

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

\[ u \left (x \right ) = c_{1} \sinh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )+c_{2} \cosh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right ) \] The above shows that \[ u^{\prime }\left (x \right ) = \frac {c_{1} \cosh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )+c_{2} \sinh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )}{c \,x^{2}+b x +a} \] Using the above in (1) gives the solution \[ y = -\frac {\left (c_{1} \cosh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )+c_{2} \sinh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )\right ) x}{c_{1} \sinh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )+c_{2} \cosh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\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 {\left (c_{3} \cosh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )+\sinh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )\right ) x}{c_{3} \sinh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )+\cosh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= -\frac {\left (c_{3} \cosh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )+\sinh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )\right ) x}{c_{3} \sinh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )+\cosh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )} \\ \end{align*}

Verification of solutions

\[ y = -\frac {\left (c_{3} \cosh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )+\sinh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )\right ) x}{c_{3} \sinh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )+\cosh \left (\frac {2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )} \] Verified OK.

13.14.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x \left (c \,x^{2}+b x +a \right ) y^{\prime }-\left (c \,x^{2}+b x +a \right ) y-y^{2}=-x^{2} \\ \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 {-x^{2}+\left (c \,x^{2}+b x +a \right ) y+y^{2}}{x \left (c \,x^{2}+b x +a \right )} \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: 58

dsolve(x*(c*x^2+b*x+a)*diff(y(x),x)+x^2-(c*x^2+b*x+a)*y(x) = y(x)^2,y(x), singsol=all)
 

\[ y \left (x \right ) = -\tanh \left (\frac {c_{1} \sqrt {4 a c -b^{2}}+2 \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right ) x \]

Solution by Mathematica

Time used: 1.182 (sec). Leaf size: 116

DSolve[x(a+b x +c x^2)y'[x]+x^2-(a+b x+c x^2)y[x]==y[x]^2,y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to -\frac {x \left (-1+\exp \left (\frac {4 \arctan \left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right )}{\sqrt {4 a c-b^2}}+2 c_1\right )\right )}{1+\exp \left (\frac {4 \arctan \left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right )}{\sqrt {4 a c-b^2}}+2 c_1\right )} \\ y(x)\to -x \\ y(x)\to x \\ \end{align*}