2.1.14.7 Sympy. Time used: 0.338 (sec). Leaf size: 20
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq((4 - t**2)*Derivative(x(t), t) + 2*x(t) + 1,0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\begin{gather*} \begin {aligned} x{\left (t \right )} = \frac {C_{1} \sqrt {t - 2}}{\sqrt {t + 2}} - \frac {1}{2} \end {aligned} \end{gather*}
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] 
Sympy version 1.14.0
 
classify_ode(ode,func=x(t)) 
 
('factorable', 'separable', '1st_exact', '1st_linear', 'Bernoulli', 'almost_linear', '1st_power_series', 'lie_group', 'separable_Integral', '1st_exact_Integral', '1st_linear_Integral', 'Bernoulli_Integral', 'almost_linear_Integral')