5.2 problem 5

5.2.1 Solving as riccati ode
5.2.2 Maple step by step solution

Internal problem ID [1698]
Internal file name [OUTPUT/1699_Sunday_June_05_2022_02_27_54_AM_4434244/index.tex]

Book: Differential equations and their applications, 3rd ed., M. Braun
Section: Section 1.10. Page 80
Problem number: 5.
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 }-y-y^{2} \cos \left (t \right )=1} \]

5.2.1 Solving as riccati ode

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

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

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

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

\[ u \left (t \right ) = \left (-c_{2} \operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+c_{2} \operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-c_{1} \left (-\operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right )\right ) {\mathrm e}^{\frac {t}{2}} \] The above shows that \[ u^{\prime }\left (t \right ) = -4 \left (c_{1} \left (\frac {1}{8}+\left (\cos \left (\frac {t}{2}\right )^{2}-\frac {5}{8}\right ) \operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )\right ) \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+c_{2} \left (\frac {1}{8}+\left (\cos \left (\frac {t}{2}\right )^{2}-\frac {5}{8}\right ) \operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )\right ) \operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\frac {\left (\operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )-1\right ) \left (c_{1} \operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+c_{2} \operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right )}{8}\right ) {\mathrm e}^{\frac {t}{2}} \] Using the above in (1) gives the solution \[ y = \frac {4 c_{1} \left (\frac {1}{8}+\left (\cos \left (\frac {t}{2}\right )^{2}-\frac {5}{8}\right ) \operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )\right ) \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+4 c_{2} \left (\frac {1}{8}+\left (\cos \left (\frac {t}{2}\right )^{2}-\frac {5}{8}\right ) \operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )\right ) \operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\frac {\left (\operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )-1\right ) \left (c_{1} \operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+c_{2} \operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right )}{2}}{\cos \left (t \right ) \left (-c_{2} \operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+c_{2} \operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-c_{1} \left (-\operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right )\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 {c_{3} \left (1+\left (8 \cos \left (\frac {t}{2}\right )^{2}-5\right ) \operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )\right ) \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\left (8 \cos \left (\frac {t}{2}\right )^{2} \operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )-5 \,\operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )+1\right ) \operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\left (\operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )-1\right ) \left (c_{3} \operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right )}{4 \left (c_{3} \operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-c_{3} \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-\operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right ) \left (\cos \left (\frac {t}{2}\right )^{2}-\frac {1}{2}\right )} \] Simplifying the solution \(y = \frac {c_{3} \left (1+\left (8 \cos \left (\frac {t}{2}\right )^{2}-5\right ) \operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )\right ) \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\left (8 \cos \left (\frac {t}{2}\right )^{2} \operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )-5 \,\operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )+1\right ) \operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\left (\operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )-1\right ) \left (c_{3} \operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right )}{4 \left (c_{3} \operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-c_{3} \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-\operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right ) \left (\cos \left (\frac {t}{2}\right )^{2}-\frac {1}{2}\right )}\) to \(y = \frac {c_{3} \left (-4+8 \cos \left (\frac {t}{2}\right )^{2}\right ) \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\left (-4+8 \cos \left (\frac {t}{2}\right )^{2}\right ) \operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )}{4 \left (c_{3} \operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-c_{3} \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-\operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right ) \left (\cos \left (\frac {t}{2}\right )^{2}-\frac {1}{2}\right )}\)

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {c_{3} \left (-4+8 \cos \left (\frac {t}{2}\right )^{2}\right ) \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\left (-4+8 \cos \left (\frac {t}{2}\right )^{2}\right ) \operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )}{4 \left (c_{3} \operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-c_{3} \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-\operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right ) \left (\cos \left (\frac {t}{2}\right )^{2}-\frac {1}{2}\right )} \\ \end{align*}

Figure 83: Slope field plot

Verification of solutions

\[ y = \frac {c_{3} \left (-4+8 \cos \left (\frac {t}{2}\right )^{2}\right ) \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\left (-4+8 \cos \left (\frac {t}{2}\right )^{2}\right ) \operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )}{4 \left (c_{3} \operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-c_{3} \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-\operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right ) \left (\cos \left (\frac {t}{2}\right )^{2}-\frac {1}{2}\right )} \] Verified OK.

5.2.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-y-y^{2} \cos \left (t \right )=1 \\ \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 }=1+y+y^{2} \cos \left (t \right ) \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: 
   trying Riccati_symmetries 
   trying Riccati to 2nd Order 
   -> Calling odsolve with the ODE`, diff(diff(y(x), x), x) = -(sin(x)-cos(x))*(diff(y(x), x))/cos(x)-cos(x)*y(x), y(x)`      *** Su 
      Methods for second order ODEs: 
      --- Trying classification methods --- 
      trying a symmetry of the form [xi=0, eta=F(x)] 
      checking if the LODE is missing y 
      -> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power @ Moebius 
      -> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int(r(x), dx)) * 2F1([a1, a2], [b1], f) 
      -> Trying changes of variables to rationalize or make the ODE simpler 
         trying a symmetry of the form [xi=0, eta=F(x)] 
         checking if the LODE is missing y 
         -> Trying a solution in terms of special functions: 
            -> Bessel 
            -> elliptic 
            -> Legendre 
            -> Kummer 
               -> hyper3: Equivalence to 1F1 under a power @ Moebius 
            -> hypergeometric 
               -> heuristic approach 
               -> hyper3: Equivalence to 2F1, 1F1 or 0F1 under a power @ Moebius 
            -> Mathieu 
               -> Equivalence to the rational form of Mathieu ODE under a power @ Moebius 
         -> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power @ Moebius 
         -> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power @ Moebius 
         -> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int(r(x), dx)) * 2F1([a1, a2], [b1], f) 
            trying a symmetry of the form [xi=0, eta=F(x)] 
            trying 2nd order exact linear 
            trying symmetries linear in x and y(x) 
            trying to convert to a linear ODE with constant coefficients 
            -> trying with_periodic_functions in the coefficients 
         trying a symmetry of the form [xi=0, eta=F(x)] 
         checking if the LODE is missing y 
         -> Trying a solution in terms of special functions: 
            -> Bessel 
            -> elliptic 
            -> Legendre 
            -> Whittaker 
               -> hyper3: Equivalence to 1F1 under a power @ Moebius 
            -> hypergeometric 
               -> heuristic approach 
               -> hyper3: Equivalence to 2F1, 1F1 or 0F1 under a power @ Moebius 
            -> Mathieu 
               -> Equivalence to the rational form of Mathieu ODE under a power @ Moebius 
         -> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power @ Moebius 
         -> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power @ Moebius 
         -> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int(r(x), dx)) * 2F1([a1, a2], [b1], f) 
            trying a symmetry of the form [xi=0, eta=F(x)] 
            trying 2nd order exact linear 
            trying symmetries linear in x and y(x) 
            trying to convert to a linear ODE with constant coefficients 
            -> trying with_periodic_functions in the coefficients 
         trying a quadrature 
         checking if the LODE has constant coefficients 
         checking if the LODE is of Euler type 
         trying a symmetry of the form [xi=0, eta=F(x)] 
         checking if the LODE is missing y 
         -> Trying a Liouvillian solution using Kovacics algorithm 
         <- No Liouvillian solutions exists 
         -> Trying a solution in terms of special functions: 
            -> Bessel 
            -> elliptic 
            -> Legendre 
            -> Whittaker 
               -> hyper3: Equivalence to 1F1 under a power @ Moebius 
            -> hypergeometric 
               -> heuristic approach 
               -> hyper3: Equivalence to 2F1, 1F1 or 0F1 under a power @ Moebius 
            -> Mathieu 
               -> Equivalence to the rational form of Mathieu ODE under a power @ Moebius 
                     Equivalence transformation and function parameters: {z = 1/(t+1)}, {kappa = -24, mu = -32} 
                     <- Equivalence to the rational form of Mathieu ODE successful 
            <- Mathieu successful 
         <- special function solution successful 
         Change of variables used: 
            [x = 2*arctan(t)] 
         Linear ODE actually solved: 
            4*(t^4-2*t^2+1)/(t^4+2*t^2+1)*u(t)+(-2*t^3+2*t^2+6*t-2)*diff(u(t),t)+(-t^4+1)*diff(diff(u(t),t),t) = 0 
      <- change of variables successful 
   <- Riccati to 2nd Order successful`
 

Solution by Maple

Time used: 0.016 (sec). Leaf size: 129

dsolve(diff(y(t),t)= 1+y(t)+y(t)^2*cos(t),y(t), singsol=all)
 

\[ y \left (t \right ) = -\frac {\operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right ) \left (\left (-4 \cos \left (t \right )-\operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )+1\right ) \operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-4 c_{1} \left (\cos \left (t \right )+\frac {\operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )}{4}-\frac {1}{4}\right ) \operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\left (-1+\operatorname {csgn}\left (\sin \left (\frac {t}{2}\right )\right )\right ) \left (c_{1} \operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right )\right )}{2 \left (-c_{1} \operatorname {MathieuS}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+c_{1} \operatorname {MathieuSPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )-\operatorname {MathieuC}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )+\operatorname {MathieuCPrime}\left (-1, -2, \arccos \left (\cos \left (\frac {t}{2}\right )\right )\right )\right ) \cos \left (t \right )} \]

Solution by Mathematica

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

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

Not solved