  We study $f(R)$ gravity models in the language of scalar-tensor theories. The
correspondence between $f(R)$ gravity and scalar-tensor theories is revisited
since $f(R)$ gravity is a subclass of Brans-Dicke models, with a vanishing
coupling constant ($\omega=0$). In this treatment, four $f(R)$ toy models are
used to analyze the early-universe cosmology, when the scalar field $\phi$
dominates over standard matter. We have obtained solutions to the Klein-Gordon
equation for those models. It is found that for the first model
$\left(f(R)=\beta R^{n}\right)$, as time increases the scalar field decreases
and decays asymptotically. For the second model $\left(f(R)=\alpha R+\beta
R^{n}\right)$ it was found that the function $\phi(t)$ crosses the $t$-axis at
different values for different values of $\beta$. For the third model
$\left(f(R)=R-\frac{\nu^{4}}{R}\right)$, when the value of $\nu$ is small the
potential $V(\phi)$ behaves like the standard inflationary potential. For the
fourth model
$\left(f(R)=R-(1-m)\nu^{2}\Big(\frac{R}{\nu^{2}}\Big)^{m}-2\Lambda\right)$, we
show that there is a transition between $1.5<m<1.55$. The behavior of the
potentials with $m<1.5$ is totally different from those with $m>1.55$. The
slow-roll approximation is applied to each of the four $f(R)$ models and we
obtain the respective expressions for the spectral index $n_{s}$ and the
tensor-to-scalar ratio $r$.
