75.16.57 problem 530

Internal problem ID [17030]
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 : 530
Date solved : Tuesday, January 28, 2025 at 09:46:44 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.004 (sec). Leaf size: 56

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

Solution by Mathematica

Time used: 0.122 (sec). Leaf size: 63

DSolve[D[y[x],{x,2}]-2*m*D[y[x],x]+m^2*y[x]==Sin[n*x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^{m x} \left (\int _1^x-e^{-m K[1]} K[1] \sin (n K[1])dK[1]+x \int _1^xe^{-m K[2]} \sin (n K[2])dK[2]+c_2 x+c_1\right ) \]