Free particle on spherical surface, Integral issue. 
*

*The problem statement, all variables and given/known data


By finding the Lagrangian and using the metric:
$$
\left(\begin{array}{cc}R^2&0\\0&R^2\sin^2(\theta)\end{array}\right)
$$
show that:
$$\theta (t)=\arccos\left(\sqrt{1-\frac{A^2}{\omega^2}}\ \cos(\omega t +\theta_o)\right)$$


*Relevant equations

*The attempt at a solution
So I got the lagrangian to be $ L=R^2 \dot{\theta^2} +R^2\sin^2(\theta)\dot{\phi^2}$ and then used the E-L equation to find the equations of motion and the fact that $ 2R^2\sin^2(\theta) \dot{\phi}=\text{const}=p $.
Using this and substituting into the equation for  $\theta$  I get:
$$
\frac{\mathrm d}{\mathrm dt}(2R^2\dot{\theta})=\frac{p^2}{2R^2}\cot(\theta)\csc^2(\theta)
$$
which I then integrate using the substitution $\mathrm dt=\mathrm d\theta / \dot{\theta}$ to get:
$$
\dot{\theta}=\frac{p}{2R^2}\sqrt{c-\frac{1}{2}\sin^{-2}(\theta)}
$$
Where $c$ is the integration constant. Now if I seperate variables to attempt to get a solution for $\theta$  I get:
$$
\int _{\theta_o}^{\theta} \frac{\mathrm d\theta}{\sqrt{c-\frac{1}{2}\sin^{-2}\theta}}=\frac{tp}{2R^2}
$$
But I have absolutely no idea how to solve that integral. Please any pointers would be appreciated.
I tried the substitution of $u=cos(\theta)$ but it didn't get me any further.
Edit: using the help nukeguy gave, I got:
$$cos(\theta)=\sqrt{1-\frac{1}{2c}}sin(\frac{tp\sqrt{c}}{2R^2}+\theta_o)$$
which is different due to the fact of the $sin()$ and not $cos()$ but could this be changed and just include a extra phase in $\theta_o$?
 A: I'm assuming all of your previous steps before the integral are correct.  I think you were on the right track with $u = \cos (x)$.
$$ \int \frac{1}{\sqrt{c - \frac{1}{2\sin^2 \theta}}} d\theta = \int \frac{\sqrt{2} \sin \theta }{\sqrt{2c\sin^2 \theta - 1}} d\theta 
\\ = \int \frac{\sqrt{2} \sin \theta }{\sqrt{2c\left(1-\cos^2 \theta\right) - 1}} d\theta 
\\ = \int \frac{\sqrt{2} \sin \theta }{\sqrt{2c - 1- 2c\cos^2 \theta}} d\theta 
$$
Now, let's do $u = \cos \theta$.  Then, we have
$$ \int \frac{\sqrt{2} \sin \theta }{\sqrt{2c - 1- 2c\cos^2 \theta}} d\theta = \sqrt{2}  \int \frac{1}{\sqrt{2c - 1- 2cu^2}} du $$
Now, we rescale the integral a little bit using $v = \sqrt{2c} u$.  Then,
$$ \sqrt{2}  \int \frac{1}{\sqrt{2c - 1- 2cu^2}} du = \frac{1}{\sqrt{c}} \int \frac{1}{\sqrt{2c-1-v^2}} dv$$
Now, we can call it a day and just look this up in a table of integrals.... or we can do a trig substitution, $v = \sqrt{2c-1}\sin x$, $dv = \sqrt{2c-1} \cos x dx$
$$\frac{1}{\sqrt{c}} \int \frac{1}{\sqrt{2c-1-v^2}} dv = \frac{1}{\sqrt{c}} \int \frac{\sin x}{\sqrt{1-\cos^2x}} dx = \frac{1}{\sqrt{c}} \int dx = \frac{x}{c} $$
Now, backtrack the substitutions, plug in the bounds, and you should have the answer you seek.  
There is quite possibly a faster/better way of doing this integral.
