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