Time spent by the bob of pendulum between two angles Suppose we have a simple pendulum executing SHM about its mean position. We can easily notice that the bob of the pendulum swings back and forth making an angle, say $\theta$ about its central perpendicular (mean position). Let $\theta_{max}$ be the maximum angle subtended on either side when the bob reaches the maximum height.
The total time period, as the bob swings across to reach the same angle on the other side is $T$.
However consider two angles $\alpha$ and $\beta$, that the bob of the pendulum subtends at some time during the SHM. How can we calculate the time spent by the bob between these angles as a fraction of the total time period?
My initial idea was, SHM can be represented as a circle, and the total time period of each cycle in a sinusoidal motion is $2\pi$. In a single cycle, the bob traverses the path between the two angles twice (back and forth). Thus we can use the following formula to find the fraction of the total time period that the bob spends in this region.
$$t = \frac{2(\alpha - \beta)}{2\pi} = \frac{\alpha-\beta}{\pi}$$
The time spent between two angles is the difference between the two angles divided by the total angle traversed, which is $2\pi$.
However, I was looking for a more rigorous approach to the problem, maybe I could solve it by integration. Any help would be appreciated.
 A: Your idea of representing simple harmonic motion as a circle is the right concept. However, you should note that the $\alpha$ and $\beta$ in your equation is the phase angle $\omega t$ and not the actual angle of the pendulum. The denominator should also be $2\pi$ instead of $\pi$, since one oscillation is always $2\pi$.

Suppose we have a simple pendulum executing SHM about its mean position.

However, the issue here is that the pendulum is not simple harmonic.

I was looking for a more rigorous approach to the problem

If you are looking for a more rigorous approach, you have to drop the small-angle approximation. The differential equation for the pendulum is
$$\ddot{\theta} = -\frac{g}{l} \sin\theta$$
which can be manipulated into an integral expression for the exact time taken. It is a fairly easy exercise; the final result is
$$t = \sqrt{\frac{l}{2g}} \int_{\theta_1}^{\theta_2} \frac{\text{d}\theta}{\sqrt{\cos\theta - \cos\theta_0}}$$
where $\theta_1$ and $\theta_2$ are the initial and final angles of the pendulum respectively. This is an elliptic integral which has no closed-form expression. You could try numerical integration or a series expansion, depending on what you had in mind.
A: If we remain in the context of SHM (and so avoid the complications of elliptic integrals) then the angle $\theta(t)$ that the pendulum makes with the vertical at time $t$ is given by
$$\displaystyle \theta(t) = \theta_{max} \sin \left(\frac{2\pi t}T\right)$$
where $T$ is the period of the pendulum (note that this is the time taken for the bob to swing from one extreme to the other and return) and I am assuming that $\theta=0$ (i.e. the pendulum is vertical) at $t=0$. So if $\theta=\alpha$ at time $t_\alpha$ then we have
$$\displaystyle \alpha = \theta_{max} \sin\left(\frac{2\pi t_\alpha}T\right)
\\ \displaystyle \Rightarrow t_\alpha = \frac T {2\pi} \sin^{-1} \left( \frac \alpha {\theta_{max}}\right)$$
If $\theta=\beta$ at time $t_\beta$ then we have
$$\displaystyle t_\beta - t_\alpha = \frac T {2\pi} \left( \sin^{-1} \left( \frac \beta {\theta_{max}}\right) - \sin^{-1} \left( \frac \alpha {\theta_{max}}\right) \right)$$
If (and only if) $|\alpha|$ and $|\beta|$ are small compared to $\theta_{max}$ (i.e. $|\alpha|, |\beta| \ll \theta_{max} \ll \pi$) then we can use the small angle approximation $\sin(x) \approx x$ to get
$$\displaystyle t_\beta - t_\alpha \approx \frac {T(\beta - \alpha)} {2\pi \theta_{max}}$$
Note that if $\alpha$ and $\beta$ are on opposite sides of the vertical line $\theta=0$ then one is positive and the other is negative.
A: Even in small angle approximation the velocity of the pendulum is variable and not a constant.  The time depends on the actual values of the angles and not just on the difference.  It takes longer to swing by 1 degree when closer to an end point than when closer to equilibrium.  And this is so even for the SHO approximation. You need to use the formula with inverse sin given in gandalf61's answer.
