10.1 problem 232

10.1.1 Solving as riccati ode
10.1.2 Maple step by step solution

Internal problem ID [15117]
Internal file name [OUTPUT/15118_Sunday_April_21_2024_01_32_44_PM_32782612/index.tex]

Book: A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section: Section 9. The Riccati equation. Exercises page 75
Problem number: 232.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "riccati"

Maple gives the following as the ode type

[[_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

\[ \boxed {y^{\prime } {\mathrm e}^{-x}+y^{2}-2 y \,{\mathrm e}^{x}=1-{\mathrm e}^{2 x}} \]

10.1.1 Solving as riccati ode

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

This is a Riccati ODE. Comparing the ODE to solve \[ y' = 2 y \,{\mathrm e}^{2 x}-{\mathrm e}^{x} y^{2}-{\mathrm e}^{3 x}+{\mathrm e}^{x} \] With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \] Shows that \(f_0(x)=-\left (-1+{\mathrm e}^{2 x}\right ) {\mathrm e}^{x}\), \(f_1(x)=2 \left ({\mathrm e}^{x}\right )^{2}\) and \(f_2(x)=-{\mathrm e}^{x}\). Let \begin {align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{-{\mathrm e}^{x} u} \tag {1} \end {align*}

Using the above substitution in the given ODE results (after some simplification)in a second order ODE to solve for \(u(x)\) which is \begin {align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end {align*}

But \begin {align*} f_2' &=-{\mathrm e}^{x}\\ f_1 f_2 &=-2 \,{\mathrm e}^{x} {\mathrm e}^{2 x}\\ f_2^2 f_0 &=-{\mathrm e}^{3 x} \left (-1+{\mathrm e}^{2 x}\right ) \end {align*}

Substituting the above terms back in equation (2) gives \begin {align*} -{\mathrm e}^{x} u^{\prime \prime }\left (x \right )-\left (-{\mathrm e}^{x}-2 \,{\mathrm e}^{x} {\mathrm e}^{2 x}\right ) u^{\prime }\left (x \right )-{\mathrm e}^{3 x} \left (-1+{\mathrm e}^{2 x}\right ) u \left (x \right ) &=0 \end {align*}

Solving the above ODE (this ode solved using Maple, not this program), gives

\[ u \left (x \right ) = {\mathrm e}^{\frac {x}{2}+\frac {{\mathrm e}^{2 x}}{2}} \left (c_{1} \sinh \left (\frac {x}{2}\right )+c_{2} \cosh \left (\frac {x}{2}\right )\right ) \] The above shows that \[ u^{\prime }\left (x \right ) = \left (\left ({\mathrm e}^{2 x} c_{2} +\frac {c_{1}}{2}+\frac {c_{2}}{2}\right ) \cosh \left (\frac {x}{2}\right )+\sinh \left (\frac {x}{2}\right ) \left (c_{1} {\mathrm e}^{2 x}+\frac {c_{1}}{2}+\frac {c_{2}}{2}\right )\right ) {\mathrm e}^{\frac {x}{2}+\frac {{\mathrm e}^{2 x}}{2}} \] Using the above in (1) gives the solution \[ y = \frac {\left (\left ({\mathrm e}^{2 x} c_{2} +\frac {c_{1}}{2}+\frac {c_{2}}{2}\right ) \cosh \left (\frac {x}{2}\right )+\sinh \left (\frac {x}{2}\right ) \left (c_{1} {\mathrm e}^{2 x}+\frac {c_{1}}{2}+\frac {c_{2}}{2}\right )\right ) {\mathrm e}^{-x}}{c_{1} \sinh \left (\frac {x}{2}\right )+c_{2} \cosh \left (\frac {x}{2}\right )} \] Dividing both numerator and denominator by \(c_{1}\) gives, after renaming the constant \(\frac {c_{2}}{c_{1}}=\textit {\_C3}\) the following solution

\[ y = \frac {\left (\left (\textit {\_C3} +1\right ) {\mathrm e}^{-x}+2 \,{\mathrm e}^{x}\right ) \cosh \left (\frac {x}{2}\right )+2 \left (\left (\frac {\textit {\_C3}}{2}+\frac {1}{2}\right ) {\mathrm e}^{-x}+\textit {\_C3} \,{\mathrm e}^{x}\right ) \sinh \left (\frac {x}{2}\right )}{2 \textit {\_C3} \sinh \left (\frac {x}{2}\right )+2 \cosh \left (\frac {x}{2}\right )} \]

Summary

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

Figure 295: Slope field plot

Verification of solutions

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

10.1.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime } {\mathrm e}^{-x}+y^{2}-2 y \,{\mathrm e}^{x}=1-{\mathrm e}^{2 x} \\ \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}+2 y \,{\mathrm e}^{x}+1-{\mathrm e}^{2 x}}{{\mathrm e}^{-x}} \end {array} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying Chini 
differential order: 1; looking for linear symmetries 
trying exact 
Looking for potential symmetries 
trying Riccati 
trying Riccati sub-methods: 
   <- Riccati particular polynomial solution successful`
 

Solution by Maple

Time used: 0.0 (sec). Leaf size: 23

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

\[ y \left (x \right ) = \frac {{\mathrm e}^{x}+{\mathrm e}^{2 x} c_{1} +c_{1}}{{\mathrm e}^{x} c_{1} +1} \]

Solution by Mathematica

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

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

\begin{align*} y(x)\to e^x+\frac {1}{e^x+c_1} \\ y(x)\to e^x \\ \end{align*}