54.3.5 problem 1005

Internal problem ID [12300]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 2, linear second order
Problem number : 1005
Date solved : Wednesday, October 01, 2025 at 01:42:54 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y-\sin \left (a x \right ) \sin \left (b x \right )&=0 \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 82
ode:=diff(diff(y(x),x),x)+y(x)-sin(a*x)*sin(b*x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (x \right ) c_2 +\cos \left (x \right ) c_1 +\frac {-\left (b +1+a \right ) \left (b -1+a \right ) \cos \left (x \left (a -b \right )\right )+\cos \left (x \left (a +b \right )\right ) \left (-b +1+a \right ) \left (-b -1+a \right )}{2 a^{4}+\left (-4 b^{2}-4\right ) a^{2}+2 b^{4}-4 b^{2}+2} \]
Mathematica. Time used: 0.087 (sec). Leaf size: 65
ode=-(Sin[a*x]*Sin[b*x]) + y[x] + D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \cos (x) \int _1^x-\sin (K[1]) \sin (a K[1]) \sin (b K[1])dK[1]+\sin (x) \int _1^x\cos (K[2]) \sin (a K[2]) \sin (b K[2])dK[2]+c_1 \cos (x)+c_2 \sin (x) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(y(x) - sin(a*x)*sin(b*x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out