64.11.22 problem 22

Internal problem ID [13472]
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 : 22
Date solved : Tuesday, January 28, 2025 at 05:44:45 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.004 (sec). Leaf size: 37

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

Solution by Mathematica

Time used: 0.927 (sec). Leaf size: 86

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