77.1.134 problem 161 (page 236)

Internal problem ID [18024]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 161 (page 236)
Date solved : Tuesday, January 28, 2025 at 11:20:45 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.040 (sec). Leaf size: 33

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