Internal problem ID [2633]
Internal file name [OUTPUT/2125_Sunday_June_05_2022_02_49_28_AM_75197817/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 12.
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 }+y^{2}=-1} \] With initial conditions \begin {align*} [y \left (0\right ) = 1] \end {align*}
This is non linear first order ODE. In canonical form it is written as \begin {align*} y^{\prime } &= f(x,y)\\ &= -\frac {y^{2}+1}{x^{2}+1} \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
In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= f( x) g(y)\\ &= \frac {-y^{2}-1}{x^{2}+1} \end {align*}
Where \(f(x)=\frac {1}{x^{2}+1}\) and \(g(y)=-y^{2}-1\). Integrating both sides gives \begin{align*}
\frac {1}{-y^{2}-1} \,dy &= \frac {1}{x^{2}+1} \,d x \\
\int { \frac {1}{-y^{2}-1} \,dy} &= \int {\frac {1}{x^{2}+1} \,d x} \\
-\arctan \left (y \right )&=\arctan \left (x \right )+c_{1} \\
\end{align*} Which results in \begin{align*}
y &= -\tan \left (\arctan \left (x \right )+c_{1} \right ) \\
\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 = -\tan \left (c_{1} \right ) \end {align*}
The solutions are \begin {align*} c_{1} = -\frac {\pi }{4} \end {align*}
Trying the constant \begin {align*} c_{1} = -\frac {\pi }{4} \end {align*}
Substituting this in the general solution gives \begin {align*} y&=\frac {1-x}{x +1} \end {align*}
The constant \(c_{1} = -\frac {\pi }{4}\) gives valid solution.
Summary
The solution(s) found are the following \begin{align*}
\tag{1} y &= \frac {1-x}{x +1} \\
\end{align*} Verification of solutions
\[
y = \frac {1-x}{x +1}
\] Verified OK. \[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [\left (x^{2}+1\right ) y^{\prime }+y^{2}=-1, 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 {-y^{2}-1}{x^{2}+1} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {y^{\prime }}{-y^{2}-1}=\frac {1}{x^{2}+1} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {y^{\prime }}{-y^{2}-1}d x =\int \frac {1}{x^{2}+1}d x +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & -\arctan \left (y\right )=\arctan \left (x \right )+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=-\tan \left (\arctan \left (x \right )+c_{1} \right ) \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=1 \\ {} & {} & 1=-\tan \left (c_{1} \right ) \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =-\frac {\pi }{4} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =-\frac {\pi }{4}\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y=\cot \left (\arctan \left (x \right )+\frac {\pi }{4}\right ) \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=\cot \left (\arctan \left (x \right )+\frac {\pi }{4}\right ) \end {array} \]
Maple trace
✓ Solution by Maple
Time used: 0.016 (sec). Leaf size: 11
\[
y \left (x \right ) = \cot \left (\arctan \left (x \right )+\frac {\pi }{4}\right )
\]
✓ Solution by Mathematica
Time used: 0.243 (sec). Leaf size: 14
\[
y(x)\to \cot \left (\arctan (x)+\frac {\pi }{4}\right )
\]
2.12.2 Solving as separable ode
2.12.3 Maple step by step solution
`Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
trying Bernoulli
trying separable
<- separable successful`
dsolve([(x^2+1)*diff(y(x),x)+y(x)^2=-1,y(0) = 1],y(x), singsol=all)
DSolve[{(x^2+1)*y'[x]+y[x]^2==-1,{y[0]==1}},y[x],x,IncludeSingularSolutions -> True]