29.1.22 problem 21

Internal problem ID [4629]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 1
Problem number : 21
Date solved : Sunday, March 30, 2025 at 03:31:23 AM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=2 \cot \left (x \right )^{2} \cos \left (2 x \right )-2 y \csc \left (2 x \right ) \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 20
ode:=diff(y(x),x) = 2*cot(x)^2*cos(2*x)-2*y(x)*csc(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (2 \ln \left (\sin \left (x \right )\right )+2 \cos \left (x \right )^{2}+c_1 \right ) \cot \left (x \right ) \]
Mathematica. Time used: 0.074 (sec). Leaf size: 21
ode=D[y[x],x]==2*(Cot[x]^2*Cos[2*x]-y[x]*Csc[2*x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \cot (x) (\cos (2 x)+2 \log (\sin (x))-1+c_1) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x)/sin(2*x) - 2*cos(2*x)/tan(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out