23.1.22 problem 17

Internal problem ID [4629]
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 : 17
Date solved : Tuesday, September 30, 2025 at 07:37:26 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\left (2 \csc \left (2 x \right )+\cot \left (x \right )\right ) y \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 10
ode:=diff(y(x),x) = (2*csc(2*x)+cot(x))*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \sin \left (x \right ) \tan \left (x \right ) \]
Mathematica. Time used: 0.037 (sec). Leaf size: 32
ode=D[y[x],x]==(2*Csc[2*x]+Cot[x])*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 \sqrt {\sin (2 x)} e^{-\frac {3}{2} \text {arctanh}(\cos (2 x))}\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 1.075 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-1/tan(x) - 2/sin(2*x))*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} \sqrt {\cos {\left (2 x \right )} - 1} \tan {\left (x \right )}}{\cos {\left (x \right )} \sec {\left (x \right )}} \]