75.16.59 problem 532

Internal problem ID [17032]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.3 Nonhomogeneous linear equations with constant coefficients. Trial and error method. Exercises page 132
Problem number : 532
Date solved : Tuesday, January 28, 2025 at 09:46:59 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.008 (sec). Leaf size: 42

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

Solution by Mathematica

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

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