i'm trying to find the period of oscillation of a simple pendulum numerically at different energies, and i'm doing so by means of integration. the use of methods such as the trapezoidal rule or simpson's rule requires the value of the function at each step, but the function becomes infinite at a point.
the integral at hand is $\int \frac{1}{\sqrt(a - 2sin 2x )}$
a is a constant. the integral is from 0 to 1 and then another from 1 to an angle theta.
I know that i'm supposed to change the integration variable, but i don't know what to substitute with.
any help would be really appreciated.