29.1.17 problem 16

Internal problem ID [4624]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 1
Problem number : 16
Date solved : Sunday, March 30, 2025 at 03:30:55 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.057 (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.833 (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 )}} \]