10.42 problem 42

10.42.1 Solved as higher order constant coeff ode
10.42.2 Maple step by step solution
10.42.3 Maple trace
10.42.4 Maple dsolve solution
10.42.5 Mathematica DSolve solution

Internal problem ID [12416]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.2. The homogeneous linear equation with constant coefficients. Exercises page 135
Problem number : 42
Date solved : Friday, October 18, 2024 at 09:16:31 AM
CAS classification : [[_3rd_order, _missing_x]]

Solve

\begin{align*} y^{\prime \prime \prime }-5 y^{\prime \prime }+9 y^{\prime }-5 y&=0 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=0\\ y^{\prime }\left (0\right )&=1\\ y^{\prime \prime }\left (0\right )&=6 \end{align*}

10.42.1 Solved as higher order constant coeff ode

Time used: 0.057 (sec)

The characteristic equation is

\[ \lambda ^{3}-5 \lambda ^{2}+9 \lambda -5 = 0 \]

The roots of the above equation are

\begin{align*} \lambda _1 &= 1\\ \lambda _2 &= 2-i\\ \lambda _3 &= 2+i \end{align*}

Therefore the homogeneous solution is

\[ y_h(x)={\mathrm e}^{x} c_1 +{\mathrm e}^{\left (2-i\right ) x} c_2 +{\mathrm e}^{\left (2+i\right ) x} c_3 \]

The fundamental set of solutions for the homogeneous solution are the following

\begin{align*} y_1 &= {\mathrm e}^{x}\\ y_2 &= {\mathrm e}^{\left (2-i\right ) x}\\ y_3 &= {\mathrm e}^{\left (2+i\right ) x} \end{align*}

Solving for constants of integration using given initial conditions, the solution becomes

\begin{align*} y &= {\mathrm e}^{x}+\left (-\frac {1}{2}+i\right ) {\mathrm e}^{\left (2-i\right ) x}+\left (-\frac {1}{2}-i\right ) {\mathrm e}^{\left (2+i\right ) x} \\ \end{align*}

10.42.2 Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [\frac {d^{3}}{d x^{3}}y \left (x \right )-5 \frac {d^{2}}{d x^{2}}y \left (x \right )+9 \frac {d}{d x}y \left (x \right )-5 y \left (x \right )=0, y \left (0\right )=0, \left (\frac {d}{d x}y \left (x \right )\right )\bigg | {\mstack {}{_{\left \{x \hiderel {=}0\right \}}}}=1, \left (\frac {d^{2}}{d x^{2}}y \left (x \right )\right )\bigg | {\mstack {}{_{\left \{x \hiderel {=}0\right \}}}}=6\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 3 \\ {} & {} & \frac {d^{3}}{d x^{3}}y \left (x \right ) \\ \square & {} & \textrm {Convert linear ODE into a system of first order ODEs}\hspace {3pt} \\ {} & \circ & \textrm {Define new variable}\hspace {3pt} y_{1}\left (x \right ) \\ {} & {} & y_{1}\left (x \right )=y \left (x \right ) \\ {} & \circ & \textrm {Define new variable}\hspace {3pt} y_{2}\left (x \right ) \\ {} & {} & y_{2}\left (x \right )=\frac {d}{d x}y \left (x \right ) \\ {} & \circ & \textrm {Define new variable}\hspace {3pt} y_{3}\left (x \right ) \\ {} & {} & y_{3}\left (x \right )=\frac {d^{2}}{d x^{2}}y \left (x \right ) \\ {} & \circ & \textrm {Isolate for}\hspace {3pt} \frac {d}{d x}y_{3}\left (x \right )\hspace {3pt}\textrm {using original ODE}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y_{3}\left (x \right )=5 y_{3}\left (x \right )-9 y_{2}\left (x \right )+5 y_{1}\left (x \right ) \\ & {} & \textrm {Convert linear ODE into a system of first order ODEs}\hspace {3pt} \\ {} & {} & \left [y_{2}\left (x \right )=\frac {d}{d x}y_{1}\left (x \right ), y_{3}\left (x \right )=\frac {d}{d x}y_{2}\left (x \right ), \frac {d}{d x}y_{3}\left (x \right )=5 y_{3}\left (x \right )-9 y_{2}\left (x \right )+5 y_{1}\left (x \right )\right ] \\ \bullet & {} & \textrm {Define vector}\hspace {3pt} \\ {} & {} & {\moverset {\rightarrow }{y}}\left (x \right )=\left [\begin {array}{c} y_{1}\left (x \right ) \\ y_{2}\left (x \right ) \\ y_{3}\left (x \right ) \end {array}\right ] \\ \bullet & {} & \textrm {System to solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}{\moverset {\rightarrow }{y}}\left (x \right )=\left [\begin {array}{ccc} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 5 & -9 & 5 \end {array}\right ]\cdot {\moverset {\rightarrow }{y}}\left (x \right ) \\ \bullet & {} & \textrm {Define the coefficient matrix}\hspace {3pt} \\ {} & {} & A =\left [\begin {array}{ccc} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 5 & -9 & 5 \end {array}\right ] \\ \bullet & {} & \textrm {Rewrite the system as}\hspace {3pt} \\ {} & {} & \frac {d}{d x}{\moverset {\rightarrow }{y}}\left (x \right )=A \cdot {\moverset {\rightarrow }{y}}\left (x \right ) \\ \bullet & {} & \textrm {To solve the system, find the eigenvalues and eigenvectors of}\hspace {3pt} A \\ \bullet & {} & \textrm {Eigenpairs of}\hspace {3pt} A \\ {} & {} & \left [\left [1, \left [\begin {array}{c} 1 \\ 1 \\ 1 \end {array}\right ]\right ], \left [2-\mathrm {I}, \left [\begin {array}{c} \frac {3}{25}+\frac {4 \,\mathrm {I}}{25} \\ \frac {2}{5}+\frac {\mathrm {I}}{5} \\ 1 \end {array}\right ]\right ], \left [2+\mathrm {I}, \left [\begin {array}{c} \frac {3}{25}-\frac {4 \,\mathrm {I}}{25} \\ \frac {2}{5}-\frac {\mathrm {I}}{5} \\ 1 \end {array}\right ]\right ]\right ] \\ \bullet & {} & \textrm {Consider eigenpair}\hspace {3pt} \\ {} & {} & \left [1, \left [\begin {array}{c} 1 \\ 1 \\ 1 \end {array}\right ]\right ] \\ \bullet & {} & \textrm {Solution to homogeneous system from eigenpair}\hspace {3pt} \\ {} & {} & {\moverset {\rightarrow }{y}}_{1}={\mathrm e}^{x}\cdot \left [\begin {array}{c} 1 \\ 1 \\ 1 \end {array}\right ] \\ \bullet & {} & \textrm {Consider complex eigenpair, complex conjugate eigenvalue can be ignored}\hspace {3pt} \\ {} & {} & \left [2-\mathrm {I}, \left [\begin {array}{c} \frac {3}{25}+\frac {4 \,\mathrm {I}}{25} \\ \frac {2}{5}+\frac {\mathrm {I}}{5} \\ 1 \end {array}\right ]\right ] \\ \bullet & {} & \textrm {Solution from eigenpair}\hspace {3pt} \\ {} & {} & {\mathrm e}^{\left (2-\mathrm {I}\right ) x}\cdot \left [\begin {array}{c} \frac {3}{25}+\frac {4 \,\mathrm {I}}{25} \\ \frac {2}{5}+\frac {\mathrm {I}}{5} \\ 1 \end {array}\right ] \\ \bullet & {} & \textrm {Use Euler identity to write solution in terms of}\hspace {3pt} \sin \hspace {3pt}\textrm {and}\hspace {3pt} \cos \\ {} & {} & {\mathrm e}^{2 x}\cdot \left (\cos \left (x \right )-\mathrm {I} \sin \left (x \right )\right )\cdot \left [\begin {array}{c} \frac {3}{25}+\frac {4 \,\mathrm {I}}{25} \\ \frac {2}{5}+\frac {\mathrm {I}}{5} \\ 1 \end {array}\right ] \\ \bullet & {} & \textrm {Simplify expression}\hspace {3pt} \\ {} & {} & {\mathrm e}^{2 x}\cdot \left [\begin {array}{c} \left (\frac {3}{25}+\frac {4 \,\mathrm {I}}{25}\right ) \left (\cos \left (x \right )-\mathrm {I} \sin \left (x \right )\right ) \\ \left (\frac {2}{5}+\frac {\mathrm {I}}{5}\right ) \left (\cos \left (x \right )-\mathrm {I} \sin \left (x \right )\right ) \\ \cos \left (x \right )-\mathrm {I} \sin \left (x \right ) \end {array}\right ] \\ \bullet & {} & \textrm {Both real and imaginary parts are solutions to the homogeneous system}\hspace {3pt} \\ {} & {} & \left [{\moverset {\rightarrow }{y}}_{2}\left (x \right )={\mathrm e}^{2 x}\cdot \left [\begin {array}{c} \frac {3 \cos \left (x \right )}{25}+\frac {4 \sin \left (x \right )}{25} \\ \frac {2 \cos \left (x \right )}{5}+\frac {\sin \left (x \right )}{5} \\ \cos \left (x \right ) \end {array}\right ], {\moverset {\rightarrow }{y}}_{3}\left (x \right )={\mathrm e}^{2 x}\cdot \left [\begin {array}{c} -\frac {3 \sin \left (x \right )}{25}+\frac {4 \cos \left (x \right )}{25} \\ -\frac {2 \sin \left (x \right )}{5}+\frac {\cos \left (x \right )}{5} \\ -\sin \left (x \right ) \end {array}\right ]\right ] \\ \bullet & {} & \textrm {General solution to the system of ODEs}\hspace {3pt} \\ {} & {} & {\moverset {\rightarrow }{y}}=\mathit {C1} {\moverset {\rightarrow }{y}}_{1}+\mathit {C2} {\moverset {\rightarrow }{y}}_{2}\left (x \right )+\mathit {C3} {\moverset {\rightarrow }{y}}_{3}\left (x \right ) \\ \bullet & {} & \textrm {Substitute solutions into the general solution}\hspace {3pt} \\ {} & {} & {\moverset {\rightarrow }{y}}=\mathit {C1} \,{\mathrm e}^{x}\cdot \left [\begin {array}{c} 1 \\ 1 \\ 1 \end {array}\right ]+\mathit {C2} \,{\mathrm e}^{2 x}\cdot \left [\begin {array}{c} \frac {3 \cos \left (x \right )}{25}+\frac {4 \sin \left (x \right )}{25} \\ \frac {2 \cos \left (x \right )}{5}+\frac {\sin \left (x \right )}{5} \\ \cos \left (x \right ) \end {array}\right ]+\mathit {C3} \,{\mathrm e}^{2 x}\cdot \left [\begin {array}{c} -\frac {3 \sin \left (x \right )}{25}+\frac {4 \cos \left (x \right )}{25} \\ -\frac {2 \sin \left (x \right )}{5}+\frac {\cos \left (x \right )}{5} \\ -\sin \left (x \right ) \end {array}\right ] \\ \bullet & {} & \textrm {First component of the vector is the solution to the ODE}\hspace {3pt} \\ {} & {} & y \left (x \right )=\frac {\left (\left (3 \mathit {C2} +4 \mathit {C3} \right ) \cos \left (x \right )+4 \left (\mathit {C2} -\frac {3 \mathit {C3}}{4}\right ) \sin \left (x \right )\right ) {\mathrm e}^{2 x}}{25}+\mathit {C1} \,{\mathrm e}^{x} \\ \bullet & {} & \textrm {Use the initial condition}\hspace {3pt} y \left (0\right )=0 \\ {} & {} & 0=\frac {3 \mathit {C2}}{25}+\frac {4 \mathit {C3}}{25}+\mathit {C1} \\ \bullet & {} & \textrm {Calculate the 1st derivative of the solution}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=\frac {\left (-\left (3 \mathit {C2} +4 \mathit {C3} \right ) \sin \left (x \right )+4 \left (\mathit {C2} -\frac {3 \mathit {C3}}{4}\right ) \cos \left (x \right )\right ) {\mathrm e}^{2 x}}{25}+\frac {2 \left (\left (3 \mathit {C2} +4 \mathit {C3} \right ) \cos \left (x \right )+4 \left (\mathit {C2} -\frac {3 \mathit {C3}}{4}\right ) \sin \left (x \right )\right ) {\mathrm e}^{2 x}}{25}+\mathit {C1} \,{\mathrm e}^{x} \\ \bullet & {} & \textrm {Use the initial condition}\hspace {3pt} \left (\frac {d}{d x}y \left (x \right )\right )\bigg | {\mstack {}{_{\left \{x \hiderel {=}0\right \}}}}=1 \\ {} & {} & 1=\frac {2 \mathit {C2}}{5}+\frac {\mathit {C3}}{5}+\mathit {C1} \\ \bullet & {} & \textrm {Calculate the 2nd derivative of the solution}\hspace {3pt} \\ {} & {} & \frac {d^{2}}{d x^{2}}y \left (x \right )=\frac {\left (-\left (3 \mathit {C2} +4 \mathit {C3} \right ) \cos \left (x \right )-4 \left (\mathit {C2} -\frac {3 \mathit {C3}}{4}\right ) \sin \left (x \right )\right ) {\mathrm e}^{2 x}}{25}+\frac {4 \left (-\left (3 \mathit {C2} +4 \mathit {C3} \right ) \sin \left (x \right )+4 \left (\mathit {C2} -\frac {3 \mathit {C3}}{4}\right ) \cos \left (x \right )\right ) {\mathrm e}^{2 x}}{25}+\frac {4 \left (\left (3 \mathit {C2} +4 \mathit {C3} \right ) \cos \left (x \right )+4 \left (\mathit {C2} -\frac {3 \mathit {C3}}{4}\right ) \sin \left (x \right )\right ) {\mathrm e}^{2 x}}{25}+\mathit {C1} \,{\mathrm e}^{x} \\ \bullet & {} & \textrm {Use the initial condition}\hspace {3pt} \left (\frac {d^{2}}{d x^{2}}y \left (x \right )\right )\bigg | {\mstack {}{_{\left \{x \hiderel {=}0\right \}}}}=6 \\ {} & {} & 6=\mathit {C1} +\mathit {C2} \\ \bullet & {} & \textrm {Solve for the unknown coefficients}\hspace {3pt} \\ {} & {} & \left \{\mathit {C1} =1, \mathit {C2} =5, \mathit {C3} =-10\right \} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y \left (x \right )=\left (2 \sin \left (x \right )-\cos \left (x \right )\right ) {\mathrm e}^{2 x}+{\mathrm e}^{x} \end {array} \]

10.42.3 Maple trace
`Methods for third order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
checking if the LODE has constant coefficients 
<- constant coefficients successful`
 
10.42.4 Maple dsolve solution

Solving time : 0.026 (sec)
Leaf size : 21

dsolve([diff(diff(diff(y(x),x),x),x)-5*diff(diff(y(x),x),x)+9*diff(y(x),x)-5*y(x) = 0, 
       op([y(0) = 0, D(y)(0) = 1, (D@@2)(y)(0) = 6])],y(x),singsol=all)
 
\[ y \left (x \right ) = \left (2 \sin \left (x \right )-\cos \left (x \right )\right ) {\mathrm e}^{2 x}+{\mathrm e}^{x} \]
10.42.5 Mathematica DSolve solution

Solving time : 0.004 (sec)
Leaf size : 25

DSolve[{D[y[x],{x,3}]-5*D[y[x],{x,2}]+9*D[y[x],x]-5*y[x]==0,{y[0]==0,Derivative[1][y][0] ==1,Derivative[2][y][0] ==6}}, 
       y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^x \left (2 e^x \sin (x)-e^x \cos (x)+1\right ) \]