19.73 problem section 9.3, problem 73

Internal problem ID [1570]
Internal file name [OUTPUT/1571_Sunday_June_05_2022_02_22_55_AM_60291558/index.tex]

Book: Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section: Chapter 9 Introduction to Linear Higher Order Equations. Section 9.3. Undetermined Coefficients for Higher Order Equations. Page 495
Problem number: section 9.3, problem 73.
ODE order: 3.
ODE degree: 1.

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

Maple gives the following as the ode type

[[_3rd_order, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime \prime }+2 y^{\prime \prime }+y^{\prime }+2 y=30 \cos \left (x \right )-10 \sin \left (x \right )} \] With initial conditions \begin {align*} [y \left (0\right ) = 3, y^{\prime }\left (0\right ) = -4, y^{\prime \prime }\left (0\right ) = 16] \end {align*}

This is higher order nonhomogeneous ODE. Let the solution be \[ y = y_h + y_p \] Where \(y_h\) is the solution to the homogeneous ODE And \(y_p\) is a particular solution to the nonhomogeneous ODE. \(y_h\) is the solution to \[ y^{\prime \prime \prime }+2 y^{\prime \prime }+y^{\prime }+2 y = 0 \] The characteristic equation is \[ \lambda ^{3}+2 \lambda ^{2}+\lambda +2 = 0 \] The roots of the above equation are \begin {align*} \lambda _1 &= -2\\ \lambda _2 &= i\\ \lambda _3 &= -i \end {align*}

Therefore the homogeneous solution is \[ y_h(x)=c_{1} {\mathrm e}^{-2 x}+{\mathrm e}^{-i x} c_{2} +{\mathrm e}^{i x} c_{3} \] The fundamental set of solutions for the homogeneous solution are the following \begin{align*} y_1 &= {\mathrm e}^{-2 x} \\ y_2 &= {\mathrm e}^{-i x} \\ y_3 &= {\mathrm e}^{i x} \\ \end{align*} Now the particular solution to the given ODE is found \[ y^{\prime \prime \prime }+2 y^{\prime \prime }+y^{\prime }+2 y = 30 \cos \left (x \right )-10 \sin \left (x \right ) \] Let the particular solution be \[ y_p = U_1 y_1+U_2 y_2+U_3 y_3 \] Where \(y_i\) are the basis solutions found above for the homogeneous solution \(y_h\) and \(U_i(x)\) are functions to be determined as follows \[ U_i = (-1)^{n-i} \int { \frac {F(x) W_i(x) }{a W(x)} \, dx} \] Where \(W(x)\) is the Wronskian and \(W_i(x)\) is the Wronskian that results after deleting the last row and the \(i\)-th column of the determinant and \(n\) is the order of the ODE or equivalently, the number of basis solutions, and \(a\) is the coefficient of the leading derivative in the ODE, and \(F(x)\) is the RHS of the ODE. Therefore, the first step is to find the Wronskian \(W \left (x \right )\). This is given by \begin {equation*} W(x) = \begin {vmatrix} y_1&y_2&y_3\\ y_1'&y_2'&y_3'\\ y_1''&y_2''&y_3''\\ \end {vmatrix} \end {equation*} Substituting the fundamental set of solutions \(y_i\) found above in the Wronskian gives \begin {align*} W &= \left [\begin {array}{ccc} {\mathrm e}^{-2 x} & {\mathrm e}^{-i x} & {\mathrm e}^{i x} \\ -2 \,{\mathrm e}^{-2 x} & -i {\mathrm e}^{-i x} & i {\mathrm e}^{i x} \\ 4 \,{\mathrm e}^{-2 x} & -{\mathrm e}^{-i x} & -{\mathrm e}^{i x} \end {array}\right ] \\ |W| &= 10 i {\mathrm e}^{-2 x} {\mathrm e}^{-i x} {\mathrm e}^{i x} \end {align*}

The determinant simplifies to \begin {align*} |W| &= 10 i {\mathrm e}^{-2 x} \end {align*}

Now we determine \(W_i\) for each \(U_i\). \begin {align*} W_1(x) &= \det \,\left [\begin {array}{cc} {\mathrm e}^{-i x} & {\mathrm e}^{i x} \\ -i {\mathrm e}^{-i x} & i {\mathrm e}^{i x} \end {array}\right ] \\ &= 2 i \end {align*}

\begin {align*} W_2(x) &= \det \,\left [\begin {array}{cc} {\mathrm e}^{-2 x} & {\mathrm e}^{i x} \\ -2 \,{\mathrm e}^{-2 x} & i {\mathrm e}^{i x} \end {array}\right ] \\ &= \left (2+i\right ) {\mathrm e}^{\left (-2+i\right ) x} \end {align*}

\begin {align*} W_3(x) &= \det \,\left [\begin {array}{cc} {\mathrm e}^{-2 x} & {\mathrm e}^{-i x} \\ -2 \,{\mathrm e}^{-2 x} & -i {\mathrm e}^{-i x} \end {array}\right ] \\ &= \left (2-i\right ) {\mathrm e}^{\left (-2-i\right ) x} \end {align*}

Now we are ready to evaluate each \(U_i(x)\). \begin {align*} U_1 &= (-1)^{3-1} \int { \frac {F(x) W_1(x) }{a W(x)} \, dx}\\ &= (-1)^{2} \int { \frac { \left (30 \cos \left (x \right )-10 \sin \left (x \right )\right ) \left (2 i\right )}{\left (1\right ) \left (10 i {\mathrm e}^{-2 x}\right )} \, dx} \\ &= \int { \frac {2 i \left (30 \cos \left (x \right )-10 \sin \left (x \right )\right )}{10 i {\mathrm e}^{-2 x}} \, dx}\\ &= \int {\left (\left (6 \cos \left (x \right )-2 \sin \left (x \right )\right ) {\mathrm e}^{2 x}\right ) \, dx} \\ &= \frac {14 \,{\mathrm e}^{2 x} \cos \left (x \right )}{5}+\frac {2 \,{\mathrm e}^{2 x} \sin \left (x \right )}{5} \\ &= \frac {14 \,{\mathrm e}^{2 x} \cos \left (x \right )}{5}+\frac {2 \,{\mathrm e}^{2 x} \sin \left (x \right )}{5} \end {align*}

\begin {align*} U_2 &= (-1)^{3-2} \int { \frac {F(x) W_2(x) }{a W(x)} \, dx}\\ &= (-1)^{1} \int { \frac { \left (30 \cos \left (x \right )-10 \sin \left (x \right )\right ) \left (\left (2+i\right ) {\mathrm e}^{\left (-2+i\right ) x}\right )}{\left (1\right ) \left (10 i {\mathrm e}^{-2 x}\right )} \, dx} \\ &= - \int { \frac {\left (2+i\right ) \left (30 \cos \left (x \right )-10 \sin \left (x \right )\right ) {\mathrm e}^{\left (-2+i\right ) x}}{10 i {\mathrm e}^{-2 x}} \, dx}\\ &= - \int {\left (\left (-1+2 i\right ) \left (-3 \cos \left (x \right )+\sin \left (x \right )\right ) {\mathrm e}^{i x}\right ) \, dx} \\ &= -\frac {\left (\frac {1}{2}-\frac {7 i}{2}\right ) x \,{\mathrm e}^{i x}+\left (5-5 i\right ) {\mathrm e}^{i x} \tan \left (\frac {x}{2}\right )+\left (-7-i\right ) x \,{\mathrm e}^{i x} \tan \left (\frac {x}{2}\right )+\left (-\frac {1}{2}+\frac {7 i}{2}\right ) x \,{\mathrm e}^{i x} \tan \left (\frac {x}{2}\right )^{2}}{1+\tan \left (\frac {x}{2}\right )^{2}} \\ &= -\frac {\left (\frac {1}{2}-\frac {7 i}{2}\right ) x \,{\mathrm e}^{i x}+\left (5-5 i\right ) {\mathrm e}^{i x} \tan \left (\frac {x}{2}\right )+\left (-7-i\right ) x \,{\mathrm e}^{i x} \tan \left (\frac {x}{2}\right )+\left (-\frac {1}{2}+\frac {7 i}{2}\right ) x \,{\mathrm e}^{i x} \tan \left (\frac {x}{2}\right )^{2}}{1+\tan \left (\frac {x}{2}\right )^{2}} \end {align*}

\begin {align*} U_3 &= (-1)^{3-3} \int { \frac {F(x) W_3(x) }{a W(x)} \, dx}\\ &= (-1)^{0} \int { \frac { \left (30 \cos \left (x \right )-10 \sin \left (x \right )\right ) \left (\left (2-i\right ) {\mathrm e}^{\left (-2-i\right ) x}\right )}{\left (1\right ) \left (10 i {\mathrm e}^{-2 x}\right )} \, dx} \\ &= \int { \frac {\left (2-i\right ) \left (30 \cos \left (x \right )-10 \sin \left (x \right )\right ) {\mathrm e}^{\left (-2-i\right ) x}}{10 i {\mathrm e}^{-2 x}} \, dx}\\ &= \int {\left (\left (1+2 i\right ) \left (-3 \cos \left (x \right )+\sin \left (x \right )\right ) {\mathrm e}^{-i x}\right ) \, dx} \\ &= \frac {\left (-\frac {1}{2}-\frac {7 i}{2}\right ) x \,{\mathrm e}^{-i x}+\left (-5-5 i\right ) {\mathrm e}^{-i x} \tan \left (\frac {x}{2}\right )+\left (7-i\right ) x \,{\mathrm e}^{-i x} \tan \left (\frac {x}{2}\right )+\left (\frac {1}{2}+\frac {7 i}{2}\right ) x \,{\mathrm e}^{-i x} \tan \left (\frac {x}{2}\right )^{2}}{1+\tan \left (\frac {x}{2}\right )^{2}} \\ &= \frac {\left (-\frac {1}{2}-\frac {7 i}{2}\right ) x \,{\mathrm e}^{-i x}+\left (-5-5 i\right ) {\mathrm e}^{-i x} \tan \left (\frac {x}{2}\right )+\left (7-i\right ) x \,{\mathrm e}^{-i x} \tan \left (\frac {x}{2}\right )+\left (\frac {1}{2}+\frac {7 i}{2}\right ) x \,{\mathrm e}^{-i x} \tan \left (\frac {x}{2}\right )^{2}}{1+\tan \left (\frac {x}{2}\right )^{2}} \end {align*}

Now that all the \(U_i\) functions have been determined, the particular solution is found from \[ y_p = U_1 y_1+U_2 y_2+U_3 y_3 \] Hence \begin {equation*} \begin {split} y_p &= \left (\frac {14 \,{\mathrm e}^{2 x} \cos \left (x \right )}{5}+\frac {2 \,{\mathrm e}^{2 x} \sin \left (x \right )}{5}\right ) \left ({\mathrm e}^{-2 x}\right ) \\ &+\left (-\frac {\left (\frac {1}{2}-\frac {7 i}{2}\right ) x \,{\mathrm e}^{i x}+\left (5-5 i\right ) {\mathrm e}^{i x} \tan \left (\frac {x}{2}\right )+\left (-7-i\right ) x \,{\mathrm e}^{i x} \tan \left (\frac {x}{2}\right )+\left (-\frac {1}{2}+\frac {7 i}{2}\right ) x \,{\mathrm e}^{i x} \tan \left (\frac {x}{2}\right )^{2}}{1+\tan \left (\frac {x}{2}\right )^{2}}\right ) \left ({\mathrm e}^{-i x}\right ) \\ &+\left (\frac {\left (-\frac {1}{2}-\frac {7 i}{2}\right ) x \,{\mathrm e}^{-i x}+\left (-5-5 i\right ) {\mathrm e}^{-i x} \tan \left (\frac {x}{2}\right )+\left (7-i\right ) x \,{\mathrm e}^{-i x} \tan \left (\frac {x}{2}\right )+\left (\frac {1}{2}+\frac {7 i}{2}\right ) x \,{\mathrm e}^{-i x} \tan \left (\frac {x}{2}\right )^{2}}{1+\tan \left (\frac {x}{2}\right )^{2}}\right ) \left ({\mathrm e}^{i x}\right ) \end {split} \end {equation*} Therefore the particular solution is \[ y_p = \frac {\left (-5 x +14\right ) \cos \left (x \right )}{5}+\frac {\sin \left (x \right ) \left (35 x -23\right )}{5} \] Therefore the general solution is \begin{align*} y &= y_h + y_p \\ &= \left (c_{1} {\mathrm e}^{-2 x}+{\mathrm e}^{-i x} c_{2} +{\mathrm e}^{i x} c_{3}\right ) + \left (\frac {\left (-5 x +14\right ) \cos \left (x \right )}{5}+\frac {\sin \left (x \right ) \left (35 x -23\right )}{5}\right ) \\ \end{align*} Initial conditions are used to solve for the constants of integration.

Looking at the above solution \begin {align*} y = c_{1} {\mathrm e}^{-2 x}+{\mathrm e}^{-i x} c_{2} +{\mathrm e}^{i x} c_{3} +\frac {\left (-5 x +14\right ) \cos \left (x \right )}{5}+\frac {\sin \left (x \right ) \left (35 x -23\right )}{5} \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 = 3\) and \(x = 0\) in the above gives \begin {align*} 3 = c_{1} +c_{2} +c_{3} +\frac {14}{5}\tag {1A} \end {align*}

Taking derivative of the solution gives \begin {align*} y^{\prime } = -2 c_{1} {\mathrm e}^{-2 x}-i {\mathrm e}^{-i x} c_{2} +i {\mathrm e}^{i x} c_{3} -\cos \left (x \right )-\frac {\left (-5 x +14\right ) \sin \left (x \right )}{5}+\frac {\cos \left (x \right ) \left (35 x -23\right )}{5}+7 \sin \left (x \right ) \end {align*}

substituting \(y^{\prime } = -4\) and \(x = 0\) in the above gives \begin {align*} -4 = -i c_{2} +i c_{3} -2 c_{1} -\frac {28}{5}\tag {2A} \end {align*}

Taking two derivatives of the solution gives \begin {align*} y^{\prime \prime } = 4 c_{1} {\mathrm e}^{-2 x}-{\mathrm e}^{-i x} c_{2} -{\mathrm e}^{i x} c_{3} +2 \sin \left (x \right )-\frac {\left (-5 x +14\right ) \cos \left (x \right )}{5}-\frac {\sin \left (x \right ) \left (35 x -23\right )}{5}+14 \cos \left (x \right ) \end {align*}

substituting \(y^{\prime \prime } = 16\) and \(x = 0\) in the above gives \begin {align*} 16 = 4 c_{1} -c_{2} -c_{3} +\frac {56}{5}\tag {3A} \end {align*}

Equations {1A,2A,3A} are now solved for \(\{c_{1}, c_{2}, c_{3}\}\). Solving for the constants gives \begin {align*} c_{1}&=1\\ c_{2}&=-\frac {2}{5}+\frac {9 i}{5}\\ c_{3}&=-\frac {2}{5}-\frac {9 i}{5} \end {align*}

Substituting these values back in above solution results in \begin {align*} y = {\mathrm e}^{-2 x}-\cos \left (x \right ) x +2 \cos \left (x \right )+7 \sin \left (x \right ) x -\sin \left (x \right ) \end {align*}

Which simplifies to \[ y = {\mathrm e}^{-2 x}+\left (-x +2\right ) \cos \left (x \right )+\left (7 x -1\right ) \sin \left (x \right ) \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= {\mathrm e}^{-2 x}+\left (-x +2\right ) \cos \left (x \right )+\left (7 x -1\right ) \sin \left (x \right ) \\ \end{align*}

Figure 426: Solution plot

Verification of solutions

\[ y = {\mathrm e}^{-2 x}+\left (-x +2\right ) \cos \left (x \right )+\left (7 x -1\right ) \sin \left (x \right ) \] Verified OK.

Maple trace

`Methods for third order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying high order exact linear fully integrable 
trying differential order: 3; linear nonhomogeneous with symmetry [0,1] 
trying high order linear exact nonhomogeneous 
trying differential order: 3; missing the dependent variable 
checking if the LODE has constant coefficients 
<- constant coefficients successful`
 

Solution by Maple

Time used: 0.031 (sec). Leaf size: 25

dsolve([0*diff(y(x),x$4)+1*diff(y(x),x$3)+2*diff(y(x),x$2)+1*diff(y(x),x)+2*y(x)=30*cos(x)-10*sin(x),y(0) = 3, D(y)(0) = -4, (D@@2)(y)(0) = 16],y(x), singsol=all)
 

\[ y \left (x \right ) = {\mathrm e}^{-2 x}+\left (2-x \right ) \cos \left (x \right )+\left (7 x -1\right ) \sin \left (x \right ) \]

Solution by Mathematica

Time used: 0.093 (sec). Leaf size: 26

DSolve[{0*y''''[x]+1*y'''[x]+2*y''[x]+1*y'[x]+2*y[x]==30*Cos[x]-10*Sin[x],{y[0]==3,y'[0]==-4,y''[0]==16}},y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to e^{-2 x}+(7 x-1) \sin (x)-((x-2) \cos (x)) \]