2.9 problem 9

2.9.1 Existence and uniqueness analysis
2.9.2 Solving as riccati ode
2.9.3 Maple step by step solution

Internal problem ID [12907]
Internal file name [OUTPUT/11560_Tuesday_November_07_2023_11_27_03_PM_52077065/index.tex]

Book: DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section: Chapter 1. First-Order Differential Equations. Exercises section 1.3 page 47
Problem number: 9.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[_Riccati]

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

2.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(t,y)\\ &= \frac {\left (2 y +1\right ) \left (t +y \right )}{2} \end {align*}

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

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

2.9.2 Solving as riccati ode

In canonical form the ODE is \begin {align*} y' &= F(t,y)\\ &= \frac {\left (2 y +1\right ) \left (t +y \right )}{2} \end {align*}

This is a Riccati ODE. Comparing the ODE to solve \[ y' = y t +y^{2}+\frac {1}{2} t +\frac {1}{2} y \] With Riccati ODE standard form \[ y' = f_0(t)+ f_1(t)y+f_2(t)y^{2} \] Shows that \(f_0(t)=\frac {t}{2}\), \(f_1(t)=\frac {1}{2}+t\) and \(f_2(t)=1\). Let \begin {align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{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''(t) -\left ( f_2' + f_1 f_2 \right ) u'(t) + f_2^2 f_0 u(t) &= 0 \tag {2} \end {align*}

But \begin {align*} f_2' &=0\\ f_1 f_2 &=\frac {1}{2}+t\\ f_2^2 f_0 &=\frac {t}{2} \end {align*}

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

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

\[ u \left (t \right ) = {\mathrm e}^{\frac {t}{2}} \left (c_{1} +\operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right ) c_{2} \right ) \] The above shows that \[ u^{\prime }\left (t \right ) = \frac {{\mathrm e}^{\frac {t}{2}} \left (i {\mathrm e}^{\frac {\left (2 t -1\right )^{2}}{8}} \sqrt {2}\, c_{2} +\frac {\left (c_{1} +\operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right ) c_{2} \right ) \sqrt {\pi }}{2}\right )}{\sqrt {\pi }} \] Using the above in (1) gives the solution \[ y = -\frac {i {\mathrm e}^{\frac {\left (2 t -1\right )^{2}}{8}} \sqrt {2}\, c_{2} +\frac {\left (c_{1} +\operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right ) c_{2} \right ) \sqrt {\pi }}{2}}{\sqrt {\pi }\, \left (c_{1} +\operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right ) c_{2} \right )} \] Dividing both numerator and denominator by \(c_{1}\) gives, after renaming the constant \(\frac {c_{2}}{c_{1}}=c_{3}\) the following solution

\[ y = -\frac {2 \left (i {\mathrm e}^{\frac {\left (2 t -1\right )^{2}}{8}} \sqrt {2}+\frac {\left (c_{3} +\operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right )\right ) \sqrt {\pi }}{2}\right )}{\sqrt {\pi }\, \left (2 c_{3} +2 \,\operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right )\right )} \] Initial conditions are used to solve for \(c_{3}\). Substituting \(t=0\) 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 {2 i {\mathrm e}^{\frac {1}{8}} \sqrt {2}-\sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )+\sqrt {\pi }\, c_{3}}{-2 \sqrt {\pi }\, c_{3} +2 \sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )} \end {align*}

The solutions are \begin {align*} c_{3} = -\frac {i {\mathrm e}^{\frac {1}{8}} \sqrt {2}-\sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )}{\sqrt {\pi }} \end {align*}

Trying the constant \begin {align*} c_{3} = -\frac {i {\mathrm e}^{\frac {1}{8}} \sqrt {2}-\sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )}{\sqrt {\pi }} \end {align*}

Substituting this in the general solution gives \begin {align*} y&=\frac {2 i {\mathrm e}^{\frac {\left (2 t -1\right )^{2}}{8}} \sqrt {2}-i {\mathrm e}^{\frac {1}{8}} \sqrt {2}+\sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )+\sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right )}{2 i {\mathrm e}^{\frac {1}{8}} \sqrt {2}-2 \sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )-2 \sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right )} \end {align*}

The constant \(c_{3} = -\frac {i {\mathrm e}^{\frac {1}{8}} \sqrt {2}-\sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )}{\sqrt {\pi }}\) gives valid solution.

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {2 i {\mathrm e}^{\frac {\left (2 t -1\right )^{2}}{8}} \sqrt {2}-i {\mathrm e}^{\frac {1}{8}} \sqrt {2}+\sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )+\sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right )}{2 i {\mathrm e}^{\frac {1}{8}} \sqrt {2}-2 \sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )-2 \sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right )} \\ \end{align*}

Verification of solutions

\[ y = \frac {2 i {\mathrm e}^{\frac {\left (2 t -1\right )^{2}}{8}} \sqrt {2}-i {\mathrm e}^{\frac {1}{8}} \sqrt {2}+\sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )+\sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right )}{2 i {\mathrm e}^{\frac {1}{8}} \sqrt {2}-2 \sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )-2 \sqrt {\pi }\, \operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right )} \] Verified OK.

2.9.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }-\left (y+\frac {1}{2}\right ) \left (y+t \right )=0, y \left (0\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 }=\left (y+\frac {1}{2}\right ) \left (y+t \right ) \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=\frac {1}{2} \\ {} & {} & 0 \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} 0 \\ {} & {} & 0=0 \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} 0=0\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & 0 \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & 0 \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.188 (sec). Leaf size: 65

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

\[ y \left (t \right ) = \frac {\sqrt {\pi }\, {\mathrm e}^{-\frac {1}{8}} \sqrt {2}\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )+\sqrt {\pi }\, {\mathrm e}^{-\frac {1}{8}} \sqrt {2}\, \operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right )+4 i {\mathrm e}^{\frac {t \left (t -1\right )}{2}}-2 i}{-2 \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{8}} \sqrt {2}\, \operatorname {erf}\left (\frac {i \sqrt {2}}{4}\right )-2 \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{8}} \sqrt {2}\, \operatorname {erf}\left (\frac {i \sqrt {2}\, \left (2 t -1\right )}{4}\right )+4 i} \]

Solution by Mathematica

Time used: 0.332 (sec). Leaf size: 124

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

\[ y(t)\to \frac {-\sqrt {2 \pi } \text {erfi}\left (\frac {1-2 t}{2 \sqrt {2}}\right )+\sqrt {2 \pi } \text {erfi}\left (\frac {1}{2 \sqrt {2}}\right )+4 e^{\frac {1}{8} (1-2 t)^2}-2 \sqrt [8]{e}}{2 \sqrt {2 \pi } \text {erfi}\left (\frac {1-2 t}{2 \sqrt {2}}\right )-2 \sqrt {2 \pi } \text {erfi}\left (\frac {1}{2 \sqrt {2}}\right )+4 \sqrt [8]{e}} \]