ODE
\[ a^2 y(x)+y''(x)=\sin (b x) \] ODE Classification
[[_2nd_order, _linear, _nonhomogeneous]]
Book solution method
TO DO
Mathematica ✓
cpu = 0.10936 (sec), leaf count = 55
\[\left \{\left \{y(x)\to \frac {c_2 \left (a^2-b^2\right ) \sin (a x)+c_1 \left (a^2-b^2\right ) \cos (a x)+\sin (b x)}{(a-b) (a+b)}\right \}\right \}\]
Maple ✓
cpu = 0.044 (sec), leaf count = 33
\[ \left \{ y \left ( x \right ) =\sin \left ( ax \right ) {\it \_C2}+\cos \left ( ax \right ) {\it \_C1}+{\frac {\sin \left ( bx \right ) }{{a}^{2}-{b}^{2}}} \right \} \] Mathematica raw input
DSolve[a^2*y[x] + y''[x] == Sin[b*x],y[x],x]
Mathematica raw output
{{y[x] -> ((a^2 - b^2)*C[1]*Cos[a*x] + (a^2 - b^2)*C[2]*Sin[a*x] + Sin[b*x])/((a
- b)*(a + b))}}
Maple raw input
dsolve(diff(diff(y(x),x),x)+a^2*y(x) = sin(b*x), y(x),'implicit')
Maple raw output
y(x) = sin(a*x)*_C2+cos(a*x)*_C1+sin(b*x)/(a^2-b^2)