7.11.49 problem 51

Internal problem ID [370]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 2. Linear Equations of Higher Order. Section 2.5 (Nonhomogeneous equations and undetermined coefficients). Problems at page 161
Problem number : 51
Date solved : Wednesday, February 05, 2025 at 03:26:08 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.003 (sec). Leaf size: 23

dsolve(diff(y(x),x$2)+4*y(x)=cos(3*x),y(x), singsol=all)
 
\[ y = \sin \left (2 x \right ) c_2 +\cos \left (2 x \right ) c_1 -\frac {\cos \left (3 x \right )}{5} \]

Solution by Mathematica

Time used: 0.073 (sec). Leaf size: 28

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