29.1.24 problem 23

Internal problem ID [4631]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 1
Problem number : 23
Date solved : Tuesday, March 04, 2025 at 06:58:07 PM
CAS classification : [_linear]

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

Maple. Time used: 0.038 (sec). Leaf size: 110
ode:=diff(y(x),x) = 4*csc(x)*x*(1-tan(x)^2+y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = -4 \,{\mathrm e}^{-4 i \left (-\operatorname {dilog}\left ({\mathrm e}^{i x}+1\right )+\operatorname {dilog}\left (1-{\mathrm e}^{i x}\right )\right )} \left (1-{\mathrm e}^{i x}\right )^{4 x} \left ({\mathrm e}^{i x}+1\right )^{-4 x} \left (\int \csc \left (x \right ) \left (-2+\sec \left (x \right )^{2}\right ) x \left (1-{\mathrm e}^{i x}\right )^{-4 x} \left ({\mathrm e}^{i x}+1\right )^{4 x} {\mathrm e}^{4 i \left (-\operatorname {dilog}\left ({\mathrm e}^{i x}+1\right )+\operatorname {dilog}\left (1-{\mathrm e}^{i x}\right )\right )}d x -\frac {c_{1}}{4}\right ) \]
Mathematica. Time used: 9.903 (sec). Leaf size: 156
ode=D[y[x],x]==2*Csc[x]*2*x*(1-Tan[x]^2+y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \exp \left (4 i \operatorname {PolyLog}\left (2,-e^{i x}\right )-4 i \operatorname {PolyLog}\left (2,e^{i x}\right )+4 x \left (\log \left (1-e^{i x}\right )-\log \left (1+e^{i x}\right )\right )\right ) \left (\int _1^x4 \exp \left (4 K[1] \left (\log \left (1+e^{i K[1]}\right )-\log \left (1-e^{i K[1]}\right )\right )-4 i \operatorname {PolyLog}\left (2,-e^{i K[1]}\right )+4 i \operatorname {PolyLog}\left (2,e^{i K[1]}\right )\right ) \cos (2 K[1]) \csc (K[1]) K[1] \sec ^2(K[1])dK[1]+c_1\right ) \]
Sympy. Time used: 49.055 (sec). Leaf size: 58
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*x*(y(x) - tan(x)**2 + 1)/sin(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - 4 \int \frac {x y{\left (x \right )} e^{- 4 \int \frac {x}{\sin {\left (x \right )}}\, dx}}{\sin {\left (x \right )}}\, dx + 4 \int \frac {x \left (e^{- 4 \int \frac {x}{\sin {\left (x \right )}}\, dx}\right ) \tan ^{2}{\left (x \right )}}{\sin {\left (x \right )}}\, dx + e^{- 4 \int \frac {x}{\sin {\left (x \right )}}\, dx} = C_{1} \]