23.3.134 problem 136

Internal problem ID [5848]
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 : 136
Date solved : Friday, October 03, 2025 at 01:44:05 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} 2 y-\cot \left (x \right ) y^{\prime }+y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.071 (sec). Leaf size: 24
ode:=2*y(x)-cot(x)*diff(y(x),x)+diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (x \right )^{2} \operatorname {arctanh}\left (\sec \left (x \right )\right ) c_2 +c_1 \sin \left (x \right )^{2}+\cos \left (x \right ) c_2 \]
Mathematica. Time used: 0.064 (sec). Leaf size: 45
ode=2*y[x] - Cot[x]*D[y[x],x] + D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -c_1 \sin ^2(x)-\frac {1}{4} c_2 \left (2 \cos (x)+\sin ^2(x) (\log (\cos (x)+1)-\log (1-\cos (x)))\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) + Derivative(y(x), (x, 2)) - Derivative(y(x), x)/tan(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(2*y(x) + Derivative(y(x), (x, 2)))*tan(x) + Derivative(y(x), x