60.3.202 problem 1217

Internal problem ID [11198]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 2, linear second order
Problem number : 1217
Date solved : Sunday, March 30, 2025 at 07:45:45 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.003 (sec). Leaf size: 22
ode:=x^2*diff(diff(y(x),x),x)-(2*x^2*tan(x)-x)*diff(y(x),x)-(x*tan(x)+a)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sec \left (x \right ) \left (c_1 \operatorname {BesselJ}\left (\sqrt {a}, x\right )+c_2 \operatorname {BesselY}\left (\sqrt {a}, x\right )\right ) \]
Mathematica. Time used: 0.101 (sec). Leaf size: 29
ode=(-a - x*Tan[x])*y[x] - (-x + 2*x^2*Tan[x])*D[y[x],x] + x^2*D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sec (x) \left (c_1 \operatorname {BesselJ}\left (\sqrt {a},x\right )+c_2 \operatorname {BesselY}\left (\sqrt {a},x\right )\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - (a + x*tan(x))*y(x) - (2*x**2*tan(x) - x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Expected Expr or iterable but got None