76.12.14 problem 25

Internal problem ID [17499]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 4. Second order linear equations. Section 4.2 (Theory of second order linear homogeneous equations). Problems at page 226
Problem number : 25
Date solved : Monday, March 31, 2025 at 04:15:55 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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