2.10 problem Problem 10

2.10.1 Solving as separable ode
2.10.2 Maple step by step solution

Internal problem ID [2631]
Internal file name [OUTPUT/2123_Sunday_June_05_2022_02_49_23_AM_6369853/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 10.
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 {y x^{2}-32}{-x^{2}+16}=2} \]

2.10.1 Solving as separable ode

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

Where \(f(x)=\frac {x^{2}}{x^{2}-16}\) and \(g(y)=-y +2\). Integrating both sides gives \begin{align*} \frac {1}{-y +2} \,dy &= \frac {x^{2}}{x^{2}-16} \,d x \\ \int { \frac {1}{-y +2} \,dy} &= \int {\frac {x^{2}}{x^{2}-16} \,d x} \\ -\ln \left (y -2\right )&=x +2 \ln \left (x -4\right )-2 \ln \left (4+x \right )+c_{1} \\ \end{align*} Raising both side to exponential gives \begin {align*} \frac {1}{y -2} &= {\mathrm e}^{x +2 \ln \left (x -4\right )-2 \ln \left (4+x \right )+c_{1}} \end {align*}

Which simplifies to \begin {align*} \frac {1}{y -2} &= c_{2} {\mathrm e}^{x +2 \ln \left (x -4\right )-2 \ln \left (4+x \right )} \end {align*}

Summary

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

Figure 56: Slope field plot

Verification of solutions

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

2.10.2 Maple step by step solution

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

Maple trace

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

Solution by Maple

Time used: 0.0 (sec). Leaf size: 29

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

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

Solution by Mathematica

Time used: 0.148 (sec). Leaf size: 40

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

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