1.9 problem 9

1.9.1 Existence and uniqueness analysis
1.9.2 Solving as separable ode
1.9.3 Maple step by step solution

Internal problem ID [5722]
Internal file name [OUTPUT/4970_Sunday_June_05_2022_03_15_33_PM_21795739/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: 9.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "exact", "riccati", "bernoulli", "separable", "first_order_ode_lie_symmetry_lookup"

Maple gives the following as the ode type

[_separable]

\[ \boxed {y^{\prime } x +y-y^{2}=0} \] With initial conditions \begin {align*} \left [y \left (1\right ) = {\frac {1}{2}}\right ] \end {align*}

1.9.1 Existence and uniqueness analysis

This is non linear first order ODE. In canonical form it is written as \begin {align*} y^{\prime } &= f(x,y)\\ &= \frac {y \left (y -1\right )}{x} \end {align*}

The \(x\) domain of \(f(x,y)\) when \(y={\frac {1}{2}}\) is \[ \{x <0\boldsymbol {\lor }0

The \(x\) domain of \(\frac {\partial f}{\partial y}\) when \(y={\frac {1}{2}}\) is \[ \{-\infty

1.9.2 Solving as separable ode

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

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

Which simplifies to \begin {align*} \frac {y -1}{y} &= c_{2} x \end {align*}

Initial conditions are used to solve for \(c_{2}\). Substituting \(x=1\) and \(y={\frac {1}{2}}\) in the above solution gives an equation to solve for the constant of integration. \begin {align*} {\frac {1}{2}} = -\frac {1}{c_{2} -1} \end {align*}

The solutions are \begin {align*} c_{2} = -1 \end {align*}

Trying the constant \begin {align*} c_{2} = -1 \end {align*}

Substituting this in the general solution gives \begin {align*} y&=\frac {1}{1+x} \end {align*}

The constant \(c_{2} = -1\) gives valid solution.

Summary

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

(a) Solution plot

(b) Slope field plot

Verification of solutions

\[ y = \frac {1}{1+x} \] Verified OK.

1.9.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime } x +y-y^{2}=0, y \left (1\right )=\frac {1}{2}\right ] \\ \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^{2}-y}{x} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {y^{\prime }}{y^{2}-y}=\frac {1}{x} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {y^{\prime }}{y^{2}-y}d x =\int \frac {1}{x}d x +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \ln \left (y-1\right )-\ln \left (y\right )=\ln \left (x \right )+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=-\frac {1}{-1+x \,{\mathrm e}^{c_{1}}} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (1\right )=\frac {1}{2} \\ {} & {} & \frac {1}{2}=-\frac {1}{{\mathrm e}^{c_{1}}-1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =\mathrm {I} \pi \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =\mathrm {I} \pi \hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y=\frac {1}{1+x} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=\frac {1}{1+x} \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.078 (sec). Leaf size: 9

dsolve([x*diff(y(x),x)+y(x)=y(x)^2,y(1) = 1/2],y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {1}{x +1} \]

Solution by Mathematica

Time used: 0.252 (sec). Leaf size: 10

DSolve[{x*y'[x]+y[x]==y[x]^2,{y[1]==1/2}},y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \frac {1}{x+1} \]