2.8 problem 8

2.8.1 Existence and uniqueness analysis
2.8.2 Solving as separable ode
2.8.3 Maple step by step solution

Internal problem ID [4756]
Internal file name [OUTPUT/4249_Sunday_June_05_2022_12_47_47_PM_42089755/index.tex]

Book: Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section: Chapter 8, Ordinary differential equations. Section 2. Separable equations. page 398
Problem number: 8.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[_separable]

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

2.8.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)\\ &= -2 x \,y^{2} \end {align*}

The \(x\) domain of \(f(x,y)\) when \(y=1\) is \[ \{-\infty

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

2.8.2 Solving as separable ode

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

Where \(f(x)=-2 x\) and \(g(y)=y^{2}\). Integrating both sides gives \begin{align*} \frac {1}{y^{2}} \,dy &= -2 x \,d x \\ \int { \frac {1}{y^{2}} \,dy} &= \int {-2 x \,d x} \\ -\frac {1}{y}&=-x^{2}+c_{1} \\ \end{align*} Which results in \begin{align*} y &= -\frac {1}{-x^{2}+c_{1}} \\ \end{align*} Initial conditions are used to solve for \(c_{1}\). Substituting \(x=2\) and \(y=1\) in the above solution gives an equation to solve for the constant of integration. \begin {align*} 1 = -\frac {1}{c_{1} -4} \end {align*}

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

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

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

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

Summary

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

(a) Solution plot

(b) Slope field plot

Verification of solutions

\[ y = \frac {1}{x^{2}-3} \] Verified OK.

2.8.3 Maple step by step solution

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

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

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

Solution by Mathematica

Time used: 0.121 (sec). Leaf size: 12

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

\[ y(x)\to \frac {1}{x^2-3} \]