Solution (source code)

= Solution

For the <natural inflation> potential, write $x=\phi/f$. Then
$$
V'= -\frac{V_0}{f}\sin x
$$
and the half-angle identity gives
$$
\left|\frac{V'}V\right|
=\frac1f\frac{\sin x}{1+\cos x}
=\frac1f\tan\frac x2.
$$
Therefore, on the stated rolling branch,
$$
\boxed{\sqrt{\epsilon(\phi)}
=\frac{M_{\rm Pl}}{\sqrt2f}
\tan\frac{\phi}{2f}}.
$$

Substitution into part (b) gives
$$
N=\frac f{M_{\rm Pl}^2}
\int_{\phi_f}^{\phi_i}\cot\frac{\phi}{2f}\,d\phi.
$$
Since
$$
\int\cot\frac{\phi}{2f}\,d\phi
=2f\log\sin\frac{\phi}{2f},
$$
the <e-fold count for the natural-inflation cosine potential> is
$$
\boxed{
N=\frac{2f^2}{M_{\rm Pl}^2}
\left[
\log\left(\sin\frac{\phi_i}{2f}\right)
-\log\left(\sin\frac{\phi_f}{2f}\right)
\right].}
$$