1.97 problem 97

1.97.1 Solving as homogeneousTypeD2 ode
1.97.2 Solving as riccati ode
1.97.3 Maple step by step solution

Internal problem ID [8434]
Internal file name [OUTPUT/7367_Sunday_June_05_2022_10_53_46_PM_18533329/index.tex]

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

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

Integrating both sides gives \begin {align*} \int \frac {1}{-u^{2} a -b}d u &= x +c_{2}\\ -\frac {\arctan \left (\frac {a u}{\sqrt {a b}}\right )}{\sqrt {a b}}&=x +c_{2} \end {align*}

Solving for \(u\) gives these solutions \begin {align*} u_1&=-\frac {\tan \left (c_{2} \sqrt {a b}+x \sqrt {a b}\right ) \sqrt {a b}}{a} \end {align*}

Therefore the solution \(y\) is \begin {align*} y&=x u\\ &=-\frac {x \tan \left (c_{2} \sqrt {a b}+x \sqrt {a b}\right ) \sqrt {a b}}{a} \end {align*}

Summary

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

Verification of solutions

\[ y = -\frac {x \tan \left (c_{2} \sqrt {a b}+x \sqrt {a b}\right ) \sqrt {a b}}{a} \] Verified OK.

1.97.2 Solving as riccati ode

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

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

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

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

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

Summary

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

Verification of solutions

\[ y = \frac {\sqrt {b}\, \left (c_{1} \cos \left (\sqrt {a}\, \sqrt {b}\, x \right )-c_{2} \sin \left (\sqrt {a}\, \sqrt {b}\, x \right )\right ) x}{\sqrt {a}\, \left (c_{1} \sin \left (\sqrt {a}\, \sqrt {b}\, x \right )+c_{2} \cos \left (\sqrt {a}\, \sqrt {b}\, x \right )\right )} \] Verified OK.

1.97.3 Maple step by step solution

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

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

\[ y \left (x \right ) = -\frac {\tan \left (\sqrt {a b}\, \left (x +c_{1} \right )\right ) x \sqrt {a b}}{a} \]

Solution by Mathematica

Time used: 16.893 (sec). Leaf size: 36

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

\[ y(x)\to -\frac {\sqrt {b} x \tan \left (\sqrt {a} \sqrt {b} (x-c_1)\right )}{\sqrt {a}} \]