40.11.7 problem 32

Internal problem ID [6741]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 16. Linear equations with constant coefficients (Short methods). Supplemetary problems. Page 107
Problem number : 32
Date solved : Monday, January 27, 2025 at 02:26:59 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.156 (sec). Leaf size: 45

DSolve[D[y[x],{x,2}]+5*y[x]==Cos[Sqrt[5]*x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \left (\frac {1}{20}+c_1\right ) \cos \left (\sqrt {5} x\right )+\frac {1}{10} \left (\sqrt {5} x+10 c_2\right ) \sin \left (\sqrt {5} x\right ) \]