3.5 problem 1005

Internal problem ID [9339]

Book: Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section: Chapter 2, linear second order
Problem number: 1005.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime }+y=\sin \left (x a \right ) \sin \left (b x \right )} \]

Solution by Maple

Time used: 0.0 (sec). Leaf size: 82

dsolve(diff(diff(y(x),x),x)+y(x)-sin(a*x)*sin(b*x)=0,y(x), singsol=all)
 

\[ y \left (x \right ) = \sin \left (x \right ) c_{2} +\cos \left (x \right ) c_{1} +\frac {-\left (b +a +1\right ) \left (b +a -1\right ) \cos \left (x \left (a -b \right )\right )+\cos \left (x \left (a +b \right )\right ) \left (-b +a +1\right ) \left (-b +a -1\right )}{2 a^{4}+\left (-4 b^{2}-4\right ) a^{2}+2 b^{4}-4 b^{2}+2} \]

Solution by Mathematica

Time used: 0.642 (sec). Leaf size: 159

DSolve[-(Sin[a*x]*Sin[b*x]) + y[x] + y''[x] == 0,y[x],x,IncludeSingularSolutions -> True]
                                                                                    
                                                                                    
 

\[ y(x)\to \frac {a^4 c_2 \sin (x)-2 a^2 b^2 c_2 \sin (x)-a^2 \sin (a x) \sin (b x)-2 a^2 c_2 \sin (x)+c_1 \left (a^4-2 a^2 \left (b^2+1\right )+\left (b^2-1\right )^2\right ) \cos (x)-b^2 \sin (a x) \sin (b x)+\sin (a x) \sin (b x)-2 a b \cos (a x) \cos (b x)+b^4 c_2 \sin (x)-2 b^2 c_2 \sin (x)+c_2 \sin (x)}{(a-b-1) (a-b+1) (a+b-1) (a+b+1)} \]