1.11 problem 11

1.11.1 Solving as separable ode
1.11.2 Maple step by step solution

Internal problem ID [5724]
Internal file name [OUTPUT/4972_Sunday_June_05_2022_03_15_36_PM_7671639/index.tex]

Book: Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section: Chapter 1. First order differential equations. Section 1.1 Separable equations problems. page 7
Problem number: 11.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[_separable]

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

1.11.1 Solving as separable ode

In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= f( x) g(y)\\ &= x y \left (y +2\right ) \end {align*}

Where \(f(x)=x\) and \(g(y)=y \left (y +2\right )\). Integrating both sides gives \begin{align*} \frac {1}{y \left (y +2\right )} \,dy &= x \,d x \\ \int { \frac {1}{y \left (y +2\right )} \,dy} &= \int {x \,d x} \\ \frac {\ln \left (y \right )}{2}-\frac {\ln \left (y +2\right )}{2}&=\frac {x^{2}}{2}+c_{1} \\ \end{align*} The above can be written as \begin {align*} \left ({\frac {1}{2}}\right ) \left (\ln \left (y \right )-\ln \left (y +2\right )\right ) &= \frac {x^{2}}{2}+2 c_{1}\\ \ln \left (y \right )-\ln \left (y +2\right ) &= \left (2\right ) \left (\frac {x^{2}}{2}+2 c_{1}\right ) \\ &= x^{2}+4 c_{1} \end {align*}

Raising both side to exponential gives \begin {align*} {\mathrm e}^{\ln \left (y \right )-\ln \left (y +2\right )} &= {\mathrm e}^{x^{2}+2 c_{1}} \end {align*}

Which simplifies to \begin {align*} \frac {y}{y +2} &= 2 c_{1} {\mathrm e}^{x^{2}}\\ &= c_{2} {\mathrm e}^{x^{2}} \end {align*}

Summary

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

Figure 8: Slope field plot

Verification of solutions

\[ y = -\frac {2 c_{2} {\mathrm e}^{x^{2}}}{-1+c_{2} {\mathrm e}^{x^{2}}} \] Verified OK.

1.11.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-x y^{2}-2 x y=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 }=x y^{2}+2 x y \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {y^{\prime }}{y \left (y+2\right )}=x \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {y^{\prime }}{y \left (y+2\right )}d x =\int x d x +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & -\frac {\ln \left (y+2\right )}{2}+\frac {\ln \left (y\right )}{2}=\frac {x^{2}}{2}+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=-\frac {2 \,{\mathrm e}^{x^{2}+2 c_{1}}}{-1+{\mathrm e}^{x^{2}+2 c_{1}}} \end {array} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
<- Bernoulli successful`
 

Solution by Maple

Time used: 0.015 (sec). Leaf size: 19

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

\[ y \left (x \right ) = \frac {2}{-1+2 \,{\mathrm e}^{-x^{2}} c_{1}} \]

Solution by Mathematica

Time used: 0.276 (sec). Leaf size: 37

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

\begin{align*} y(x)\to -\frac {e^{x^2+c_1}}{-1+e^{x^2+c_1}} \\ y(x)\to -1 \\ y(x)\to 0 \\ \end{align*}