23.1.26 problem 21

Internal problem ID [4633]
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 : 21
Date solved : Tuesday, September 30, 2025 at 07:37:34 AM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=2 \csc \left (2 x \right ) \sec \left (x \right )^{2}-2 y \cot \left (2 x \right ) \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 33
ode:=diff(y(x),x) = 2*csc(2*x)*sec(x)^2-2*y(x)*cot(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (2 \sqrt {\sec \left (x \right )^{2} \csc \left (x \right )^{2}}\, \sin \left (x \right )^{2}+c_1 \right ) \operatorname {csgn}\left (\csc \left (2 x \right )\right ) \csc \left (2 x \right ) \]
Mathematica. Time used: 0.047 (sec). Leaf size: 18
ode=D[y[x],x]==2*Csc[2*x]*2*Sec[x]^2-2*y[x]*Cot[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \sec (x) (2 \sec (x)+c_1 \csc (x)) \end{align*}
Sympy. Time used: 83.040 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x)*cot(2*x) - 2*csc(2*x)*sec(2*x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} \cos {\left (2 x \right )} + 2 \sin {\left (2 x \right )}}{\sin {\left (4 x \right )}} \]