9.18 problem 29

9.18.1 Existence and uniqueness analysis
9.18.2 Maple step by step solution

Internal problem ID [14461]
Internal file name [OUTPUT/14142_Monday_March_25_2024_09_50_25_PM_73707553/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.1, page 141
Problem number: 29.
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "reduction_of_order", "second_order_linear_constant_coeff", "second_order_ode_can_be_made_integrable"

Maple gives the following as the ode type

[[_2nd_order, _missing_x]]

\[ \boxed {y^{\prime \prime }+9 y=0} \] Given that one solution of the ode is \begin {align*} y_1 &= \cos \left (3 t \right ) \end {align*}

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

9.18.1 Existence and uniqueness analysis

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

Where here \begin {align*} p(t) &=0\\ q(t) &=9\\ F &=0 \end {align*}

Hence the ode is \begin {align*} y^{\prime \prime }+9 y = 0 \end {align*}

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

Given one basis solution \(y_{1}\left (t \right )\), then the second basis solution is given by \[ y_{2}\left (t \right ) = y_{1} \left (\int \frac {{\mathrm e}^{-\left (\int p d t \right )}}{y_{1}^{2}}d t \right ) \] Where \(p(x)\) is the coefficient of \(y^{\prime }\) when the ode is written in the normal form \[ y^{\prime \prime }+p \left (t \right ) y^{\prime }+q \left (t \right ) y = f \left (t \right ) \] Looking at the ode to solve shows that \[ p \left (t \right ) = 0 \] Therefore \begin{align*} y_{2}\left (t \right ) &= \cos \left (3 t \right ) \left (\int \frac {{\mathrm e}^{-\left (\int 0d t \right )}}{\cos \left (3 t \right )^{2}}d t \right ) \\ y_{2}\left (t \right ) &= \cos \left (3 t \right ) \int \frac {1}{\cos \left (3 t \right )^{2}} , dt \\ y_{2}\left (t \right ) &= \cos \left (3 t \right ) \left (\int \sec \left (3 t \right )^{2}d t \right ) \\ y_{2}\left (t \right ) &= \frac {\cos \left (3 t \right ) \tan \left (3 t \right )}{3} \\ \end{align*} Hence the solution is \begin{align*} y &= c_{1} y_{1}\left (t \right )+c_{2} y_{2}\left (t \right ) \\ &= c_{1} \cos \left (3 t \right )+\frac {c_{2} \cos \left (3 t \right ) \tan \left (3 t \right )}{3} \\ \end{align*} Initial conditions are used to solve for the constants of integration.

Looking at the above solution \begin {align*} y = c_{1} \cos \left (3 t \right )+\frac {c_{2} \cos \left (3 t \right ) \tan \left (3 t \right )}{3} \tag {1} \end {align*}

Initial conditions are now substituted in the above solution. This will generate the required equations to solve for the integration constants. substituting \(y = 1\) and \(t = 0\) in the above gives \begin {align*} 1 = c_{1}\tag {1A} \end {align*}

Taking derivative of the solution gives \begin {align*} y^{\prime } = -3 c_{1} \sin \left (3 t \right )-c_{2} \sin \left (3 t \right ) \tan \left (3 t \right )+\frac {c_{2} \cos \left (3 t \right ) \left (3+3 \tan \left (3 t \right )^{2}\right )}{3} \end {align*}

substituting \(y^{\prime } = -4\) and \(t = 0\) in the above gives \begin {align*} -4 = c_{2}\tag {2A} \end {align*}

Equations {1A,2A} are now solved for \(\{c_{1}, c_{2}\}\). Solving for the constants gives \begin {align*} c_{1}&=1\\ c_{2}&=-4 \end {align*}

Substituting these values back in above solution results in \begin {align*} y = \cos \left (3 t \right )-\frac {4 \cos \left (3 t \right ) \tan \left (3 t \right )}{3} \end {align*}

Which simplifies to \[ y = \cos \left (3 t \right )-\frac {4 \sin \left (3 t \right )}{3} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \cos \left (3 t \right )-\frac {4 \sin \left (3 t \right )}{3} \\ \end{align*}

(a) Solution plot

(b) Slope field plot

Verification of solutions

\[ y = \cos \left (3 t \right )-\frac {4 \sin \left (3 t \right )}{3} \] Verified OK.

9.18.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime \prime }+9 y=0, y \left (0\right )=1, y^{\prime }{\raise{-0.36em}{\Big |}}{\mstack {}{_{\left \{t \hiderel {=}0\right \}}}}=-4\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & y^{\prime \prime } \\ \bullet & {} & \textrm {Characteristic polynomial of ODE}\hspace {3pt} \\ {} & {} & r^{2}+9=0 \\ \bullet & {} & \textrm {Use quadratic formula to solve for}\hspace {3pt} r \\ {} & {} & r =\frac {0\pm \left (\sqrt {-36}\right )}{2} \\ \bullet & {} & \textrm {Roots of the characteristic polynomial}\hspace {3pt} \\ {} & {} & r =\left (-3 \,\mathrm {I}, 3 \,\mathrm {I}\right ) \\ \bullet & {} & \textrm {1st solution of the ODE}\hspace {3pt} \\ {} & {} & y_{1}\left (t \right )=\cos \left (3 t \right ) \\ \bullet & {} & \textrm {2nd solution of the ODE}\hspace {3pt} \\ {} & {} & y_{2}\left (t \right )=\sin \left (3 t \right ) \\ \bullet & {} & \textrm {General solution of the ODE}\hspace {3pt} \\ {} & {} & y=c_{1} y_{1}\left (t \right )+c_{2} y_{2}\left (t \right ) \\ \bullet & {} & \textrm {Substitute in solutions}\hspace {3pt} \\ {} & {} & y=c_{1} \cos \left (3 t \right )+c_{2} \sin \left (3 t \right ) \\ \square & {} & \textrm {Check validity of solution}\hspace {3pt} y=c_{1} \cos \left (3 t \right )+c_{2} \sin \left (3 t \right ) \\ {} & \circ & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=1 \\ {} & {} & 1=c_{1} \\ {} & \circ & \textrm {Compute derivative of the solution}\hspace {3pt} \\ {} & {} & y^{\prime }=-3 c_{1} \sin \left (3 t \right )+3 c_{2} \cos \left (3 t \right ) \\ {} & \circ & \textrm {Use the initial condition}\hspace {3pt} y^{\prime }{\raise{-0.36em}{\Big |}}{\mstack {}{_{\left \{t \hiderel {=}0\right \}}}}=-4 \\ {} & {} & -4=3 c_{2} \\ {} & \circ & \textrm {Solve for}\hspace {3pt} c_{1} \hspace {3pt}\textrm {and}\hspace {3pt} c_{2} \\ {} & {} & \left \{c_{1} =1, c_{2} =-\frac {4}{3}\right \} \\ {} & \circ & \textrm {Substitute constant values into general solution and simplify}\hspace {3pt} \\ {} & {} & y=\cos \left (3 t \right )-\frac {4 \sin \left (3 t \right )}{3} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=\cos \left (3 t \right )-\frac {4 \sin \left (3 t \right )}{3} \end {array} \]

Maple trace

`Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
checking if the LODE has constant coefficients 
<- constant coefficients successful`
 

Solution by Maple

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

dsolve([diff(diff(y(t),t),t)+9*y(t) = 0, cos(3*t), y(0) = 1, D(y)(0) = -4], singsol=all)
 

\[ y \left (t \right ) = \cos \left (3 t \right )-\frac {4 \sin \left (3 t \right )}{3} \]

Solution by Mathematica

Time used: 0.012 (sec). Leaf size: 18

DSolve[y''[t]+9*y[t]==0,{y[0]==1,y'[0]==-4},y[t],t,IncludeSingularSolutions -> True]
 

\[ y(t)\to \cos (3 t)-\frac {4}{3} \sin (3 t) \]