1.7 problem 7

1.7.1 Existence and uniqueness analysis
1.7.2 Solving as separable ode
1.7.3 Maple step by step solution

Internal problem ID [5720]
Internal file name [OUTPUT/4968_Sunday_June_05_2022_03_15_28_PM_33180416/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: 7.
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 {\left (x^{2}-1\right ) y^{\prime }+2 x y^{2}=0} \] With initial conditions \begin {align*} [y \left (0\right ) = 1] \end {align*}

1.7.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 {2 x \,y^{2}}{x^{2}-1} \end {align*}

The \(x\) domain of \(f(x,y)\) when \(y=1\) is \[ \{-\infty \le x <-1, -1<x <1, 1<x \le \infty \} \] And the point \(x_0 = 0\) is inside this domain. The \(y\) domain of \(f(x,y)\) when \(x=0\) is \[ \{-\infty <y <\infty \} \] And the point \(y_0 = 1\) is inside this domain. Now we will look at the continuity of \begin {align*} \frac {\partial f}{\partial y} &= \frac {\partial }{\partial y}\left (-\frac {2 x \,y^{2}}{x^{2}-1}\right ) \\ &= -\frac {4 x y}{x^{2}-1} \end {align*}

The \(x\) domain of \(\frac {\partial f}{\partial y}\) when \(y=1\) is \[ \{-\infty \le x <-1, -1<x <1, 1<x \le \infty \} \] And the point \(x_0 = 0\) is inside this domain. The \(y\) domain of \(\frac {\partial f}{\partial y}\) when \(x=0\) is \[ \{-\infty <y <\infty \} \] And the point \(y_0 = 1\) is inside this domain. Therefore solution exists and is unique.

1.7.2 Solving as separable ode

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

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

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

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

Substituting this in the general solution gives \begin {align*} y&=-\frac {1}{-\ln \left (x -1\right )-\ln \left (1+x \right )-1+i \pi } \end {align*}

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

Summary

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

Verification of solutions

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

1.7.3 Maple step by step solution

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

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

\[ y \left (x \right ) = \frac {1}{-i \pi +\ln \left (x -1\right )+\ln \left (x +1\right )+1} \]

Solution by Mathematica

Time used: 0.162 (sec). Leaf size: 26

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

\[ y(x)\to \frac {i}{i \log \left (x^2-1\right )+\pi +i} \]