2.9 problem Problem 9

2.9.1 Solving as separable ode
2.9.2 Maple step by step solution

Internal problem ID [2630]
Internal file name [OUTPUT/2122_Sunday_June_05_2022_02_49_20_AM_4206466/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.4, Separable Differential Equations. page 43
Problem number: Problem 9.
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 }-\frac {x \left (y^{2}-1\right )}{2 \left (-2+x \right ) \left (x -1\right )}=0} \]

2.9.1 Solving as separable ode

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

Where \(f(x)=\frac {x}{\left (-2+x \right ) \left (x -1\right )}\) and \(g(y)=\frac {y^{2}}{2}-\frac {1}{2}\). Integrating both sides gives \begin{align*} \frac {1}{\frac {y^{2}}{2}-\frac {1}{2}} \,dy &= \frac {x}{\left (-2+x \right ) \left (x -1\right )} \,d x \\ \int { \frac {1}{\frac {y^{2}}{2}-\frac {1}{2}} \,dy} &= \int {\frac {x}{\left (-2+x \right ) \left (x -1\right )} \,d x} \\ -2 \,\operatorname {arctanh}\left (y \right )&=-\ln \left (x -1\right )+2 \ln \left (-2+x \right )+c_{1} \\ \end{align*} Which results in \begin{align*} y &= -\tanh \left (-\frac {\ln \left (x -1\right )}{2}+\ln \left (-2+x \right )+\frac {c_{1}}{2}\right ) \\ \end{align*}

Summary

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

Figure 55: Slope field plot

Verification of solutions

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

2.9.2 Maple step by step solution

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

Maple trace

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

Solution by Maple

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

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

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

Solution by Mathematica

Time used: 0.882 (sec). Leaf size: 51

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

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