23.1.487 problem 477

Internal problem ID [5094]
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 : 477
Date solved : Tuesday, September 30, 2025 at 11:35:24 AM
CAS classification : [[_Abel, `2nd type`, `class A`]]

\begin{align*} \left (\tan \left (x \right ) \sec \left (x \right )-2 y\right ) y^{\prime }+\sec \left (x \right ) \left (1+2 y \sin \left (x \right )\right ) y&=0 \end{align*}
Maple. Time used: 0.008 (sec). Leaf size: 89
ode:=(tan(x)*sec(x)-2*y(x))*diff(y(x),x)+sec(x)*(1+2*y(x)*sin(x))*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\frac {\sec \left (x \right ) \left (\sqrt {\frac {\left (2 c_1 +4\right ) {\mathrm e}^{2 i x}+c_1 \left ({\mathrm e}^{4 i x}+1\right )}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}-\tan \left (x \right )\right )}{2} \\ y &= \frac {\sec \left (x \right ) \left (\sqrt {\frac {\left (2 c_1 +4\right ) {\mathrm e}^{2 i x}+c_1 \left ({\mathrm e}^{4 i x}+1\right )}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}}+\tan \left (x \right )\right )}{2} \\ \end{align*}
Mathematica. Time used: 1.243 (sec). Leaf size: 85
ode=(Tan[x]*Sec[x]-2*y[x])*D[y[x],x]+Sec[x](1+2*y[x]*Sin[x])*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{4} \sec ^2(x) \left (2 \sin (x)-i \sqrt {(2-8 c_1) \cos (2 x)-2-8 c_1}\right )\\ y(x)&\to \frac {1}{4} \sec ^2(x) \left (2 \sin (x)+i \sqrt {(2-8 c_1) \cos (2 x)-2-8 c_1}\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((2*y(x)*sin(x) + 1)*y(x)/cos(x) + (-2*y(x) + tan(x)/cos(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out