5.3 problem Example 3(a) (As Riccati)

5.3.1 Solving as riccati ode
5.3.2 Maple step by step solution

Internal problem ID [977]
Internal file name [OUTPUT/977_Sunday_June_05_2022_01_55_47_AM_9394587/index.tex]

Book: Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section: Chapter 2, First order equations. Transformation of Nonlinear Equations into Separable Equations. Section 2.4 Page 68
Problem number: Example 3(a) (As Riccati).
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program :

Maple gives the following as the ode type

[[_homogeneous, `class A`], _rational, _Riccati]

\[ \boxed {x^{2} y^{\prime }-y^{2}-x y=-x^{2}} \]

5.3.1 Solving as riccati ode

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

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

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

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

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

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {\left (-x^{2}+c_{3} \right ) x}{x^{2}+c_{3}} \\ \end{align*}

Figure 164: Slope field plot

Verification of solutions

\[ y = \frac {\left (-x^{2}+c_{3} \right ) x}{x^{2}+c_{3}} \] Verified OK.

5.3.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x^{2} y^{\prime }-y^{2}-x y=-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^{2}+x y-x^{2}}{x^{2}} \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: 12

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

\[ y \left (x \right ) = -\tanh \left (\ln \left (x \right )+c_{1} \right ) x \]

Solution by Mathematica

Time used: 0.298 (sec). Leaf size: 298

DSolve[y'[x]==y[x]^2+x*y[x]-x^2,y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \frac {5 \left (\sqrt {5}-1\right ) x \left (c_1 \operatorname {HermiteH}\left (\frac {1}{10} \left (-5+\sqrt {5}\right ),\frac {\sqrt [4]{5} x}{\sqrt {2}}\right )-\operatorname {Hypergeometric1F1}\left (\frac {5}{4}-\frac {1}{4 \sqrt {5}},\frac {3}{2},\frac {\sqrt {5} x^2}{2}\right )+\operatorname {Hypergeometric1F1}\left (\frac {1}{20} \left (5-\sqrt {5}\right ),\frac {1}{2},\frac {\sqrt {5} x^2}{2}\right )\right )-\sqrt {2} \sqrt [4]{5} \left (\sqrt {5}-5\right ) c_1 \operatorname {HermiteH}\left (\frac {1}{10} \left (-15+\sqrt {5}\right ),\frac {\sqrt [4]{5} x}{\sqrt {2}}\right )}{10 \left (\operatorname {Hypergeometric1F1}\left (\frac {1}{20} \left (5-\sqrt {5}\right ),\frac {1}{2},\frac {\sqrt {5} x^2}{2}\right )+c_1 \operatorname {HermiteH}\left (\frac {1}{10} \left (-5+\sqrt {5}\right ),\frac {\sqrt [4]{5} x}{\sqrt {2}}\right )\right )} \\ y(x)\to \frac {1}{2} \left (\sqrt {5}-1\right ) x-\frac {\left (\sqrt {5}-5\right ) \operatorname {HermiteH}\left (\frac {1}{10} \left (-15+\sqrt {5}\right ),\frac {\sqrt [4]{5} x}{\sqrt {2}}\right )}{\sqrt {2} 5^{3/4} \operatorname {HermiteH}\left (\frac {1}{10} \left (-5+\sqrt {5}\right ),\frac {\sqrt [4]{5} x}{\sqrt {2}}\right )} \\ \end{align*}