40.7.4 problem 13

Internal problem ID [6694]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 12. Linear equations of order n. Supplemetary problems. Page 81
Problem number : 13
Date solved : Monday, January 27, 2025 at 02:24:05 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.022 (sec). Leaf size: 32

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