16.25 problem 27 (a)

16.25.1 Existence and uniqueness analysis

Internal problem ID [14800]
Internal file name [OUTPUT/14480_Monday_April_08_2024_06_25_45_AM_8801636/index.tex]

Book: INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section: Chapter 4. Higher Order Equations. Exercises 4.8, page 203
Problem number: 27 (a).
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "second order series method. Ordinary point", "second order series method. Taylor series method"

Maple gives the following as the ode type

[[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime }-\cos \left (x \right ) y=\sin \left (x \right )} \] With initial conditions \begin {align*} [y \left (0\right ) = 1, y^{\prime }\left (0\right ) = 0] \end {align*}

With the expansion point for the power series method at \(x = 0\).

16.25.1 Existence and uniqueness analysis

This is a linear ODE. In canonical form it is written as \begin {align*} y^{\prime \prime } + p(x)y^{\prime } + q(x) y &= F \end {align*}

Where here \begin {align*} p(x) &=0\\ q(x) &=-\cos \left (x \right )\\ F &=\sin \left (x \right ) \end {align*}

Hence the ode is \begin {align*} y^{\prime \prime }-\cos \left (x \right ) y = \sin \left (x \right ) \end {align*}

The domain of \(p(x)=0\) is \[ \{-\infty

Solving ode using Taylor series method. This gives review on how the Taylor series method works for solving second order ode.

Let \[ y^{\prime \prime }=f\left ( x,y,y^{\prime }\right ) \] Assuming expansion is at \(x_{0}=0\) (we can always shift the actual expansion point to \(0\) by change of variables) and assuming \(f\left ( x,y,y^{\prime }\right ) \) is analytic at \(x_{0}\) which must be the case for an ordinary point. Let initial conditions be \(y\left ( x_{0}\right ) =y_{0}\) and \(y^{\prime }\left ( x_{0}\right ) =y_{0}^{\prime }\). Using Taylor series gives\begin {align*} y\left ( x\right ) & =y\left ( x_{0}\right ) +\left ( x-x_{0}\right ) y^{\prime }\left ( x_{0}\right ) +\frac {\left ( x-x_{0}\right ) ^{2}}{2}y^{\prime \prime }\left ( x_{0}\right ) +\frac {\left ( x-x_{0}\right ) ^{3}}{3!}y^{\prime \prime \prime }\left ( x_{0}\right ) +\cdots \\ & =y_{0}+xy_{0}^{\prime }+\frac {x^{2}}{2}\left . f\right \vert _{x_{0},y_{0},y_{0}^{\prime }}+\frac {x^{3}}{3!}\left . f^{\prime }\right \vert _{x_{0},y_{0},y_{0}^{\prime }}+\cdots \\ & =y_{0}+xy_{0}^{\prime }+\sum _{n=0}^{\infty }\frac {x^{n+2}}{\left ( n+2\right ) !}\left . \frac {d^{n}f}{dx^{n}}\right \vert _{x_{0},y_{0},y_{0}^{\prime }} \end {align*}

But \begin {align} \frac {df}{dx} & =\frac {\partial f}{\partial x}\frac {dx}{dx}+\frac {\partial f}{\partial y}\frac {dy}{dx}+\frac {\partial f}{\partial y^{\prime }}\frac {dy^{\prime }}{dx}\tag {1}\\ & =\frac {\partial f}{\partial x}+\frac {\partial f}{\partial y}y^{\prime }+\frac {\partial f}{\partial y^{\prime }}y^{\prime \prime }\\ & =\frac {\partial f}{\partial x}+\frac {\partial f}{\partial y}y^{\prime }+\frac {\partial f}{\partial y^{\prime }}f\\ \frac {d^{2}f}{dx^{2}} & =\frac {d}{dx}\left ( \frac {df}{dx}\right ) \nonumber \\ & =\frac {\partial }{\partial x}\left ( \frac {df}{dx}\right ) +\frac {\partial }{\partial y}\left ( \frac {df}{dx}\right ) y^{\prime }+\frac {\partial }{\partial y^{\prime }}\left ( \frac {df}{dx}\right ) f\tag {2}\\ \frac {d^{3}f}{dx^{3}} & =\frac {d}{dx}\left ( \frac {d^{2}f}{dx^{2}}\right ) \nonumber \\ & =\frac {\partial }{\partial x}\left ( \frac {d^{2}f}{dx^{2}}\right ) +\left ( \frac {\partial }{\partial y}\frac {d^{2}f}{dx^{2}}\right ) y^{\prime }+\frac {\partial }{\partial y^{\prime }}\left ( \frac {d^{2}f}{dx^{2}}\right ) f\tag {3}\\ & \vdots \nonumber \end {align}

And so on. Hence if we name \(F_{0}=f\left ( x,y,y^{\prime }\right ) \) then the above can be written as \begin {align} F_{0} & =f\left ( x,y,y^{\prime }\right ) \tag {4}\\ F_{1} & =\frac {df}{dx}\nonumber \\ & =\frac {dF_{0}}{dx}\nonumber \\ & =\frac {\partial f}{\partial x}+\frac {\partial f}{\partial y}y^{\prime }+\frac {\partial f}{\partial y^{\prime }}y^{\prime \prime }\nonumber \\ & =\frac {\partial f}{\partial x}+\frac {\partial f}{\partial y}y^{\prime }+\frac {\partial f}{\partial y^{\prime }}f\tag {5}\\ & =\frac {\partial F_{0}}{\partial x}+\frac {\partial F_{0}}{\partial y}y^{\prime }+\frac {\partial F_{0}}{\partial y^{\prime }}F_{0}\nonumber \\ F_{2} & =\frac {d}{dx}\left ( \frac {d}{dx}f\right ) \nonumber \\ & =\frac {d}{dx}\left ( F_{1}\right ) \nonumber \\ & =\frac {\partial }{\partial x}F_{1}+\left ( \frac {\partial F_{1}}{\partial y}\right ) y^{\prime }+\left ( \frac {\partial F_{1}}{\partial y^{\prime }}\right ) y^{\prime \prime }\nonumber \\ & =\frac {\partial }{\partial x}F_{1}+\left ( \frac {\partial F_{1}}{\partial y}\right ) y^{\prime }+\left ( \frac {\partial F_{1}}{\partial y^{\prime }}\right ) F_{0}\nonumber \\ & \vdots \nonumber \\ F_{n} & =\frac {d}{dx}\left ( F_{n-1}\right ) \nonumber \\ & =\frac {\partial }{\partial x}F_{n-1}+\left ( \frac {\partial F_{n-1}}{\partial y}\right ) y^{\prime }+\left ( \frac {\partial F_{n-1}}{\partial y^{\prime }}\right ) y^{\prime \prime }\nonumber \\ & =\frac {\partial }{\partial x}F_{n-1}+\left ( \frac {\partial F_{n-1}}{\partial y}\right ) y^{\prime }+\left ( \frac {\partial F_{n-1}}{\partial y^{\prime }}\right ) F_{0} \tag {6} \end {align}

Therefore (6) can be used from now on along with \begin {equation} y\left ( x\right ) =y_{0}+xy_{0}^{\prime }+\sum _{n=0}^{\infty }\frac {x^{n+2}}{\left ( n+2\right ) !}\left . F_{n}\right \vert _{x_{0},y_{0},y_{0}^{\prime }} \tag {7} \end {equation} To find \(y\left ( x\right ) \) series solution around \(x=0\). Hence \begin {align*} F_0 &= \cos \left (x \right ) y+\sin \left (x \right )\\ F_1 &= \frac {d F_0}{dx} \\ &= \frac {\partial F_{0}}{\partial x}+ \frac {\partial F_{0}}{\partial y} y^{\prime }+ \frac {\partial F_{0}}{\partial y^{\prime }} F_0 \\ &= -y \sin \left (x \right )+\cos \left (x \right ) y^{\prime }+\cos \left (x \right )\\ F_2 &= \frac {d F_1}{dx} \\ &= \frac {\partial F_{1}}{\partial x}+ \frac {\partial F_{1}}{\partial y} y^{\prime }+ \frac {\partial F_{1}}{\partial y^{\prime }} F_1 \\ &= -2 \sin \left (x \right ) y^{\prime }+\left (\cos \left (x \right )-1\right ) \left (\cos \left (x \right ) y+\sin \left (x \right )\right )\\ F_3 &= \frac {d F_2}{dx} \\ &= \frac {\partial F_{2}}{\partial x}+ \frac {\partial F_{2}}{\partial y} y^{\prime }+ \frac {\partial F_{2}}{\partial y^{\prime }} F_2 \\ &= \cos \left (x \right ) \left (\cos \left (x \right )-3\right ) y^{\prime }+\left (-4 \cos \left (x \right )+1\right ) \sin \left (x \right ) y+4 \cos \left (x \right )^{2}-\cos \left (x \right )-3\\ F_4 &= \frac {d F_3}{dx} \\ &= \frac {\partial F_{3}}{\partial x}+ \frac {\partial F_{3}}{\partial y} y^{\prime }+ \frac {\partial F_{3}}{\partial y^{\prime }} F_3 \\ &= 2 \left (2-3 \cos \left (x \right )\right ) \sin \left (x \right ) y^{\prime }+\cos \left (x \right )^{3} y+\left (-11 y+\sin \left (x \right )\right ) \cos \left (x \right )^{2}+\left (y-11 \sin \left (x \right )\right ) \cos \left (x \right )+4 y+\sin \left (x \right ) \end {align*}

And so on. Evaluating all the above at initial conditions \(x = 0\) and \(y \left (0\right ) = 1\) and \(y^{\prime }\left (0\right ) = 0\) gives \begin {align*} F_0 &= 1\\ F_1 &= 1\\ F_2 &= 0\\ F_3 &= 0\\ F_4 &= -5 \end {align*}

Substituting all the above in (7) and simplifying gives the solution as \[ y = \frac {x^{2}}{2}+1+\frac {x^{3}}{6}-\frac {x^{6}}{144}+O\left (x^{6}\right ) \] \[ y = \frac {x^{2}}{2}+1+\frac {x^{3}}{6}-\frac {x^{6}}{144}+O\left (x^{6}\right ) \] Since the expansion point \(x = 0\) is an ordinary, we can also solve this using standard power series Let the solution be represented as power series of the form \[ y = \moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n} \] Then \begin {align*} y^{\prime } &= \moverset {\infty }{\munderset {n =1}{\sum }}n a_{n} x^{n -1}\\ y^{\prime \prime } &= \moverset {\infty }{\munderset {n =2}{\sum }}n \left (n -1\right ) a_{n} x^{n -2} \end {align*}

Substituting the above back into the ode gives \begin {align*} \moverset {\infty }{\munderset {n =2}{\sum }}n \left (n -1\right ) a_{n} x^{n -2} = \cos \left (x \right ) \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n}\right )+\sin \left (x \right )\tag {1} \end {align*}

Expanding \(-\cos \left (x \right )\) as Taylor series around \(x=0\) and keeping only the first \(6\) terms gives \begin {align*} -\cos \left (x \right ) &= -1+\frac {1}{2} x^{2}-\frac {1}{24} x^{4}+\frac {1}{720} x^{6} + \dots \\ &= -1+\frac {1}{2} x^{2}-\frac {1}{24} x^{4}+\frac {1}{720} x^{6} \end {align*}

Expanding \(\sin \left (x \right )\) as Taylor series around \(x=0\) and keeping only the first \(6\) terms gives \begin {align*} \sin \left (x \right ) &= x -\frac {1}{6} x^{3}+\frac {1}{120} x^{5} + \dots \\ &= x -\frac {1}{6} x^{3}+\frac {1}{120} x^{5} \end {align*}

Hence the ODE in Eq (1) becomes \[ \left (\moverset {\infty }{\munderset {n =2}{\sum }}n \left (n -1\right ) a_{n} x^{n -2}\right )+\left (-1+\frac {1}{2} x^{2}-\frac {1}{24} x^{4}+\frac {1}{720} x^{6}\right ) \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n}\right ) = x -\frac {1}{6} x^{3}+\frac {1}{120} x^{5} \] Expanding the second term in (1) gives \[ \left (\moverset {\infty }{\munderset {n =2}{\sum }}n \left (n -1\right ) a_{n} x^{n -2}\right )+-1\cdot \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n}\right )+\frac {x^{2}}{2}\cdot \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n}\right )-\frac {x^{4}}{24}\cdot \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n}\right )+\frac {x^{6}}{720}\cdot \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n}\right ) = x -\frac {1}{6} x^{3}+\frac {1}{120} x^{5} \] Which simplifies to \begin{equation} \tag{2} \left (\moverset {\infty }{\munderset {n =2}{\sum }}n \left (n -1\right ) a_{n} x^{n -2}\right )+\moverset {\infty }{\munderset {n =0}{\sum }}\left (-a_{n} x^{n}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +2} a_{n}}{2}\right )+\moverset {\infty }{\munderset {n =0}{\sum }}\left (-\frac {x^{n +4} a_{n}}{24}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +6} a_{n}}{720}\right ) = x -\frac {1}{6} x^{3}+\frac {1}{120} x^{5} \end{equation} The next step is to make all powers of \(x\) be \(n\) in each summation term. Going over each summation term above with power of \(x\) in it which is not already \(x^{n}\) and adjusting the power and the corresponding index gives \begin{align*} \moverset {\infty }{\munderset {n =2}{\sum }}n \left (n -1\right ) a_{n} x^{n -2} &= \moverset {\infty }{\munderset {n =0}{\sum }}\left (n +2\right ) a_{n +2} \left (n +1\right ) x^{n} \\ \moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +2} a_{n}}{2} &= \moverset {\infty }{\munderset {n =2}{\sum }}\frac {a_{n -2} x^{n}}{2} \\ \moverset {\infty }{\munderset {n =0}{\sum }}\left (-\frac {x^{n +4} a_{n}}{24}\right ) &= \moverset {\infty }{\munderset {n =4}{\sum }}\left (-\frac {a_{n -4} x^{n}}{24}\right ) \\ \moverset {\infty }{\munderset {n =0}{\sum }}\frac {x^{n +6} a_{n}}{720} &= \moverset {\infty }{\munderset {n =6}{\sum }}\frac {a_{n -6} x^{n}}{720} \\ \end{align*} Substituting all the above in Eq (2) gives the following equation where now all powers of \(x\) are the same and equal to \(n\). \begin{equation} \tag{3} \left (\moverset {\infty }{\munderset {n =0}{\sum }}\left (n +2\right ) a_{n +2} \left (n +1\right ) x^{n}\right )+\moverset {\infty }{\munderset {n =0}{\sum }}\left (-a_{n} x^{n}\right )+\left (\moverset {\infty }{\munderset {n =2}{\sum }}\frac {a_{n -2} x^{n}}{2}\right )+\moverset {\infty }{\munderset {n =4}{\sum }}\left (-\frac {a_{n -4} x^{n}}{24}\right )+\left (\moverset {\infty }{\munderset {n =6}{\sum }}\frac {a_{n -6} x^{n}}{720}\right ) = x -\frac {1}{6} x^{3}+\frac {1}{120} x^{5} \end{equation} \(n=0\) gives \[ 2 a_{2}-a_{0}=0 \] \[ a_{2} = \frac {a_{0}}{2} \] \(n=1\) gives \begin{align*} \left (6 a_{3}-a_{1}\right ) x &= x \\ 6 a_{3}-a_{1} &= 1 \\ \end{align*} Which after substituting earlier equations, simplifies to \[ a_{3} = \frac {a_{1}}{6}+\frac {1}{6} \] \(n=2\) gives \[ 12 a_{4}-a_{2}+\frac {a_{0}}{2}=0 \] Which after substituting earlier equations, simplifies to \[ a_{4} = 0 \] \(n=3\) gives \begin{align*} \left (20 a_{5}-a_{3}+\frac {a_{1}}{2}\right ) x^{3} &= -\frac {x^{3}}{6} \\ 20 a_{5}-a_{3}+\frac {a_{1}}{2} &= -{\frac {1}{6}} \\ \end{align*} Which after substituting earlier equations, simplifies to \[ a_{5} = -\frac {a_{1}}{60} \] \(n=4\) gives \[ 30 a_{6}-a_{4}+\frac {a_{2}}{2}-\frac {a_{0}}{24}=0 \] Which after substituting earlier equations, simplifies to \[ a_{6} = -\frac {a_{0}}{144} \] \(n=5\) gives \begin{align*} \left (42 a_{7}-a_{5}+\frac {a_{3}}{2}-\frac {a_{1}}{24}\right ) x^{5} &= \frac {x^{5}}{120} \\ 42 a_{7}-a_{5}+\frac {a_{3}}{2}-\frac {a_{1}}{24} &= {\frac {1}{120}} \\ \end{align*} Which after substituting earlier equations, simplifies to \[ a_{7} = -\frac {a_{1}}{720}-\frac {1}{560} \] For \(6\le n\), the recurrence equation is \begin{equation} \tag{4} \left (\left (n +2\right ) a_{n +2} \left (n +1\right )-a_{n}+\frac {a_{n -2}}{2}-\frac {a_{n -4}}{24}+\frac {a_{n -6}}{720}\right ) x^{n} = x -\frac {1}{6} x^{3}+\frac {1}{120} x^{5} \end{equation} And so on. Therefore the solution is \begin {align*} y &= \moverset {\infty }{\munderset {n =0}{\sum }}a_{n} x^{n}\\ &= a_{3} x^{3}+a_{2} x^{2}+a_{1} x +a_{0} + \dots \end {align*}

Substituting the values for \(a_{n}\) found above, the solution becomes \[ y = a_{0}+a_{1} x +\frac {a_{0} x^{2}}{2}+\left (\frac {a_{1}}{6}+\frac {1}{6}\right ) x^{3}-\frac {a_{1} x^{5}}{60}+\dots \] Collecting terms, the solution becomes \begin{equation} \tag{3} y = \left (\frac {x^{2}}{2}+1\right ) a_{0}+\left (x +\frac {1}{6} x^{3}-\frac {1}{60} x^{5}\right ) a_{1}+\frac {x^{3}}{6}+O\left (x^{6}\right ) \end{equation} At \(x = 0\) the solution above becomes \[ y = \left (\frac {x^{2}}{2}+1\right ) c_{1} +\left (x +\frac {1}{6} x^{3}-\frac {1}{60} x^{5}\right ) c_{2} +\frac {x^{3}}{6}+O\left (x^{6}\right ) \] \[ y = \frac {x^{2}}{2}+1+\frac {x^{3}}{6}+O\left (x^{6}\right ) \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {x^{2}}{2}+1+\frac {x^{3}}{6}-\frac {x^{6}}{144}+O\left (x^{6}\right ) \\ \tag{2} y &= \frac {x^{2}}{2}+1+\frac {x^{3}}{6}+O\left (x^{6}\right ) \\ \end{align*}

Verification of solutions

\[ y = \frac {x^{2}}{2}+1+\frac {x^{3}}{6}-\frac {x^{6}}{144}+O\left (x^{6}\right ) \] Verified OK.

\[ y = \frac {x^{2}}{2}+1+\frac {x^{3}}{6}+O\left (x^{6}\right ) \] Verified OK.

Maple trace

`Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying high order exact linear fully integrable 
trying differential order: 2; linear nonhomogeneous with symmetry [0,1] 
trying a double symmetry of the form [xi=0, eta=F(x)] 
trying symmetries linear in x and y(x) 
-> Try solving first the homogeneous part of the ODE 
   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 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 
         -> 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 
            Equivalence transformation and function parameters: {z = 1/2*t+1/2}, {kappa = 12, mu = 32} 
            <- Equivalence to the rational form of Mathieu ODE successful 
         <- Mathieu successful 
      <- special function solution successful 
      Change of variables used: 
         [x = arccos(t)] 
      Linear ODE actually solved: 
         -t*u(t)-t*diff(u(t),t)+(-t^2+1)*diff(diff(u(t),t),t) = 0 
   <- change of variables successful 
<- solving first the homogeneous part of the ODE successful`
 

Solution by Maple

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

Order:=6; 
dsolve([diff(y(x),x$2)-y(x)*cos(x)=sin(x),y(0) = 1, D(y)(0) = 0],y(x),type='series',x=0);
 

\[ y \left (x \right ) = 1+\frac {1}{2} x^{2}+\frac {1}{6} x^{3}+\operatorname {O}\left (x^{6}\right ) \]

Solution by Mathematica

Time used: 0.018 (sec). Leaf size: 19

AsymptoticDSolveValue[{y''[x]-y[x]*Cos[x]==Sin[x],{y[0]==1,y'[0]==0}},y[x],{x,0,5}]
 

\[ y(x)\to \frac {x^3}{6}+\frac {x^2}{2}+1 \]