4.10 problem Problem 18

4.10.1 Solving as homogeneous ode
4.10.2 Maple step by step solution

Internal problem ID [2674]
Internal file name [OUTPUT/2166_Sunday_June_05_2022_02_51_21_AM_90768622/index.tex]

Book: Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section: Chapter 1, First-Order Differential Equations. Section 1.8, Change of Variables. page 79
Problem number: Problem 18.
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`]]

\[ \boxed {2 y^{\prime } x y-x^{2} {\mathrm e}^{-\frac {y^{2}}{x^{2}}}-2 y^{2}=0} \]

4.10.1 Solving as homogeneous ode

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

An ode of the form \(y' = \frac {M(x,y)}{N(x,y)}\) is called homogeneous if the functions \(M(x,y)\) and \(N(x,y)\) are both homogeneous functions and of the same order. Recall that a function \(f(x,y)\) is homogeneous of order \(n\) if \[ f(t^n x, t^n y)= t^n f(x,y) \] In this case, it can be seen that both \(M=x^{2} {\mathrm e}^{-\frac {y^{2}}{x^{2}}}+2 y^{2}\) and \(N=2 y x\) are both homogeneous and of the same order \(n=2\). Therefore this is a homogeneous ode. Since this ode is homogeneous, it is converted to separable ODE using the substitution \(u=\frac {y}{x}\), or \(y=ux\). Hence \[ \frac { \mathop {\mathrm {d}y}}{\mathop {\mathrm {d}x}}= \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}}x + u \] Applying the transformation \(y=ux\) to the above ODE in (1) gives \begin {align*} \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}}x + u &= \frac {{\mathrm e}^{-u^{2}}}{2 u}+u\\ \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}} &= \frac {{\mathrm e}^{-u \left (x \right )^{2}}}{2 u \left (x \right ) x} \end {align*}

Or \[ u^{\prime }\left (x \right )-\frac {{\mathrm e}^{-u \left (x \right )^{2}}}{2 u \left (x \right ) x} = 0 \] Or \[ 2 u^{\prime }\left (x \right ) u \left (x \right ) {\mathrm e}^{u \left (x \right )^{2}} x -1 = 0 \] Which is now solved as separable in \(u \left (x \right )\). Which is now solved in \(u \left (x \right )\). In canonical form the ODE is \begin {align*} u' &= F(x,u)\\ &= f( x) g(u)\\ &= \frac {{\mathrm e}^{-u^{2}}}{2 u x} \end {align*}

Where \(f(x)=\frac {1}{2 x}\) and \(g(u)=\frac {{\mathrm e}^{-u^{2}}}{u}\). Integrating both sides gives \begin{align*} \frac {1}{\frac {{\mathrm e}^{-u^{2}}}{u}} \,du &= \frac {1}{2 x} \,d x \\ \int { \frac {1}{\frac {{\mathrm e}^{-u^{2}}}{u}} \,du} &= \int {\frac {1}{2 x} \,d x} \\ \frac {{\mathrm e}^{u^{2}}}{2}&=\frac {\ln \left (x \right )}{2}+c_{2} \\ \end{align*} The solution is \[ \frac {{\mathrm e}^{u \left (x \right )^{2}}}{2}-\frac {\ln \left (x \right )}{2}-c_{2} = 0 \] Now \(u\) in the above solution is replaced back by \(y\) using \(u=\frac {y}{x}\) which results in the solution \[ \frac {{\mathrm e}^{\frac {y^{2}}{x^{2}}}}{2}-\frac {\ln \left (x \right )}{2}-c_{2} = 0 \]

Summary

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

Figure 94: Slope field plot

Verification of solutions

\[ \frac {{\mathrm e}^{\frac {y^{2}}{x^{2}}}}{2}-\frac {\ln \left (x \right )}{2}-c_{2} = 0 \] Verified OK.

4.10.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & 2 y^{\prime } x y-x^{2} {\mathrm e}^{-\frac {y^{2}}{x^{2}}}-2 y^{2}=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 {x^{2} {\mathrm e}^{-\frac {y^{2}}{x^{2}}}+2 y^{2}}{2 x y} \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.0 (sec). Leaf size: 26

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

\begin{align*} y \left (x \right ) &= \sqrt {\ln \left (\ln \left (x \right )+c_{1} \right )}\, x \\ y \left (x \right ) &= -\sqrt {\ln \left (\ln \left (x \right )+c_{1} \right )}\, x \\ \end{align*}

Solution by Mathematica

Time used: 2.17 (sec). Leaf size: 38

DSolve[2*x*y[x]*y'[x]-(x^2*Exp[-y[x]^2/x^2]+2*y[x]^2)==0,y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to -x \sqrt {\log (\log (x)+2 c_1)} \\ y(x)\to x \sqrt {\log (\log (x)+2 c_1)} \\ \end{align*}