1.179 problem 180

1.179.1 Solving as homogeneousTypeD2 ode
1.179.2 Solving as riccati ode
1.179.3 Maple step by step solution

Internal problem ID [8516]
Internal file name [OUTPUT/7449_Sunday_June_05_2022_10_55_21_PM_22604732/index.tex]

Book: Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section: Chapter 1, linear first order
Problem number: 180.
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 {\left (a \,x^{2}+x b +c \right ) \left (y^{\prime } x -y\right )-y^{2}=-x^{2}} \]

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

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

1.179.2 Solving as riccati ode

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

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

Substituting the above terms back in equation (2) gives \begin {align*} \frac {u^{\prime \prime }\left (x \right )}{\left (a \,x^{2}+x b +c \right ) x}+\frac {\left (2 x a +b \right ) u^{\prime }\left (x \right )}{\left (a \,x^{2}+x b +c \right )^{2} x}-\frac {u \left (x \right )}{\left (a \,x^{2}+x b +c \right )^{3} x} &=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 x a +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 x a +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 x a +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 x a +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )}{a \,x^{2}+x b +c} \] Using the above in (1) gives the solution \[ y = -\frac {\left (c_{1} \cosh \left (\frac {2 \arctan \left (\frac {2 x a +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 x a +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 x a +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 x a +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_{1} \cosh \left (\frac {2 \arctan \left (\frac {2 x a +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 x a +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 x a +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 x a +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_{1} \cosh \left (\frac {2 \arctan \left (\frac {2 x a +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 x a +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 x a +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 x a +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )} \\ \end{align*}

Verification of solutions

\[ y = -\frac {\left (c_{1} \cosh \left (\frac {2 \arctan \left (\frac {2 x a +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 x a +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 x a +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 x a +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )} \] Verified OK.

1.179.3 Maple step by step solution

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

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

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

Solution by Mathematica

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

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

\begin{align*} y(x)\to -\frac {x \left (-1+\exp \left (\frac {4 \arctan \left (\frac {2 a x+b}{\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 {2 a x+b}{\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*}