23.1.427 problem 417

Internal problem ID [5034]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 417
Date solved : Tuesday, September 30, 2025 at 11:28:08 AM
CAS classification : [_linear]

\begin{align*} \left (a_{0} +a_{1} \sin \left (x \right )^{2}\right ) y^{\prime }+a_{2} x \left (a_{3} +a_{1} \sin \left (x \right )^{2}\right )+a_{1} y \sin \left (2 x \right )&=0 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 52
ode:=(a__0+a__1*sin(x)^2)*diff(y(x),x)+a__2*x*(a__3+a__1*sin(x)^2)+a__1*y(x)*sin(2*x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {a_{2} a_{1} \cos \left (2 x \right )+2 a_{2} x a_{1} \sin \left (2 x \right )-2 x^{2} \left (a_{1} +2 a_{3} \right ) a_{2} +8 c_1}{-4 a_{1} \cos \left (2 x \right )+8 a_{0} +4 a_{1}} \]
Mathematica. Time used: 0.242 (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]
 
\begin{align*} 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})} \end{align*}
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