56.5.3 problem 3

Internal problem ID [8964]
Book : Own collection of miscellaneous problems
Section : section 5.0
Problem number : 3
Date solved : Sunday, March 30, 2025 at 01:57:26 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.002 (sec). Leaf size: 12
ode:=diff(diff(y(x),x),x)+2*cot(x)*diff(y(x),x)-y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \csc \left (x \right ) \left (c_2 x +c_1 \right ) \]
Mathematica. Time used: 0.033 (sec). Leaf size: 15
ode=D[y[x],{x,2}]+2*Cot[x]*D[y[x],x]-y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to (c_2 x+c_1) \csc (x) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) + Derivative(y(x), (x, 2)) + 2*Derivative(y(x), x)/tan(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(y(x) - Derivative(y(x), (x, 2)))*tan(x)/2 + Derivative(y(x), x) cannot be solved by the factorable group method