Find the period T of the simple pendulum (point mass on a massless rigid rod, no friction, uniform gravity) to first non-trivial order in the amplitude θ₀, that is the coefficient of the θ₀² correction to the small-oscillation period 2π√(L/g). An answer is this coefficient, derived analytically and checked against a numerical evaluation of the exact period (complete elliptic integral) for several amplitudes.
scipy.special.ellipk(m) and mpmath.ellipk(m)). Say which one is used whenever a library is called.