29.1.21 problem 20

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

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

Maple. Time used: 0.003 (sec). Leaf size: 64
ode:=diff(y(x),x) = 4*csc(x)*x*sec(x)^2-2*y(x)*cot(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -8 \left (i \operatorname {dilog}\left (1-i {\mathrm e}^{i x}\right )-i \operatorname {dilog}\left (1+i {\mathrm e}^{i x}\right )-x \ln \left (1-i {\mathrm e}^{i x}\right )+x \ln \left (1+i {\mathrm e}^{i x}\right )-\frac {c_1 \,\operatorname {csgn}\left (\csc \left (2 x \right )\right )}{8}\right ) \csc \left (2 x \right ) \]
Mathematica. Time used: 0.077 (sec). Leaf size: 60
ode=D[y[x],x]==2*Csc[x]*2*x*Sec[x]^2-2*y[x]*Cot[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \csc (x) \sec (x) \left (-8 i x \arctan \left (e^{i x}\right )+4 i \operatorname {PolyLog}\left (2,-i e^{i x}\right )-4 i \operatorname {PolyLog}\left (2,i e^{i x}\right )+c_1\right ) \]
Sympy. Time used: 48.766 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*x/(sin(x)*cos(x)**2) + 2*y(x)/tan(2*x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ 2 \int \frac {y{\left (x \right )} \sin {\left (2 x \right )}}{\tan {\left (2 x \right )}}\, dx - 4 \int \frac {x \sin {\left (2 x \right )}}{\sin {\left (x \right )} \cos ^{2}{\left (x \right )}}\, dx = C_{1} \]