2.7 problem Problem 7

2.7.1 Solving as separable ode
2.7.2 Maple step by step solution

Internal problem ID [2628]
Internal file name [OUTPUT/2120_Sunday_June_05_2022_02_49_15_AM_13431656/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 7.
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-y^{\prime } x +2 y^{\prime } x^{2}=3} \]

2.7.1 Solving as separable ode

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

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

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

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

Summary

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

Figure 51: Slope field plot

Verification of solutions

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

2.7.2 Maple step by step solution

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

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

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

Solution by Mathematica

Time used: 0.032 (sec). Leaf size: 24

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

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