50.10.12 problem 3(a)

Internal problem ID [7981]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 2. Second-Order Linear Equations. Section 2.2. THE METHOD OF UNDETERMINED COEFFICIENTS. Page 67
Problem number : 3(a)
Date solved : Monday, January 27, 2025 at 03:35:11 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.355 (sec). Leaf size: 43

DSolve[D[y[x],{x,2}]+4*y[x]==4*Cos[2*x]+6*Cos[x]+8*x^2-4*x,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to 2 x^2-x+x \sin (2 x)+2 \cos (x)+\left (\frac {1}{2}+c_1\right ) \cos (2 x)+c_2 \sin (2 x)-1 \]