29.15.6 problem 414

Internal problem ID [5012]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 15
Problem number : 414
Date solved : Sunday, March 30, 2025 at 04:30:55 AM
CAS classification : [_linear]

\begin{align*} \left (\operatorname {a0} +\operatorname {a1} \sin \left (x \right )^{2}\right ) y^{\prime }+\operatorname {a2} x \left (\operatorname {a3} +\operatorname {a1} \sin \left (x \right )^{2}\right )+\operatorname {a1} y \sin \left (2 x \right )&=0 \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 52
ode:=(a0+a1*sin(x)^2)*diff(y(x),x)+a2*x*(a3+a1*sin(x)^2)+a1*y(x)*sin(2*x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\operatorname {a1} \cos \left (2 x \right ) \operatorname {a2} +2 \operatorname {a2} x \operatorname {a1} \sin \left (2 x \right )-2 x^{2} \left (\operatorname {a1} +2 \operatorname {a3} \right ) \operatorname {a2} +8 c_1}{-4 \operatorname {a1} \cos \left (2 x \right )+8 \operatorname {a0} +4 \operatorname {a1}} \]
Mathematica. Time used: 0.4 (sec). Leaf size: 58
ode=(a0+a1 Sin[x]^2)D[y[x],x]+a2 x(a3+a1 Sin[x]^2)+a1 y[x] Sin[2 x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {-2 \text {a1} \text {a2} x^2+2 \text {a1} \text {a2} x \sin (2 x)+\text {a1} \text {a2} \cos (2 x)-4 \text {a2} \text {a3} x^2+4 c_1}{4 (2 \text {a0}-\text {a1} \cos (2 x)+\text {a1})} \]
Sympy
from sympy import * 
x = symbols("x") 
a0 = symbols("a0") 
a1 = symbols("a1") 
a2 = symbols("a2") 
a3 = symbols("a3") 
y = Function("y") 
ode = Eq(a1*y(x)*sin(2*x) + a2*x*(a1*sin(x)**2 + a3) + (a0 + a1*sin(x)**2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out