23.3.44 problem 46

Internal problem ID [5758]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 46
Date solved : Friday, October 03, 2025 at 01:43:43 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }&=2 \csc \left (x \right )^{2} y \end{align*}
Maple. Time used: 0.060 (sec). Leaf size: 26
ode:=diff(diff(y(x),x),x) = 2*csc(x)^2*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \ln \left (\cos \left (x \right )+i \sin \left (x \right )\right ) c_2 \cot \left (x \right )-i c_2 +c_1 \cot \left (x \right ) \]
Mathematica. Time used: 0.095 (sec). Leaf size: 55
ode=D[y[x],{x,2}] == 2*Csc[x]^2*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {c_2 \cos (x) \text {arctanh}\left (\frac {\cos (x)}{\sqrt {-\sin ^2(x)}}\right )+c_1 \cos (x)-c_2 \sqrt {-\sin ^2(x)}}{\sqrt {-\sin ^2(x)}} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*y(x)/sin(x)**2 + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : solve: Cannot solve -2*y(x)/sin(x)**2 + Derivative(y(x), (x, 2))