64.11.51 problem 51

Internal problem ID [13501]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 51
Date solved : Tuesday, January 28, 2025 at 05:50:00 AM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime \prime }+2 y^{\prime \prime }+y&=x^{2} \cos \left (x \right ) \end{align*}

Solution by Maple

Time used: 0.005 (sec). Leaf size: 46

dsolve(diff(y(x),x$4)+2*diff(y(x),x$2)+y(x)=x^2*cos(x),y(x), singsol=all)
 
\[ y = \frac {\left (-4 x^{4}+192 c_4 x +36 x^{2}+192 c_{1} -21\right ) \cos \left (x \right )}{192}+\frac {\sin \left (x \right ) \left (x^{3}+\left (12 c_{3} -3\right ) x +12 c_{2} \right )}{12} \]

Solution by Mathematica

Time used: 0.216 (sec). Leaf size: 140

DSolve[D[y[x],{x,4}]+2*D[y[x],{x,2}]+y[x]==x^2*Cos[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to x \sin (x) \int _1^x-\frac {1}{4} K[4]^2 \sin (2 K[4])dK[4]+x \cos (x) \int _1^x-\frac {1}{2} \cos ^2(K[2]) K[2]^2dK[2]+\cos (x) \int _1^x\frac {1}{2} \cos (K[1]) K[1]^2 (\cos (K[1]) K[1]-\sin (K[1]))dK[1]+\sin (x) \int _1^x\frac {1}{2} \cos (K[3]) K[3]^2 (\cos (K[3])+K[3] \sin (K[3]))dK[3]+c_1 \cos (x)+c_2 x \cos (x)+c_3 \sin (x)+c_4 x \sin (x) \]