reaction is included and the Schwinger effect is absent. Finally, the red dotted lines take into account the Schwinger effect. The purple dashed-dotted line shows the time dependence of the total energy density $\rho_{\rm tot}=3H^{2}M_{p}^{2}$.		\label{fig-evolution-Ratra}}
\end{figure}

In our numerical analysis, we use $\beta=15$ so that the backreaction problem indeed takes place. Figure~\ref{fig-evolution-Ratra} shows the time dependence of the energy density of the electric field [panel (a)] and the inflaton field [panel (b)]. The green dashed lines correspond to the situation when the back reaction is taken into account and the Schwinger effect is switched off. For comparison we also plot the corresponding dependencies for the case when the electromagnetic field is a spectator field (i.e., it feels the background but does not backreact). 

At the early stages of inflation the inflaton field is in the slow-roll regime and the coupling function also changes slowly; namely, it behaves like a power function [see Eq.~(\ref{inflaton-field})]. Under  such circumstances, the Hubble term in Eq.~(\ref{Maxwell-4}) damps the evolution of the electric field energy density. It would tend to zero like $a^{-4}$ if there were no boundary term on the right-hand side, which describes the new modes which cross the horizon and give their contribution to the electric energy density. Its presence leads to a dynamical equilibrium with electric energy density $\rho_{E}\sim H^{4}/(16\pi^{2})$ being almost constant at early times. 

At a certain moment of time, the negative term $2(\dot{f}/f) \rho_{E}$ becomes larger in the absolute value than the positive Hubble term $4H\rho_{E}$ and the electric energy density starts growing. As it was shown in Sec.~\ref{sec-BR-spectra}, when it reaches $\rho_{E,{\rm cr}}\sim \epsilon \rho_{\rm inf}$, the backreaction becomes very important and a new regime of evolution is established. The requirement that $f\propto a^{-2}$ in this regime significantly slows down the inflaton field and it deviates from its original trajectory. Figure~\ref{fig-evolution-Ratra} shows that the backreaction changes drastically the end of inflation, making the inflaton slide towards the minimum at $\phi=0$ without oscillations. This means the absence of the preheating stage in this case. 

Taking into account the Schwinger effect resolves this problem (see the red dotted lines in Fig.~\ref{fig-evolution-Ratra}). When the Schwinger current becomes significant it quickly diminishes the electric field and its backreaction. Then the inflaton field quickly rolls down to the potential minimum and oscillates. This helps us to restore the preheating stage, during which different particles can be created due to the parametric resonance processes \cite{Kofman:1997}. In addition, the Schwinger effect by itself fills the Universe with created charged particles, implementing the Schwinger reheating scenario. This can be seen from Fig.~\ref{fig-magnetic-Ratra}, where the energy density of created particles is shown by the green dashed-dotted line.

At the same time, we should note that the expression for the Schwinger current (\ref{strong-field}) was derived in de Sitter space-time. Therefore, its application during the stage of preheating is not well justified.

\begin{figure}[h!]
	\centering
	\includegraphics[width=0.49\textwidth]{Numerical-rho-Ratra-15-revised}
	\caption{The time dependence of the electric energy density (blue solid line), the total energy density (red dashed line), and the energy density of the charged particles  generated due to the Schwinger process (green dashed-dotted line) for a Ratra coupling function with $\beta=15$. The time dependence of the magnetic energy density calculated perturbatively is shown by the purple dots (without taking into account the Schwinger effect). The black dotted line shows the adiabatic evolution of the magnetic energy density, $\rho_{B}\propto a^{-4}$, after the Schwinger effect is turned on.
	\label{fig-magnetic-Ratra}}
\end{figure}

The magnetic field energy density can be calculated perturbatively. Figure~\ref{fig-magnetic-Ratra} shows its time dependence in comparison with 
the electric energy density. The results confirm the applicability of the perturbative approach as the magnetic energy density is indeed much 
smaller than the electric one. The figure shows clearly that after the backreaction becomes relevant the magnetic field begins to decrease in time. Purple dots show the time evolution of the magnetic field energy density in the absence of the Schwinger effect. However, if the latter is present, then the high conductivity of produced plasma leads to the adiabatic evolution of the magnetic field for which $\rho_{B}\propto a^{-4}$. This is shown in Fig.~\ref{fig-magnetic-Ratra} by the black dotted line.

Using the solutions of Eqs.~(\ref{Friedmann}), (\ref{KGF-2}), and (\ref{Maxwell-4}) as a background we numerically solve Eq.~(\ref{mode-eq}) for the electromagnetic mode function for all modes which cross the horizon during inflation and calculate the power spectra of generated electromagnetic fields. They are shown in Fig.~\ref{fig-spectrum-BR-Ratra} for three different values of the parameter $\beta$. As it was mentioned above, in the early stages of inflation the electric energy density is small and it does not cause the backreaction. For all the modes which cross the horizon at this stage the spectra have the same scaling with $k$ as unperturbed power spectra described by Eqs.~(\ref{E-spectrum-Ratra}) and (\ref{B-spectrum-Ratra}); however, their amplitudes are damped in comparison to the free case due to the backreaction which occurs later. When the coupling function starts to change faster, the power spectra undergo significant enhancement. This is reflected in the peaks in power spectra in Fig.~\ref{fig-spectrum-BR-Ratra} and this also corresponds to the fast increase of the electric and magnetic integral energy densities, which is shown in Fig.~\ref{fig-magnetic-Ratra}. Finally, when the backreaction regime occurs the power spectra behave as predicted in Eq.~(\ref{spectra-br-regime}). For larger values of $\beta$ the backreaction occurs earlier and the range of modes, which behave in such a manner, is wider.

\begin{figure}[h!]
	\centering
	\includegraphics[width=0.49\textwidth]{Spectrum-el-Ratra}
	\includegraphics[width=0.49\textwidth]{Spectrum-mag-Ratra}
	\caption{The electric (a) and magnetic (b) power spectra in the model with Ratra coupling function $f=\exp(\beta\phi/M_{p})$ for $\beta=12,\ 18$, and $25$. Left shaded regions correspond to the modes which are outside the horizon even before the beginning of inflation. Right shaded regions correspond to the modes which have not crossed the horizon even until the end of inflation and, hence, do not undergo enhancement. The vertical black dashed lines show the momentum which corresponds to the cosmic diffusion scale $k_{\rm diff}/a_{\ast}$.
		\label{fig-spectrum-BR-Ratra}}
\end{figure}


\begin{figure}[h!]
	\centering
	\includegraphics[width=0.49\textwidth]{B-on-beta-Ratra}
	\caption{The dependence of the present-day value of the magnetic field on parameter $\beta$ for two numbers of $e$-folds from the moment of the pivot scale horizon crossing to the end of inflation, $N_{\ast}=50$ (red dashed curve) and $N_{\ast}=60$ (blue solid curve).
		\label{fig-magnetic-today-Ratra}}
\end{figure}

Finally, from the known power spectra we can calculate the present-day value of the magnetic field using Eq.~(\ref{magnetic-field-today}). Figure~\ref{fig-magnetic-today-Ratra} shows its dependence on $\beta$ for two values of the number of $e$-folds from the pivot scale horizon crossing to the end of inflation, $N_{\ast}=50$ (red dashed line) and $N_{\ast}=60$ (blue solid line). Note that not all modes make their contributions to the present value of the magnetic field since not all of them can survive the cosmic diffusion at the later stages of the evolution of the Universe.

For low values of the parameter $\beta\lesssim 10$ the backreaction does not occur at all and the power spectra behave like in the unperturbed case considered in Ref.~\cite{Vilchinskii:2017}. The magnetic field shows a steep growing dependence on $\beta$. However, for larger values of $\beta$ the backreaction has an impact on the spectra and the growth slows down. The magnetic field has maximal value in the case when the peak in the magnetic power spectrum occurs for modes in the vicinity of the cosmic diffusion scale $k_{\rm diff}$. For $N_{\ast}=60$ this happens for $\beta=18-22$. For