Solution (source code)

= Solution

For a homogeneous canonical <inflaton>, $\rho_\phi=\dot\phi^2/2+V$ and $P_\phi=\dot\phi^2/2-V$. <Vacuum domination by a scalar field> requires positive potential energy to dominate both kinetic energy and any competing material components. Then $P_\phi\simeq-\rho_\phi$ and the expansion is nearly vacuum-like. Exact scalar-driven acceleration requires $\rho_\phi+3P_\phi<0$, equivalently $\dot\phi^2<V$; potential domination is a stronger condition.

The <slow-roll approximation> additionally neglects $\ddot\phi$ compared with $3H\dot\phi$ in the <inflaton equation of motion>. Define the unreduced <Planck mass> $m_{\rm pl}=G^{-1/2}$; it differs from the <reduced Planck mass> by $\sqrt{8\pi}$. Sufficient potential-flatness conditions are
$$
\epsilon_V=\frac{m_{\rm pl}^2}{16\pi}\left(\frac{V'}V\right)^2\ll1,\qquad
|\eta_V|=\left|\frac{m_{\rm pl}^2}{8\pi}\frac{V''}V\right|\ll1,
$$
together with approach to the slow-roll attractor. The reduced equations are $H^2\simeq8\pi V/(3m_{\rm pl}^2)$ and $3H\dot\phi\simeq-V'$.

For $V=m^2\phi^2/2$, take $m>0$ and the positive-field rolling branch. Then
$$
H\simeq\sqrt{\frac{4\pi}{3}}\frac{m\phi}{m_{\rm pl}},\qquad
\dot\phi\simeq-\frac{m^2\phi}{3H}=-\frac{mm_{\rm pl}}{2\sqrt{3\pi}}.
$$
The field velocity is constant to this order. Choosing the start at $t=0$ gives the <quadratic-potential slow-roll solution>
$$
\boxed{\phi(t)=\phi_i-\frac{mm_{\rm pl}}{2\sqrt{3\pi}}t.}
$$
The PDF puts $\pi$ inside this square root; the converted TeX incorrectly moves it outside. Next integrate $d\log a/d\phi=H/\dot\phi=-4\pi\phi/m_{\rm pl}^2$:
$$
\boxed{a(t)=a_0\exp\left[\frac{2\pi}{m_{\rm pl}^2}\bigl(\phi_i^2-\phi(t)^2\bigr)\right].}
$$
Thus the <number of e-folds> is the logarithmic expansion, not the expansion factor itself:
$$
\boxed{N=\log\frac{a_f}{a_i}=\int_{t_i}^{t_f}Hdt=\frac{2\pi}{m_{\rm pl}^2}(\phi_i^2-\phi_f^2).}
$$
Here $\epsilon_V=\eta_V=m_{\rm pl}^2/(4\pi\phi^2)$. The usual <quadratic-inflation endpoint estimate> sets $\epsilon_V\simeq1$, giving
$$
\boxed{\phi_{\rm end}\simeq\frac{m_{\rm pl}}{\sqrt{4\pi}},\qquad
N_{\rm total}\simeq\frac{2\pi\phi_i^2}{m_{\rm pl}^2}-\frac12.}
$$
This is an endpoint estimate, not an exact result from the full equations. Exact acceleration ends at the <Hubble slow-roll parameter> $\epsilon_H=1$, equivalently $\dot\phi^2=V$. Inserting the slow-roll velocity into that last condition instead gives $\phi\simeq m_{\rm pl}/\sqrt{6\pi}$; the different order-one coefficient illustrates the failing approximation at the endpoint. A precise value requires the full scalar and Friedmann evolution. The large initial-field contribution to $N$ is unaffected by that order-one uncertainty.

Finally $V(\phi_i)\sim m_{\rm pl}^4$ gives $\phi_i^2\sim2m_{\rm pl}^4/m^2$. The <quadratic-inflation expansion from Planck density> is therefore
$$
\boxed{N_{\rm total}\sim4\pi\left(\frac{m_{\rm pl}}m\right)^2,\qquad
\frac{a_{\rm end}}{a_0}\sim\exp\left[4\pi\left(\frac{m_{\rm pl}}m\right)^2\right].}
$$
For $m\ll m_{\rm pl}$ this is enormous and the initial field is in the slow-roll regime. No unique numerical factor follows without specifying $m/m_{\rm pl}$. Extrapolating the classical model from Planck density is only a formal estimate; it does not establish control of quantum-gravity corrections at that starting scale.