2.6.2.5 ✓ Sympy. Time used: 0.250 (sec). Leaf size: 14
from sympy import *
theta = symbols("theta")
k = symbols("k")
m = symbols("m")
s = Function("s")
ode = Eq(cos(theta)**(-2) - m*Derivative(s(theta), theta)/k,0)
ics = {}
dsolve(ode,func=s(theta),ics=ics)
\begin{gather*} \begin {aligned} s{\left (\theta \right )} = C_{1} + \frac {k \sin {\left (\theta \right )}}{m \cos {\left (\theta \right )}} \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=s(theta))
('factorable', 'nth_algebraic', 'separable', '1st_exact', '1st_linear', 'Bernoulli', '1st_power_series', 'lie_group', 'nth_linear_constant_coeff_variation_of_parameters', 'nth_linear_euler_eq_nonhomogeneous_variation_of_parameters', 'nth_algebraic_Integral', 'separable_Integral', '1st_exact_Integral', '1st_linear_Integral', 'Bernoulli_Integral', 'nth_linear_constant_coeff_variation_of_parameters_Integral', 'nth_linear_euler_eq_nonhomogeneous_variation_of_parameters_Integral')