\section{\label{sec:level1}First-level heading}

\section{Introduction}

A variety of high precision observations all seem to indicate that our universe is currently undergoing accelerated expansion \cite{bschmidt,cosmicAccRev}. The most popular model that is consistent with these observations deploys the framework of General Relativity (GR) with an additional cosmological constant ($\Lambda$) that induces cosmic acceleration at late times. However, the key theoretical component of this concordant cosmological model, GR, is still poorly tested on megaparsec scales. This has given way for the proliferation of both novel ways of testing GR as well as gravitational theories that modify GR in cosmological scales (see \cite{Joyce,Koyama} for thorough reviews).

The main theoretical thrust behind models of modified gravity (MG) is that while we know GR and its weak-field limit (Newtonian gravity) work exquisitely well at the scales of binary pulsars and the solar system, we should be cautious when extrapolating out to much larger (i.e. cosmological) scales. For this reason, models of MG that successfully reproduce late time cosmic acceleration on large scales must also recover the predictions made by GR on small scales.

To accomplish this, modified theories of gravity implement \textit{screening mechanisms} that attenuate the effect of  additional forces in high density regions. One such mechanism is the \textit{Chameleon mechanism} whereby the additional fifth force active in low density regions is screened in regions of high density by shortening the range of interaction of the field  \cite{khourya,khouryb}. A more general approach utilizes Effective Field Theory (EFT) of cosmic acceleration \cite{creminelli,bloomfield}, where recent theoretical advances have shown that there exists a large model space that recovers an accelerated expansion on large scales, while reducing to Newtonian gravity on the small scales in linear theory \cite{lombrisertaylor}. Thus, there is a need for well-defined observational tests which can distinguish the many models, including their possible covariant nature, as well as $\Lambda$CDM.

In this paper, we present a novel test of gravity on galaxy cluster scales that exploits how the Chameleon mechanism modifies the gravitational potential of clusters of different masses. Specifically, MG deepens the potential in the outskirts of low mass galaxy clusters with respect to GR, but leaves the potential of high mass clusters relatively unaffected.  By taking the average ratio between the gravitational potential of high mass and low mass galaxy clusters, we show that one can unambiguously discern between Chameleon-like modified gravity theories and GR.

We note that our proposed test is complementary to probes of gravity on larger scales (1-10 Mpc) \cite{lam,hellwing,zu,xu} and can also act as a powerful cross-check of tests in galaxy cluster scales (0.1-1$h^{-1}$Mpc) \cite{SchmidtVikhHu,gRedshift,coma,wilcox,cataneo,lombriserClusterDensity,shapes,schmidt}. However, our test distinguishes itself in that it directly probes the gravitational potential and allows for a simple and elegant incorporation of theoretical predictions.

We carry out our proposed test of gravity using synthetic dark matter halos of cosmological N-body simulations and test its viability by comparing results with analytic theory. We then utilize simulated galaxy catalogs to incorporate realistic observational systematics, including projection effects. After vetting our theoretical predictions with simulations, we show that our probe has the potential to deliver more competitive cluster-scale constraints on Chameleon \textit{f(R)} MGs than at present.

The paper is organized as follows: in Sec. II we review the Hu-Sawicki $f(R)$ gravity model and derive the theoretical expectations of our observable in both MG and GR.  In Sec. III we describe how we obtain our observable from the phase space of galaxy clusters, and detail how we do this in N-body simulations. A brief description of the N-body simulations we used is also provided. Sec. IV is devoted to putting together both our theoretical expectations and observables. More specifically, we describe how our test probes gravity in the scale of galaxy clusters.  In Sec. V we address both theoretical and observational systematics, whether or not they are significant as well as how we fold them into our final analysis.  Finally, in Sec. VI we discuss both how our probe can set competitive constraints on MG and, more generally, can also act as a powerful test of GR in the scale of galaxy clusters. We conclude in Sec. VII with some remarks on how our probe will leverage the observational capacities of future large-scale photometric and spectroscopic surveys.

 \section{Theoretical expectations}
 \subsection{Hu-Sawicki $f(R)$ gravity}
In what follows we focus on a particular model of MG: Chameleon Hu-Sawicki \textit{f(R)} gravity  ~\cite{HuSawicki}. In \textit{f(R)}  gravity, the Einstein-Hilbert action is augmented by a free function of the Ricci scalar (\textit{R+f(R)}).  This modification introduces an additional degree of freedom which can be recast as a non-minimally coupled scalar field, $f_R \equiv  \frac{df(R)}{dR}$, dubbed the \textit{scalaron}. The functional form of $f(R)$ in the Hu-Sawicki model is as follows:

\begin{equation}
f(R) = -\bar{m}^2 \frac{c_1 (R/\bar{m}^2)^n }{c_2 (R/\bar{m}^2)^n + 1}.
\end{equation}

The $\bar{m}$ parameter sets the mass scale and is given by $\bar{m}^2= \frac{8\pi G}{3} \rho_{m0}$, where  $\rho_{m0}$ is the average density today. As such, this model is determined by three dimensionless free parameters: $c_1, c_2$ and $n$. The specific values of these free parameters can be narrowed down to those which produce expansion histories that are consistent with current cosmological constraints. In particular, these three parameters are related to the background value of the scalaron today, $f_{R0}$. For example, with $\Omega_M = 0.24$ and $\Omega_{\Lambda}= 0.76 $, we have that $f_{R0} \approx n c_1/c_2^2/(41)^{n+1}$ \cite{HuSawicki}. From now on, we parametrize these free parameters in terms of $f_{R0}$ and consider models that are phenomenologically viable. We refer the reader to Hu and Sawicki (2007) for the particularities of the model and the details of the calculations shown above.  We fix $n=1$ and consider only models with background field values in the present epoch of $|\overline{f_{R0}}|= 10^{-5}  \text{ and } 10^{-6} $, which will be denoted from now on as FR5 and FR6 respectively. Note that in our definition of $|\overline{f_{R0}}|$ we have set the the speed of light to unity.

 \subsection{Gravitational potential}
 Naturally, as a coupled scalar field, the effect of the scalaron is to mediate an additional fifth force between massive bodies. Thus, the gravitational potential which massive particles experience is no longer the usual Newtonian dynamical potential of the Poisson equation ($\phi_{GR}$), but rather~\cite{lombriserClusters}:
\begin{equation}
\phi(r) = \phi_{GR}(r) - \frac{1}{2} \delta f_{R}(r).
\end{equation}
Here the  $\delta$ signifies that the background has been subtracted from the scalaron field: $\delta f_{R} = f_{R} - \overline{f_{R}}$.

The additional scalar field  can be shielded in Chameleon Hu-Sawicki $f(R)$ gravity in order to recover the predictions made by GR in high density regions. In the high density ``Chameleon regime,'' the screening mechanism ensures we recover GR  by making $f_R \rightarrow 0$.  As such, in this regime the scalaron's field value is:
\begin{equation}
\delta f_{R}^{cham} =  -\overline{f_{R0}}.
\end{equation}
The scalar field is constant in high density regions (e.g. in the core of galaxy clusters) and can mediate no additional forces. Outside of the high density core, the field can propagate and mediate a fifth force. The range of this fifth force is determined by Compton wavelength of the field, or the inverse mass  of the scalar field  $\lambda_c \equiv m^{-1}$, which at the background and for $z=0$ is: $ m^{-1} = 32 \sqrt{\overline{f_{R0}}/10^{-4}} \text{ Mpc } h^{-1}$ ~\cite{SchmidtVikhHu}. In this ``linear regime,'' the scalaron field is given by \cite{lombriserClusters}:
\begin{multline}
\delta f_{R }^{lin}(r) = -\frac{1}{3} g(c) GM_{200}  \big\{ \Gamma(0,m(r+r_s)) e^{2m(r+r_s)} \\ +\Gamma(0,-m(r+r_s))- \Gamma(0,-mr_s) \\ - e^{2mr_s} \Gamma(0,mr_s)  \big\} \frac{e^{-m(r+cr_s)}}{r}.
\end{multline}
The upper incomplete gamma function $\Gamma(s,r)$ and $g(c)$ are given by $\Gamma(s,r) = \int_r^{\infty} t^{s-1} e^{-t} dt $ and $g(c) = [\ln(1+c) + c/(1+c )]^{-1}$. We have also used the definition: $r_s \equiv R_{200}/c $. Eq. 3 is specific to the case in which the scalaron is propagating in an Navarro-Frenk-White (NFW) density field of a galaxy cluster with concentration $c$, mass $M_{200}$, and radius $R_{200}$. The subscript 200 implies that the mass and radii are defined to be where  the density of the halo equals $\Delta_{200} = 200$ times the critical density of the universe: $M_{200}= \frac{4\pi}{3} R_{200}^3 \Delta_{200} \rho_{crit}$.    In practice, the concentration is an NFW fitting parameter attained by fitting the cumulative mass profile \cite{mamon,NFW}:
\begin{equation}
M(<r) = g(c) M_{200}   \bigg[ \ln\bigg(1+ \frac{r}{r_s} \bigg) - \frac{r}{ r+r_s}\bigg].
\end{equation}

The transition from the Chameleon (Eq. 3) and Linear regimes (Eq. 4) is efficient, so we model it as being instantaneous and match them using,
\begin{equation}
\delta f_{R} = \min (\delta f_{R}^{lin}, \delta f_{R}^{cham}).
\end{equation}
As shown by ~\cite{lombriserClusters}, this approach agrees with the numerical solution to the scalaron equation of motion in the vicinity of an NFW density field. Note that the theoretical uncertainty is negligible when compared to observational uncertainties (thoroughly explained in the Sec. V below).

The GR potential ($\phi_{GR}$) is the usual gravitational potential that satisfies the Poisson equation and therefore determines the motion of massive particles. $\phi_{GR}$ can be attained by solving the Poisson equation with the NFW mass profile of Eq. 4,

\begin{equation}
\phi_{GR}(r) =  -g(c) \ln\bigg( \frac{r}{r_s}+1\bigg) \frac{GM_{200}}{r} .
\label{eq:phi_gr}
\end{equation}

\subsection{Escaping a galaxy cluster in \\ an expanding universe}

However, our observable, as explained in the next section, is the escape velocity profile ($v_{esc}(r)$) which is related to the potential set by both the gravity of the cluster and the expanding universe ($\Phi(r)$). This effective potential relates to the escape velocity profile as usual: $-2\Phi(r) = v^2_{esc}(r) $. Following \cite{behroozi}, we derive $v_{esc}(r)$ for a cluster described by an NFW density in an expanding universe with GR as its prescription for gravity,
\begin{eqnarray}
-2\Phi_{GR}(r) &=& v^2_{esc,GR}(r),  \\
               &=& -2[\phi_{GR}(r) - \phi_{GR}(r_{eq})] - qH^2 [r^2-r_{eq}^2] \nonumber.
\label{eq:phi_gr_big}
\end{eqnarray}
$r_{eq}$ is the ``equivalence radius'', defined to be the point at which the acceleration due to the gravitational potential of the cluster and the expanding universe are equivalent: $r_{eq}\equiv(\frac{GM_{200}}{-qH^2})^{1/3}.$ $q$ is the deceleration parameter and $H$ is the Hubble parameter. Using Eq. 1, in an expanding Chameleon \textit{f(R)} gravity universe instead we have:
\begin{eqnarray}
-2\Phi_{f(R)}(r) &=& v_{esc,f(R)}^2(r), \\
               &=&  v_{esc,GR}^2(r)+ \big[\delta f_R(r)- \delta f_R(r_{eq})\big] \nonumber.
\label{eq:vesc_fr}
\end{eqnarray}
Eqs. 7 and 8 use NFW parameters that have been measured from the cluster density profiles. In real data, these would be measured using the observed weak lensing shear profile around clusters which is unaffected by the effects of $f(R)$ gravity (see the appendix of \cite{springer}). Our test is then built to compare the matter-inferred GR or \textit{f(R)} gravity potential profiles to the observed dynamical escape velocity profile.

\section{Observables}
We measure the escape velocity of galaxy clusters through the technique (developed in \cite{diaferio}), in which the Newtonian gravitational potential profile is reconstructed from the escape velocity ``edge'', identified from the cluster radius-velocity space (i.e. the ``phase space''). This is a well-developed and well-tested technique and it has been used in numerous studies of the mass profiles of galaxy clusters \cite{dan1, serra, lemze, rines, andreon, geller}. The escape edge for a given halo is constructed by taking the maximum velocity in the particle phase space for each $r/R_{200}$ bin in 0.05  intervals. In GR simulations, the observed escape edge has been shown to recover the theoretical $v_{esc}$ to $\sim 5\%$ accuracy, depending on the model used \cite{miller}.

\subsection{N-body simulations}
To construct our potential profiles from the escape velocity edge we utilize the particles in N-body simulations developed in ~\cite{sims1,sims2} which have identical initial conditions, but incorporate either GR or \textit{f(R)} as their prescriptions for gravity. The cosmological parameters used for these simulations are as follows: $\Omega_m=0.24, \Omega_{\Lambda}=0.76, h=0.719, n_s=0.961$ \cite{sims2}. Here our focus is on the simulated  GR, FR6, and FR5 runs. Briefly, the adaptive mesh refinement N-Body simulations take place in a 1.5 Gpc $h^{-1}$ cube with 1024$^3$ resolution and a particle resolution of $6.2 \times 10^{10} M_{\odot} h^{-1} $. The large box size is required to provide the number of high mass clusters required in our analysis. The halos are defined by the Amiga Halo Finder or AHF \cite{AHF}.

\section{Probing gravity}

 \begin{figure*}
\centering
  \includegraphics[width=1\textwidth]{figure_1.eps}
  \caption{The $z=0$ gravitational potential ratio between high and low mass bins of synthetic galaxy clusters for the GR (black), the FR5 (\textit{left}) parametrization of $f(R)$ gravity (green), and the FR6 (\textit{right}) parametrization (red). The points are the average of the square of the observed escape velocities for each bin in radius and mass.  The errors are 1$\sigma$ on the mean from boot-strap re-sampling. The solid lines represent the theoretical predictions using the NFW density parameter (Eqns. 7-9). Note the  $\gtrsim 5 \sigma$ level difference between the GR and FR5 ratios. The percentages denote how we separate the high and low mass bins. Note that the separation between GR and \textit{f(R)} potential ratios increases with increasing separation in the mass bins.}
\label{fig:potential_ratio}
\end{figure*}

To differentiate between GR and MG we probe the \textit{ratio} of the averaged gravitational profile of high mass clusters, to the averaged gravitational potential of low mass clusters. We infer the ratio from N-body simulations through the aforementioned technique and compare our results to the aforementioned theoretical expectations for each respective theory of gravity. More specifically, our probe is encapsulated in the following equation:

\begin{equation}
\frac{\Phi_{high}(r)}{ \Phi_{low}(r)}  \equiv \frac{\langle{ v_{esc,high}^2(r)}\rangle}{ \langle v_{esc,low}^2(r) \rangle}.
\label{eq:phiratio}
\end{equation}
Why separate clusters into two mass bins? The reasons are twofold. First, as shown in \cite{KoyamaMASS} the Chameleon mechanism induces a mass dependent screening effect which leads to high mass clusters being screened and low mass clusters being increasingly unscreened. Relative to their high mass counterparts, less screened low mass clusters will exhibit higher escape velocity edges, resulting in a reduced potential ratio compared to expectations from GR. The cluster potential ratio is a smoking gun test of modified theories of gravity employing the Chameleon screening mechanism. Secondly, the ratio allows us to undercut both observational and theoretical systematics. Precisely how this ratio allows us to do so is thoroughly explained in the next section.

Now, to compare clusters in each of the three (GR, FR6, and FR5) simulations we employ one-to-one matching. We find cluster-sized over-densities at the same positions at $z=0$ across all three simulations using a halo's center positions from an AHF-generated halo catalog \cite{AHF}. We begin with 100 halos uniformly sampled in log mass between $\sim 10^{14}- 10^{15}$M$_{\odot} h^{-1}$. The 100 halos per simulation are then binned into a \textit{low mass bin} and a \textit{high mass bin} each of which corresponds to selecting a percentile of the of least and most massive clusters. The specific mass bin ranges are as follows. For GR, the low mass bin is: $9.10\times10^{13} - 1.96\times10^{14} M_{\odot}  h^{-1}$  and the high mass bin is: $7.48\times10^{14} - 1.58\times10^{15} M_{\odot} h^{-1}$. For FR6, the low mass bin is: $9.13\times10^{13} - 1.97\times10^{14} M_{\odot}  h^{-1}$  and high mass bin is: $7.34\times10^{14} - 1.58\times10^{15} M_{\odot} h^{-1}$. For FR5, the low mass bin is: $1.16\times10^{14} - 1.94\times10^{14} M_{\odot}  h^{-1}$  and the high mass bin is: $7.49\times10^{14} - 1.58\times10^{15} M_{\odot} h^{-1}$.

For each of the simulation halos, we attain both the phase space escape velocity profile through the aforementioned technique, as well as the potential profile based on matter density NFW fit (Eq. 5). With the former we can construct the ``observed'' dynamical gravitational potential profile and with the latter the prediction from GR or \textit{f(R)} gravity. We then take the ratio between the averaged high mass edge profiles and the averaged low mass edge profiles (Eq. 10).

The resulting averaged profile ratios are shown in Figure 1. The errors are 1$\sigma$ on the mean from boot-strap re-sampling with replacement. The solid lines represent the theoretical predictions using the NFW density parameter (Eqns. 7-9). Note that we chose to present the ratios as a function of $r/R_{200}$ rather than $r$ as a way to remove the side effects that arise when comparing clusters of different masses. When plotted as a function of $r$ the potential ratio of Figure 1 attains a positive slope which arises as a result of different underlying mass profiles. Thus, re-scaling by each cluster's respective $R_{200}$ flattens the profile and makes the potential ratios of Figure 1 a much cleaner and clearer observable: one that depends on the amplitude of the potential and not the shape of the potential profile.

As Figure 1 also shows, our theoretical predictions can successfully reproduce our (simulated) observable to high precision. On that figure we also plot the averaged potential ratio for different mass bins. One important conclusion from this is that the closer we bring the two mass bins, the more attenuated the difference between GR and $f(R)$ becomes. We would like to mention that dynamical differences in Fig. \ref{fig:potential_ratio} are solely due to modifications to gravity and not to mass differences in the simulation. Comparing the average mass ratios: $\langle M_{200,high}\rangle/ \langle M_{200,low} \rangle = 6.40, 6.39, 6.02$ for GR, FR6 and FR5 respectively, we conclude that averaged mass ratio differences are negligible when compared to the $\sim 25\%$ difference between the GR or FR6 and the FR5 potential ratios shown in Fig. \ref{fig:potential_ratio}.

Given our ability to precisely predict our observable (as demonstrated by Figure 1), we demonstrate the theoretical lower limit on how well our new probe can constrain Chameleon $f(R)$ gravity. Cosmic variance is the largest component of the uncertainty on the potential ratios for the small samples we examine. We study a more realistic synthetic data-set using the 2-dimensional projected phase spaces in the following sections.

\section{Systematics}
In order to assess the viability of our probe, we carefully consider relevant systematics. More specifically, we focus on: the systematic error induced by cosmic variance, statistical errors that arise from projection effects, as well as additional systematics that arise from sampling of galaxies in clusters.

One relevant systematic arises from the fact that we are using a very small sample of the clusters in the Universe to generate Figures 1 and 2. We chose this sample size as it reflects the scale of data we have today for measuring both weak-lensing profiles and also with significant spectroscopic follow-up \cite{Rines,Geller13,hoekstra12}.

The dashed lines band as shown in Figure 2 incorporates the systematic uncertainty due to cosmic variance on a sample of this size (20 clusters per mass bin) which was measured to be 10\% using a larger set of GR simulations (the Millennium simulations  \cite{Springel}). In other words, the observed ratio $\frac{\Phi_{high}(r)}{ \Phi_{low}(r)}$ can vary as much as 10\% when measured for a sample size as small as $\sim$ 20 clusters per mass bin. This is an important systematic which decreases as the sample size increases.

We also assess environmental screening, in which some fraction of the lower mass clusters in the $f(R)$ simulations could be screened due to large-scale over-densities \cite{zhao}. If this were to happen, the observed FR5 and FR6 ratios would be higher (closer to GR) than predicted by the theory. We control for random noise due to variations in the large-scale environments of the clusters by using one-to-one matching for the halos across the GR, FR5 and FR6 simulations. Also, we ensure that none of the clusters lie within the virial radii of other clusters. Finally, we can evaluate our dataset for possible effects from environmental screening using Figure \ref{fig:potential_ratio}, where the FR5 and FR6 predictions match our measurements to high precision. If screening were present, one would find the FR5 and FR6 measurements of the $f(R)$ simulation data to be closer to the GR simulation data. We note that the absolute accuracy of the cluster sample used in Figure \ref{fig:potential_ratio} is limited by cosmic variance of order 10\%. We conclude that the effects of screening on this test are smaller than systematic and statistical uncertainties on our measurements, so long as non-merging clusters are chosen for the analysis.

 \begin{figure}
  \centering
  \includegraphics[width=1\linewidth]{figure_2.eps}
  \caption{The simulated and theoretical averaged GR and $f(R)$ gravity potential ratios for the same clusters of Figure 1 (top 20\% and bottom 20\% mass bins). We have added the theoretical prediction for  $|f_{R0}| = 4 \times 10^{-6}$ gravity (yellow) and include not only the GR statistical error on the mean (black error bars) but also the 10\% systematic error due to cosmic variance (black dashed lines). This figure demonstrates how we would detect and/or constrain MG. Assuming GR as our ``observation,'' the data is contained within the  black dashed bands. We can therefore ask the question: which of the three plotted models best describes the data? We conclude our probe can, including systematics, successfully discern between GR and $|f_{R0}| = 4 \times 10^{-6}$ at $1\sigma$.Note that this result is attained with only 40 clusters (20 in each mass bin) and the potential is inferred from 3-dimensional phase space synthetic data. We reproduce this plot for a projected DESI-like data-set in Fig. 4.}
\end{figure}

We use the Millennium simulations with the light cone data provided by \cite{Henriques}  to investigate projection effects, which is likely the dominant component of the error on the potential ratio. To carry out our proposed test with physical (rather than synthetic) data, the escape velocity profile of a cluster would be inferred from the line-of-sight velocities of galaxies in that given cluster, rather than the radial component of the 3D velocity. Fortunately we can transform, roughly, the line-of-sight velocities into 3D velocities and vice versa. As shown in \cite{DiaferioProject} the mapping between the radial 3D escape velocity profile considered above ($v_{esc}(r)$) and the line-of-sight escape velocity profile inferred from data ($v_{esc,los}(r)$) is as follows:
 \begin{equation}
v^2_{esc,los}(r)= g^{-1}(\beta) \times v^2_{esc}(r)  \\
\label{eq:projected}
\end{equation}
Where $g(\beta)$ is given by $g(\beta) =3-2\beta(r)/1- \beta(r)$ and is of $\mathcal{O}(1)$. $\beta(r)$ is given by
$\beta(r) = 1- \langle v_{\theta}^2 + v_{\phi}^2 \rangle/  2\langle  v_{r}^2\rangle$ \cite{DiaferioProject}. As such, in projected space Eq. 10 is instead,
\begin{equation}
\frac{\Phi_{high,los}(r)}{ \Phi_{low,los}(r)}  \equiv\frac{ \langle{g(\beta_{low})}\rangle}{\langle{g(\beta_{high})}\rangle} \frac{  \langle{ v_{esc,high}^2(r)}\rangle}{ \langle v_{esc,low}^2(r) \rangle} .
\label{eq:phiratio_proj}
\end{equation}
However, the ratio of the averaged $g(\beta)$ profiles for high and low mass systems is $\langle g(\beta_{high})\rangle / \langle g(\beta_{low})  \rangle \approx  1$ and so the line-of-sight potential ratio is the same as the 3D potential ratio:
\begin{equation}
\frac{\Phi_{high,los}(r)}{ \Phi_{low,los}(r)} \approx \frac{\Phi_{high}(r)}{ \Phi_{low}(r)}
\label{eq:phiratio2}
\end{equation}
Therefore, our expectation is that by dividing out the averaged cluster potential profiles we eliminate the necessity to estimate the anisotropy profile. We note that another observational challenge lies in eliminating line-of-sight galaxies that may not be cluster members and will therefore contaminate our phase space.

We recognize that there exist few observational surveys containing clusters around the mean mass in our low-mass subsample.  However, with new imaging and spectroscopic surveys, we expect future datasets to provide excellent weak lensing mass profiles as well as significant spectroscopic follow-up.

Therefore, we consider two cases of projection. The first uses an ensemble cluster dataset, where the weak-lensing mass profiles and the spectroscopic potential profiles are inferred from averaged or stacked datasets as would be measured using current facilities. The second uses a much larger sample of clusters based on deeper data, where the weak-lensing and spectroscopic potential profiles could be measured individually for the clusters and then averaged.

\begin{figure}
  \centering
  \includegraphics[width=1\linewidth]{figure_3.eps}
  \caption{The gravitational potential ratio of Fig. 1 (black dots with statistical error) and the gravitational ratio as inferred from an ensemble of clusters (gray line with statistical error) from the light cone data of \cite{Henriques}. The high and low mass cluster ensembles are made up of 5 different ensembles each with 10 clusters that include 500 galaxies each. The error bars are $1\sigma$ error on the mean from boot-strap re-sampling. This nearly flat transfer function incorporates numerous observational systematics when going from 3D to realistic observational data.}\label{fig3}
\end{figure}

\subsection{Stacked cluster ensembles}
 To build a cluster ensemble we superimpose the phase-spaces of individual clusters. In particular, we use 500 galaxies per phase space with 10 high mass and 10 low mass clusters to create a high and a low mass cluster ensemble. The masses of the clusters are chosen to match the average masses of the sample used in Figures 1 and 2. The galaxies used to populate the phase spaces are all brighter than an r-band magnitude of 17.7 and the clusters are within z=0.15 such that this is an SDSS-like stacked ensemble of clusters. As before, we compute the averaged potential ratios (Eq. 10) and the boot-strapped error bars. The result is shown on Fig.\ref{fig3} (solid gray line). The scatter dots with statistical error represent the 3D inferred edge (as in Fig. 1 and 2). We find that over the range $0.4 \le r/R_{200} \le 0.9 $, the 2D projected and the 3D ratios are statistically identical. At the same time, our constraints on $|f_{R0}|$ are robust to small (5\%) corrections in the ratio as we go from 3D to 2D. This confirms the expectation detailed above which speculated that the averaged ratio of potential profiles allows us to undercut complications that arise from working with projected data. However, Fig. 3 also shows that the errors from projection are as large as cosmic variance for a small sample of $\sim$20 clusters.

\subsection{DESI Bright Galaxy Sample forecast}
In order to decrease the errors, we investigate a much larger (by a factor of $\sim 10$) sample of clusters. Within the Henriques light cone  \cite{Henriques} we generate a Dark Energy Spectroscopic Instrument (DESI) Bright Galaxy Sample-like selection function. While for the previous studies we constrained the observed galaxy population to brighter than the SDSS main sample, we now use galaxies to an r-band magnitude limit of 19.1. We still focus on clusters within z=0.15. The deeper magnitude limit increases the number of clusters with greater than 50 galaxies in the phase space to many hundreds per mass bin. This sample is an approximation to what may be observed with DESI and would allow us to probe both a wider and deeper sample of the sky, thereby undercutting the effects of cosmic variance and increasing the total number of galaxy clusters in our sample.

We re-create the mass bins chosen in the previous sample (see section IV) by choosing clusters with masses between $ 10^{14}/h < M_{200}/M{\odot} < 2.1\times 10^{14}/h $ for the low mass sample, and $ M_{200}/M{\odot} >  6\times10^{14}/h $ for the high mass sample. The average mass for the low and high mass sample respectively are: $1.4 \times 10^{14} M{\odot} / h$ and $8.2\times 10^{14} M{\odot} / h$. From those two mass bins we then make a conservative cut by picking clusters that contain at least 50 galaxies between $|v_{los}| \leq 2000 \text{ km/s}$ within 3 Mpc from the cluster center.

To predict the potentials in this sample, we use the halo masses of each cluster and derive concentrations from the mass-concentration relation provided in \cite{Duffy08}: $c_{200}(M_{200}, z) = A_{200} (M_{200}/M_{pivot})^{B_{200}} (1+z)^{C_{200}}$. Where $A_{200}= 5.71$, $B_{200} = -0.084$,  $C_{200} = -0.47$ and $M_{pivot} = 2\times 10^{12}  M_{\odot}h^{-1}$. This sample assumes that weak lensing masses are unbiased. The width of our mass bins are larger than the one sigma mass scatter in the weak lensing observable \cite{bandk}. Because of the wide width of our mass bins, we can ignore weak lensing mass uncertainties when calculating the theoretical predictions.

In Figure 4, we show the averaged potential ratio between the two mass bins (Eq. 10) with both statistical (boot-strapped as before) and systematic error (cosmic variance) for the aforementioned DESI-like sample. As before, we also show the theoretical predictions for both GR and $f(R)$ gravity. Several conclusions regarding systematics affecting our probe may be drawn from Figure 4:

\begin{itemize}

\item Our GR 3D theory (solid black line) can accurately predict the potential ratio generated with projected synthetic data. This confirms that we can successfully divide out projection effects by taking the ratio of averaged potentials (as implied by Eqns. 12 and 13).

\item Projection effects increase the statistical error relative to the unrealistic 3D ratio. This is expected and discussed in \cite{dan2}. In particular, compare the few percent statistical error on the 3D ratio of Figures 1 and 2 with the $\sim 8\%$ statistical error of Fig. 4. However, while projection increases the statistical error on the ratio, the cosmic variance of a larger sample goes down as the square root of the fractional increase in the sample size, which for a DESI-like sample is $\sim$10 times as many clusters as used in our previous results (Figures 1, 2, and 3.)

\item The phase spaces only need to be moderately populated with 50 galaxies between $|v_{los}| \leq 2000 \text{ km/s}$ within 3 Mpc from the cluster center. This is necessary in order to measure the escape velocity edge. By selecting the 50 brightest galaxies to create the phase spaces, the test is immune to color bias, at least to the level probed by the simulated galaxy catalog. We also find that if we under-populate the phase space, we can bias our low mass cluster potential profiles. This is a known effect and studied in detail in \cite{dan1}.
\end{itemize}

We also investigate whether the assumed mass-concentration relation affects our potential ratios. We examine a range of uncertainties in the parameters which describe the relation and find that the potential ratio profiles vary less than 1\%. This is because all mass-concentrations relations are quite flat at the cluster masses we study here and also because the mass difference between the high and low mass sub-samples is quite small.

Generally, we note that the utilization of the ratio of potentials mitigates systematic effects of the observables and theory beyond the aforementioned projection effects. For instance, \cite{miller} found that NFW density profiles predict NFW potentials that are biased high by 10-20\%. Einasto profiles on the other hand show $<$5\% biases. However, they also showed that there is no difference between the predicted and observed phase space escape velocities as a function of halo mass. We tested that by comparing the GR prediction from Eq. \ref{eq:phiratio} using NFW density fits to the more accurate Einasto density profile fits. We find that the ratios agree to within a percent. In other words, while the NFW mass profile systematically overestimates the cluster potential profiles, the ratio of NFW potentials is unbiased. Similar arguments can be made about other possible systematics, including line-of-sight effects, velocity bias, and velocity anisotropies as mentioned in the bullet points above \cite{sven15,dan1,lemze}.

\section{Statistical Constraints on $f(R)$  gravity}

\begin{figure}
  \centering
  \includegraphics[width=1\linewidth]{figure_4.eps}
  \caption{The projected gravitational potential ratio for a DESI-like galaxy cluster sample (black dots and bootstrap error on the mean) as inferred from synthetic galaxy clusters from the light cone provided by \cite{Henriques}. Compared to Fig. 2 (where the ratio is inferred from a 3D phase space) we see that projection significantly increases the statistical error. However, the DESI sample of Fig. 4 is significantly larger as it contains 9.6 times many more clusters and so the systematic error is significantly reduced
  (286 low mass clusters and 96 high mass clusters). We can determine which gravitational theory best matches the "observation." To visualize this, we plot both the GR theoretical prediction (black line) and two $f(R)$ theoretical predictions (orange-red and yellow). We conclude that our probe can differentiate between GR and $|\overline{f_{R0}}|= 4 \times 10^{-6}$ ($2 \times 10^{-6}$) at $>5\sigma$  ($>2\sigma$).}\label{fig4}
\end{figure}

 Given our analysis of systematics detailed above, we can provide a robust estimate of how well our probe will be able to constrain MG on the two different cluster samples we simulate.
 To differentiate between GR and $f(R)$ gravity, we assume that we live in a GR universe with a $\Lambda$CDM cosmology (i.e. our  ``measurements'' are the black dots of Figure 1-4), and calculate the $\chi^2$ between the measurement and the theoretical predictions.  The statistical GR error is calculated from boot-strap re-sampling of the mean and the systematic GR error takes into account the cosmic variance.  The uncertainty is taken to be the combined statistical and systematic errors added in quadrature.

 We first compare against a stacked ensemble of clusters. We assume an SDSS-like cluster sample with 10 stacked clusters per ensemble and 5 cluster ensembles per mass bin. Recall that individually, the clusters are too poorly sampled in their spectroscopy. However, the two ensemble clusters would have a high signal-to-noise weak lensing mass profile as well as a well-determined escape velocity profile. In this case, the cosmic variance term dominates the error budget. The $\chi^2$ test indicates that we can differentiate GR from $|\overline{f_{R0}}|= 5.5\times 10^{-6}$ at $2\sigma$.

 By increasing the sample size we can improve these constraints. In particular, see Fig. 4, where we show that with the DESI-like sample of galaxy clusters, we can constrain $|\overline{f_{R0}}| = 4 \times 10^{-6}$ ($2 \times 10^{-6}$) at $>5\sigma$  ($>2\sigma$).

 These are competitive forecasts compared with the two most recent galaxy cluster-scale constraints. For example, \cite{wilcox} presents an analysis of 58 clusters in the XMM sample that constrains  $|\overline{f_{R0}}| < 6\times10^{-5}$ at 95\% confidence. Similar to the potential ratio test presented here, \cite{wilcox} focuses only on cluster scales, i.e., within the virialized region of clusters. Using stacking on only 50 clusters per mass bin and after including both statistical and systematic uncertainties on the observable, our potential ratio test can achieve an order-of-magnitude improvement over observational constraints set by \cite{wilcox}. The most competitive cluster-scale constraint is set by \cite{cataneo} with a cluster abundance analysis. They find that  $|\overline{f_{R0}}| < 1.62\times10^{-5}$ at 95\% CL. Our test should be able to differentiate $|\overline{f_{R0}}| = 1.62\times10^{-5}$ and GR at $>>5\sigma$.

\section{Conclusions}
We propose a new test for gravity within galaxy clusters that leverages the ways in which  modifications to gravity alter the dynamical potential while leaving the weak-lensing inferred potential profile unchanged. We take the ratio of the squared escape velocity profile for high and low mass clusters as our observable. We do this for two reasons: 1) it leverages the fact that Chameleon screening leaves the dynamics of the high mass clusters unaffected compared to the low mass clusters and 2) it removes any systematic that is present in both samples, such as velocity bias and velocity anisotropy. While this test can be applied generally to any new model for gravity which has this property, we test it against Chameleon $f(R)$ gravity.

We first use simulations to show that particles, as tracers of the dynamical gravitational potential within galaxy clusters, do have enhanced escape velocity profiles compared to expectations from their non-dynamical (i.e. particle) masses. We then use mock galaxy catalogs to understand the role of systematics in quantifying how well we can rule out $f(R)$ gravity. We study two cases. The first utilizes a realistic but rather small number of clusters which we stack to create 2 cluster ensembles with different mass bins. We also study a second dataset which is much larger and more representative of what we expect from future surveys. In the former, cosmic variance dominates the systematic error budget, while in the latter 2D projection effects dominate. In either case, we find that our probe is more sensitive, by an order of magnitude, over current cluster-based tests for Chameleon $f(R)$ gravity.  More specifically, we have quantified our prediction for a DESI Bright Galaxy Sample-like set of clusters to push down current constraints to $|\overline{f_{R0}}| < 2 \times 10^{-6}$ at $>2\sigma$.

The test of gravity that we propose here is designed to leverage the next generation large-scale photometric and spectroscopic surveys (e.g., the Dark Energy Survey \cite{Diehl} and the Dark Energy Spectroscopic Instrument--DESI) providing high quality weak-lensing mass profiles of clusters and deep and plentiful spectroscopic follow-up of the cluster phase spaces. While we focus on scales $r < R_{200}$, we note that the difference between the GR and $f(R)$ gravity ratio increases as we go out to larger radii. This is due to the scalaron's fifth force being more effective in the outskirts of clusters where the density is lower. We also note that the difference between the GR and $f(R)$ gravity decreases with increasing redshift. We have not yet included these properties into our statistical quantification, but we expect that they will prove useful in setting even tighter constraints. We will explore these in a future effort.

\section{Acknowledgements} The authors are grateful to Elise Jennings for insightful and clarifying discussions. This material is based upon work supported by the National Science Foundation under Grant No. 1311820 and 1256260. GBZ is supported by the Strategic Priority Research Program "The Emergence of Cosmological Structures" of the Chinese Academy of Sciences Grant No. XDB09000000. KK is supported by the UK Science and Technology Facilities Council grants ST/K00090/1 and the European Research Council grant through 646702 (CosTesGrav).


\section{Introduction}\label{sec:Introduction}
The field of nonlinear metamaterials attracts significant research interest due to the numerous fascinating applications~\refPR{Lapine-2014,Shadrivov-book,Zheludev,Minovich}. The use of large nonlinearities available in resonant nonlinear metamaterials~\refPR{Lapine-2014} opens a possibility to all-optical signal processing~\refPR{Soljacic} and provides reach opportunities to implement tunable and reconfigurable photonic devices~\refPR{Lapine-2011,Slob}.

A fundamental task existing in the field is characterization of electromagnetic properties of nonlinear metamaterials, i.e. homogenization. For many nonlinear scenarios nonlinearity of metamaterials is described in a perturbative way in terms of nonlinear susceptibilities~\refPR{Boyd}. This allows one to exploit the framework of nonlinear optics and directly compare nonlinearities of artificially structured media with those occuring in natural crystals. To date, a number of approaches to homogenize nonlinear composites and metamaterials were  reported~\refPR{Sipe,Lapine-2003,Giordano,Rose2012,Silv2013}. However, most of these approaches do not take spatial dispersion into account. Spatial dispersion (or nonlocality) implies the dependence of polarization of a physically small volume on the fields existing in the neighboring regions of space. A number of theoretical and experimental studies demonstrate that nonlocality is pronounced in a wide class of linear metamaterials~\refPR{Simovski2009,Orlov,Zhukovsky,Gorlach2015}. In linear structures  nonlocality is often described in terms of effective permittivity tensor depending on both frequency and wave vector. Comprehensive theoretical models describing nonlocality in linear artificial composites were developed~\refPR{Silv2007,Silv2007L,Alu} and, in particular, a generalization of the Clausius-Mossotti formula for the case of discrete three-dimensional (3D) metamaterial was proposed~\refPR{Silv2007L}. However, to the best of our knowledge, the consistent theoretical description of spatial dispersion effects in nonlinear metamaterials remains an open problem so far.

    \begin{figure}[b]
    \includegraphics[width=0.7\linewidth]{Uniaxial-str.eps}
    \caption{(Color online) Schematic representation of a three-dimensional metamaterial composed of nonlinear uniaxial inclusions.}
    \label{ris:Uniaxial}
    \end{figure}

In this paper, we derive nonlocal nonlinear susceptibilities of a 3D nonlinear metamaterial composed of uniaxial scatterers~(Fig.~\ref{ris:Uniaxial}). We employ the discrete dipole model~\refPR{Purcell,Draine,Belov2005} describing the field of the  scatterer in dipole approximation, whereas the properties of the individual meta-atom are characterized by linear and nonlinear  polarizability tensors. The rest of the paper is organized as follows. In Sec.~\ref{sec:Homogenization} we derive general expressions for nonlocal nonlinear susceptibilities of discrete metamaterial. Sec.~\ref{sec:Local} demonstrates that in the limiting case when spatial dispersion effects in the structure can be neglected our results reduce to the known expressions for local field corrections. In Sec.~\ref{sec:Numerical} we illustrate the main features of the developed approach providing a numerical example for the structure composed of short wires loaded with varactor diodes. In particular, we highlight the essential role of spatial dispersion effects at frequencies in the vicinity of effective pemittivity resonance. Finally, in Sec.~\ref{sec:Discussion} we discuss the obtained results. Calculation of linear and nonlinear polarizabilities of a short varactor-loaded wire is provided in Appendix.

\section{Nonlocal homogenization of discrete nonlinear metamaterial}\label{sec:Homogenization}
We consider an array of nonlinear uniaxial meta-atoms arranged in a cubic 3D lattice with the period $a$ (Fig.~\ref{ris:Uniaxial}). Note that chaotic arrangement of the similar nonlinear dipoles was studied in Ref.~\refPR{Kalinin}. However, in that work mutual interactions of meta-atoms were not considered.  In the present derivation we use the CGS system of units and assume $e^{-i\omega t}$ time dependence of monochromatic fields. We consider excitation of nonlinear structure by an incident wave with frequency $\omega$, denoting wave vector of the fundamental wave propagating in the metamaterial by $\vec{k}$. Due to the nonlinear nature of inclusions, the incident wave generates polarization not only at the fundamental frequency $\omega$, but also at frequencies $2\,\omega$, $3\,\omega$, etc. This nonlinear polarization becomes a source of harmonics at frequencies $2\,\omega$, $3\,\omega$, etc. In the present analysis we consider only second and third harmonics omitting nonlinear contributions of higher order. This is a typical assumption for many nonlinear metamaterials~\refPR{Lapine-2014}. Furthermore, for the sake of simplicity we assume that the scatterers can be polarized only along $z$ axis. Then the only essential components of linear and nonlinear susceptibility tensors would be $\chi^{(1)}_{zz}$, $\chi^{(2)}_{zzz}$ and $\chi^{(3)}_{zzzz}$. Accordingly, the subscript $z$ is omitted further in the designations of vector and tensor components. Under these assumptions the dipole moment $d$ of the individual meta-atom is given by the equations:
\begin{align}
& d(\omega)=\alpha_1(\omega)\,E_{\rm{tot}}(\omega)+\notag\\
& 2\,\alpha_2(\omega;2\,\omega,-\omega)\,E_{\rm{tot}}(2\,\omega)E_{\rm{tot}}^*(\omega)+\label{d1}\\
& 3\,\alpha_3(\omega;\omega,\omega,-\omega)\,\left|E_{\rm{tot}}(\omega)\right|^2\,E_{\rm{tot}}(\omega)\:,\notag\\
\notag \\
& d(2\,\omega)=\alpha_1(2\,\omega)\,E_{\rm{tot}}(2\,\omega)+\notag\\
& \alpha_2(2\,\omega;\omega,\omega)\,E_{\rm{tot}}^2(\omega)\:,\label{d2}\\
\notag \\
& d(3\,\omega)=\alpha_1(3\,\omega)\,E_{\rm{tot}}(3\,\omega)+\notag\\
& 2\,\alpha_2(3\,\omega;2\,\omega,\omega)\,E_{\rm{tot}}(2\,\omega)\,E_{\rm{tot}}(\omega)+\label{d3}\\
& \alpha_3(3\,\omega;\omega,\omega,\omega)\,E_{\rm{tot}}^3(\omega)\:.\notag
\end{align}
where $\alpha_1$, $\alpha_2$ and $\alpha_3$ stand for linear, second- and third-order nonlinear polarizabilities. The total field $E_{\rm{tot}}(\omega)$ is the sum of the external field acting on the scatterer $E(\omega)$ and field associated with radiation friction~\refPR{landau2} $E_s(\omega)=2i\omega^3\,d(\omega)/(3\,c^3)$. In this case polarizabilities introduced in Eqs.~\eqref{d1}, \eqref{d2}, \eqref{d3} are so-called {\it bare} polarizabilities, i.e.\ they do not contain the radiation loss contribution~\refPR{SipeK}. Note that bare polarizability of a lossless scatterer is purely real. An alternative  description of radiation losses incorporates an imaginary part into scatterer polarizability~\refPR{SipeK,Belov2005}. The latter approach, however, turns out to be less convenient for nonlinear structures. Linear polarizability $\alpha_1(\omega)$ along with nonlinear polarizabilities $\alpha_2$ and $\alpha_3$ can be calculated for a particular scatterer. For example, the calculation of nonlinear polarizabilities of varactor-loaded short wire is provided in Appendix, whereas the analysis of nonlinear properties of varactor-loaded split-ring resonators is carried out in Refs.~\refPR{Lapine-2004,Powell-2007,Poutrina}. It should be emphasized that the field $E(\omega)\equiv E_{\rm{tot}}(\omega)-E_s(\omega)$ appearing in Eqs.~\eqref{d1}, \eqref{d2}, \eqref{d3} is {\it local field}, i.e.\ the electric field in the point where the scatterer is located. On the other hand, in the definition of effective material parameters the {\it average field} appears. The average fields are defined as~\refPR{Silv2007,Alu}
\begin{gather}
\left<\vec{E}(\Omega)\right>=\frac{1}{V_0}\,\int\limits_{V_0}\,\vec{E}(\Omega;\vec{r})\,e^{-i\vec{K}\cdot\vec{r}}\,dV\:,\label{Eav}\\
\left<\vec{P}(\Omega)\right>=\frac{1}{V_0}\,\int\limits_{V_0}\,\vec{P}(\Omega;\vec{r})\,e^{-i\vec{K}\cdot\vec{r}}\,dV\:,\label{Pav}
\end{gather}
where $V_0=a^3$ is a unit cell volume, $\Omega$ is arbitrary frequency and vector function $\vec{K}=\vec{K}(\Omega)$ is specified later in this section. The average structure polarization is
\begin{equation}\label{AvP}
\left<P(\Omega)\right>=d(\Omega)/V_0\:,
\end{equation}
and the average electric field can be related to the average polarization by \refPR{Alu}
\begin{equation}\label{AvField}
\left<E(\Omega)\right>=\Gamma_{k}(\Omega,\vec{K})\,d(\Omega)\:,
\end{equation}
with
\begin{equation}\label{Gamma}
\Gamma_k(\Omega;\vec{K})=-\frac{4\pi}{a^3}\,\frac{\Omega^2-K_z^2\,c^2}{\Omega^2-K^2\,c^2}\:.
\end{equation}
Local field acting on the scatterer in the coordinate origin can be evaluated via dyadic Green's function~\refPR{Novotny} $\widehat{G}(\Omega;\vec{r})$ and dipole moments $d_{mnl}$ of metaatoms as
\begin{equation}
E(\Omega)=\sum\limits_{(m,n,l)\not=(0,0,0)}\,G_{zz}(\Omega;-\vec{r}_{mnl})\,d_{mnl}(\Omega)
\end{equation}
where the indices $m,n,l$ enumerate the lattice sites and the dipole moments of the scatterers in the unbounded structure are distributed as
\begin{equation}
d_{mnl}(\Omega)=d(\Omega)\,e^{i\vec{K}(\Omega)\cdot\vec{r}_{mnl}}\:.
\end{equation}
The distribution of polarization at the fundamental frequency is determined by the incident wave, and in this case $\vec{K}(\omega)=\vec{k}$, where $\vec{k}$ is a wave vector of the structure eigenmode. Since second-order nonlinear polarization is a quadratic function of the fundamental wave, $\vec{K}(2\,\omega)=2\,\vec{k}$ and similarly $\vec{K}(3\,\omega)=3\,\vec{k}$. Thus, the expression for local field can be represented as
\begin{equation}\label{LocField}
E(\Omega)=G_k\left(\Omega;\vec{K}(\Omega)\right)\,d(\Omega)\:,
\end{equation}
with the lattice sum defined as

\begin{equation}
G_k(\Omega;\vec{K})\equiv\sum\limits_{(m,n,l)\not=(0,0,0)}\,G_{zz}(\Omega;\vec{r})\,e^{-i\vec{K}\cdot\vec{r}_{mnl}}\:.
\end{equation}
Therefore, the total field appearing in Eqs.~\eqref{d1}, \eqref{d2}, \eqref{d3} is
\begin{equation}\label{TotField}
E_{\rm{tot}}(\Omega)=G_k'\left(\Omega,\vec{K}(\Omega)\right)\,d(\Omega)
\end{equation}
with $G_k'(\Omega,\vec{K})=G_k(\Omega,\vec{K})+2i\,\Omega^3/(3\,c^3)$. Effective algorithms for the lattice sum rapid evaluation where developed earlier~\refPR{Belov2005}. Importantly, it can be proved that for real $\Omega$ and $\vec{K}$ ${\rm Im}\, G_k'(\Omega,\vec{K})=0$~\refPR{Belov2005}. Making use of Eqs.~\eqref{TotField} and \eqref{d1} it is easy to see that the dispersion equation for the linear structure with the metaatom's polarizability $\alpha_1(\omega)$ has the form~\refPR{Coevorden,Belov2005,Gorlach2014}
\begin{equation}\label{DispEq}
\alpha_1^{-1}(\omega)-G_k'(\omega;\vec{k})=0\:.
\end{equation}
Using Eqs.~\eqref{AvField} and \eqref{LocField} we obtain
\begin{equation}\label{TotAvField}
E_{\rm{tot}}(\Omega)=\Phi(\Omega;\vec{K})\,\left<E(\Omega)\right>
\end{equation}
where $\Phi(\Omega;\vec{K})=G_k'(\Omega;\vec{K})/\Gamma_k(\Omega;\vec{K})$ is introduced for convenience. Making use of Eqs.~\eqref{TotField} and \eqref{AvField}, the relation between local and averaged fields can be also represented in the alternative form
\begin{equation}\label{TotAvField2}
E_{\rm{tot}}(\Omega)=\left<E(\Omega)\right>+C_k(\Omega;\vec{K})\,d(\Omega)
\end{equation}
where $C_k(\Omega;\vec{K})=G_k'(\Omega;\vec{K})-\Gamma_k(\Omega;\vec{K})$ is the lattice interaction constant. Finally, inserting the expressions Eqs.~\eqref{AvP}, \eqref{TotAvField}, \eqref{TotAvField2} into Eqs.~\eqref{d1}, \eqref{d2}, \eqref{d3}, we obtain the relation between the averaged structure polarization and the averaged field:
\begin{align}
& \left<P(\omega)\right>=\chi^{(1)}(\omega,\vec{k})\,\left<E(\omega)\right>+\notag\\
& 2\,\chi^{(2)}(\omega;2\,\omega,-\omega,\vec{k})\,\left<E(2\,\omega)\right>\,\left<E(\omega)\right>^*+\label{P1}\\
& 3\,\chi^{(3)}(\omega;\omega,\omega,-\omega,\vec{k})\,\left|\left<E(\omega)\right>\right|^2\,\left<E(\omega)\right>\:,\notag\\
\notag\\
& \av{P(2\,\omega)}=\chi^{(1)}(2\,\omega,2\,\vec{k})\,\av{E(2\,\omega)}+\notag\\
& \chi^{(2)}(2\,\omega;\omega,\omega,2\,\vec{k})\,\av{E(\omega)}^2\:,\label{P2}\\
\notag\\
& \av{P(3\,\omega)}=\chi^{(1)}(3\,\omega,3\,\vec{k})\,\av{E(3\,\omega)}+\notag\\
& 2\,\chi^{(2)}(3\,\omega;2\,\omega,\omega,3\,\vec{k})\,\av{E(2\,\omega)}\,\av{E(\omega)}+\label{P3}\\
& \chi^{(3)}(3\,\omega;\omega,\omega,\omega,3\,\vec{k})\,\av{E(\omega)}^3\:.\notag
\end{align}
Nonlocal nonlinear susceptibilities in Eqs.~\eqref{P1}, \eqref{P2}, \eqref{P3} can be written in a compact form as follows:
\begin{widetext}
\begin{gather}
\chi^{(1)}(\Omega,\vec{K})=\frac{1}{a^3}\,\left[\alpha_1^{-1}(\Omega)-C_k(\Omega,\vec{K})\right]^{-1}\:,\label{Chi1}\\
\chi^{(2)}(\omega_3;\omega_2,\omega_1,\vec{K}(\omega_3))=\frac{\alpha_2(\omega_3;\omega_2,\omega_1)}{a^3\,\alpha_1(\omega_3)}\,\Phi(\omega_2,\vec{K}(\omega_2))\,\Phi(\omega_1,\vec{K}(\omega_1))\,\left[\alpha_1^{-1}(\omega_3)-C_k(\omega_3,\vec{K}(\omega_3))\right]^{-1}\:,\label{Chi2}\\
\chi^{(3)}(\omega_4;\omega_3,\omega_2,\omega_1,\vec{K}(\omega_4))=\frac{\alpha_3(\omega_4;\omega_3,\omega_2,\omega_1)}{a^3\,\alpha_1(\omega_4)}\Phi(\omega_3,\vec{K}(\omega_3))\,\Phi(\omega_2,\vec{K}(\omega_2))\,\Phi(\omega_1,\vec{K}(\omega_1))\,\left[\alpha_1^{-1}(\omega_4)-C_k(\omega_4,\vec{K}(\omega_4))\right]^{-1}\:.\label{Chi3}
\end{gather}
\end{widetext}
In Eq.~\eqref{Chi1}, $\Omega=\omega$, $2\,\omega$ or $3\,\omega$ and $\vec{K}(\Omega)=\vec{k}$, $2\,\vec{k}$ or $3\,\vec{k}$, respectively. In Eq.~\eqref{Chi2}, $\omega_3=\omega_2+\omega_1$, the pair $(\omega_2,\omega_1)$ acquires the values $(\omega,\omega)$, $(2\,\omega,\omega)$ and $(2\,\omega,-\omega)$. In Eq.~\eqref{Chi3}, $\omega_4=\omega_3+\omega_2+\omega_1$, the triplet $(\omega_3,\omega_2,\omega_1)$ acquires the values $(\omega,\omega,\omega)$ and $(\omega,\omega,-\omega)$. Note that Eqs.~\eqref{Chi1}, \eqref{Chi2} and \eqref{Chi3} are  valid for negative frequencies in which case $\Phi(-\Omega,\vec{K}(-\Omega))\equiv \Phi^*(\Omega,\vec{K}(\Omega))$.

Expressions \eqref{Chi1}, \eqref{Chi2} and \eqref{Chi3} depend implicitly on $\vec{k}$ which is the solution of the dispersion equation for linear structure Eq.~\eqref{DispEq}. Therefore, one may easily calculate nonlinear susceptibilities for a given direction of wave propagation and fundamental frequency $\omega$. Eqs.~\eqref{Chi1}, \eqref{Chi2}, \eqref{Chi3} suggest that nonlinear suscepbilities depend on the direction of wave propagation. Such effect is one of the manifestations of spatial dispersion. It is discussed in detail in Sec.~\ref{sec:Numerical}.

As additional evidence of the validity of our approach, we notice that the obtained expression Eq.~\eqref{Chi1} for the linear susceptibility of the structure coincides with the result derived in Ref.~\refPR{Silv2007L}. Furthermore, in the case of lossless scatterers and for the propagating mode with real $\omega$ and $\vec{k}$ effective nonlinear susceptibilities turn out to be purely real because the quantities $G_k'(\Omega,\vec{K})$ and $C_k(\Omega,\vec{K})$ are both real. This result satisfies energy conservation law.

\section{Comparison with the local effective medium model}\label{sec:Local}
In this section we demonstrate that in the limiting case when $K\,a\ll 1$ and $\Omega\,a/c\ll 1$, i.e.\ when  spatial dispersion effects in the structure are negligible, our results can be reduced to local nonlinear susceptibilities well-known from nonlinear optics. In this limit the interaction constant for a cubic lattice~\refPR{Belov2005,Silv2007L}
\begin{equation}\label{Cappr}
C_k(\Omega,\vec{K})=4\,\pi/(3\,a^3)
\end{equation}
for any real and sufficiently small $\Omega$ and $\vec{K}$. As a result, effective permittivity of the structure is given by the Clausius-Mossotti formula~\refPR{Collin}
\begin{equation}\label{Clausius}
\varepsilon_{\rm{loc}}(\omega)\equiv 1+4\,\pi\,\chi_{\rm{loc}}^{(1)}(\omega)=\frac{1+8\,\pi\,\alpha_1(\omega)/(3\,a^3)}{1-4\,\pi\,\alpha_1(\omega)/(3\,a^3)}\:.
\end{equation}
Equations~\eqref{Cappr} and \eqref{Clausius} yield also that
\begin{equation}\label{Prefactor}
\begin{split}
&\alpha_1^{-1}(\Omega)\,\left[\alpha_1^{-1}(\Omega)-C_k(\Omega,\vec{K}(\Omega))\right]^{-1}=\\
&\frac{1}{1-4\,\pi\,\alpha_1(\Omega)/(3\,a^3)}=\frac{\varepsilon_{\rm{loc}}(\Omega)+2}{3}\:.
\end{split}
\end{equation}
Furthermore, from Eq.~\eqref{Gamma} it is straightforward that
\begin{equation}\label{Gamma2}
\Gamma(\Omega,\vec{K}(\Omega))=\Gamma(\omega,\vec{k})\:,
\end{equation}
and as a consequence of Eqs.~\eqref{Cappr}, \eqref{Gamma2} and \eqref{DispEq}
\begin{equation}\label{GkTr}
\begin{split}
& G_k'(\Omega,\vec{K}(\Omega))\equiv\Gamma_k(\Omega,\vec{K}(\Omega))+C_k(\Omega,\vec{K}(\Omega))=\\
& \Gamma_k(\omega,\vec{k})+C_k(\omega,\vec{k})=G_k'(\omega,\vec{k})=\alpha_1^{-1}(\omega)\:.
\end{split}
\end{equation}
Expression for the factor $\Phi(\Omega,\vec{K}(\omega))$ can be transformed using Eqs.~\eqref{GkTr} and \eqref{Gamma2} as follows:
\begin{equation}\label{Phi}
\Phi(\Omega,\vec{K}(\Omega))\equiv\frac{G_k'(\Omega,\vec{K}(\Omega))}{\Gamma(\Omega,\vec{K}(\Omega))}=\frac{\alpha_1^{-1}(\omega)}{\alpha_1^{-1}(\omega)-4\pi/(3\,a^3)}\:.
\end{equation}
Thus, taking into account Eq.~\eqref{Clausius} we derive the simplified expression for the factor $\Phi$:
\begin{equation}\label{Phi2}
\Phi(\Omega,\vec{K}(\Omega))=\frac{\varepsilon_{\rm{loc}}(\omega)+2}{3}
\end{equation}
for any $\Omega=\omega,\,2\,\omega$ and $3\,\omega$. Applying the simplified expressions Eqs.~\eqref{Prefactor} and \eqref{Phi2} to the general formulas Eqs.~\eqref{Chi2} and \eqref{Chi3} we finally obtain:
\begin{widetext}
\begin{gather}
\chi^{(2)}_{\rm{loc}}(\omega_3;\omega_2,\omega_1)=\frac{\alpha_2(\omega_3;\omega_2,\omega_1)}{a^3}\,\frac{\varepsilon_{\rm{loc}}(\omega_3)+2}{3}\,\frac{\varepsilon_{\rm{loc}}(\omega_2)+2}{3}\,\frac{\varepsilon_{\rm{loc}}(\omega_1)+2}{3}\:,\label{Chi2Loc}\\
\chi^{(3)}_{\rm{loc}}(\omega_4;\omega_3,\omega_2,\omega_1)=\frac{\alpha_3(\omega_4;\omega_3,\omega_2,\omega_1)}{a^3}\,\frac{\varepsilon_{\rm{loc}}(\omega_4)+2}{3}\,\frac{\varepsilon_{\rm{loc}}(\omega_3)+2}{3}\,\frac{\varepsilon_{\rm{loc}}(\omega_2)+2}{3}\,\frac{\varepsilon_{\rm{loc}}(\omega_1)+2}{3}\:.\label{Chi3Loc}
\end{gather}
\end{widetext}
In Eq.~\eqref{Chi2Loc} $\omega_3=\omega_1+\omega_2$, in Eq.~\eqref{Chi3Loc} $\omega_4=\omega_3+\omega_2+\omega_1$. Both equations are also applicable for negative frequency values in accordance with $\varepsilon(-\Omega)\equiv \varepsilon^*(\Omega)$. Essentially, factors $\alpha_2/a^3$ and $\alpha_3/a^3$ describe second- and third-order nonlinear susceptibilities in the case when interaction of the scatterers is negligible. Factors $(\varepsilon_{\rm{loc}}+2)/3$ thus represent a local field correction to the nonlinear susceptibilities. The presented form of local field corrections is well-known in nonlinear optics~\refPR{Boyd}. Therefore, in the limit of negligible spatial dispersion our results are consistent with the previous studies based on the local effective medium approach.

\section{Numerical example}\label{sec:Numerical}

    \begin{figure}[h]
    \includegraphics[width=0.9\linewidth]{LinearDispb.eps}
    \caption{(Color online) (a) Calculated dispersion diagram for the structure composed of short varactor-loaded wires. (b) Enlarged branches $\Gamma$X and $\Gamma$M of the dispersion diagram in the vicinity of high-$\varepsilon$ mixed regime.}
    \label{ris:LinearDisp}
    \end{figure}

    \begin{figure}[t]
    \includegraphics[width=0.9\linewidth]{Chi-b.eps}
    \caption{(Color online) Comparison of the developed theoretical approach (solid line) with the local effective medium model (dashed line). (a) Real part of metamaterial linear susceptibility in the vicinity of resonance $f_r$. (b, c) Real part of metamaterial second-order nonlinear susceptibility $\chi^{(2)}(2\omega;\omega,\omega)$ in the vicinity of the resonances (b) $f_r$ and (c) $f_r/2$.}
    \label{ris:Chi}
    \end{figure}

    \begin{figure}[t]
    \includegraphics[width=0.9\linewidth]{Chi3b.eps}
    \caption{(Color online) Comparison of the developed theoretical approach (solid line) with the local effective medium model (dashed line). Real part of metamaterial third-order nonlinear susceptibility $\chi^{(3)}(3\,\omega;\omega,\omega,\omega)$ in the vicinity of the resonances (a) $f_r$; (b) $f_r/2$; (c) $f_r/3$.}
    \label{ris:Chi3}
    \end{figure}

    \begin{figure}[t]
    \includegraphics[width=0.9\linewidth]{Chi-Angle-b.eps}
    \caption{(Color online) Dependence of the real part of linear and nonlinear susceptibilities on the angle $\theta$ between the wave vector of the fundamental harmonic and $\Gamma X$ direction. Here, $f=f_r=0.616$~GHz, $\lambda/a=48$.}
    \label{ris:Chi-Angle}
    \end{figure}

Now we proceed to the demonstration of the main features of the developed theoretical model for a particular example. To this end we consider a 3D structure with the period $a=1$~cm composed of short wires (much shorter than the wavelength) loaded by varactors Skyworks SMV 1231-079~\refPR{Skyworks} possessing nonlinear capacitance as well as associated linear parameters. Varactor is inserted in the gap of the size $\Delta l=1.3$~mm in the middle of the wire with the radius $r=1$~mm and half-length $l=3$~mm. The total inductance of varactor inclusion is $L_{t}=42.5$~nH and the  capacitance determining the input impedance of the wire (without varactor capacitance) is $C_t=0.2$~pF. Other varactor parameters are set to those specified by the manufacturer~\refPR{Skyworks}. For clarity, dispersion diagram is shown for zero dissipation. However, nonlinear susceptibilities are calculated with realistic losses according to specifications~\refPR{Skyworks}.

The dispersion diagram of the described metamaterial in linear regime of operation calculated with Eq.~\eqref{DispEq} is presented in Fig.~\ref{ris:LinearDisp}. Analysis of the calculated diagram reveals that there are two frequency intervals where spatial dispersion effects are most pronounced. These frequency intervals correspond to the so-called mixed dispersion regime studied in detail for linear uniaxial metamaterials in Ref.~\refPR{Gorlach2014}. Mixed dispersion regime arises at frequencies in the vicinity of zeros~\refPR{Gorkunov-98,Belov2005} (low-$\varepsilon$ mixed regime) and poles~\refPR{landau8} (high-$\varepsilon$ mixed regime) of the structure local permittivity Eq.~\eqref{Clausius}.

We expect the most significant deviations of nonlinear susceptibilities from the local effective medium model to occur in mixed dispersion regime. Note that in the low-$\varepsilon$ mixed regime the main manifestation of spatial dispersion is the emergence of longitudinal waves propagating closely to $\Gamma$Z direction~\refPR{Gorlach2014}. Excitation of such longitudinal modes is not simple in experiment. Therefore, we concentrate on the analysis of transverse modes which are strongly affected by nonlocality in high-$\varepsilon$ mixed regime. In this example, high- and low-$\varepsilon$ mixed regimes correspond to the spectral ranges $0.565<f<0.670$~GHz and $0.992<f<1.024$~GHz, respectively, and frequency of linear permittivity resonance is $f_r=0.616$~GHz.

Perturbative analysis of the nonlinear oscillator model~\refPR{Boyd} suggests that nonlinear susceptibilities $\chi^{(2)}$ and $\chi^{(3)}$ are subject to resonant enhancement not only at the frequency $f_r$ but also at frequencies $f_r/2$ ($\chi^{(2)}$, $\chi^{(3)}$) and $f_r/3$ ($\chi^{(3)}$ only) as explained in more details in  Appendix. Therefore, we also studied metamaterial nonlinear properties in spectral intervals around $f_r/2$ and $f_r/3$. Linear and nonlinear susceptibilities calculated for $\Gamma$M direction of propagation by Eqs.~\eqref{Chi1}, \eqref{Chi2}, \eqref{Chi3} are compared with the predictions of the local effective medium model Eqs.~\eqref{Clausius}, \eqref{Chi2Loc}, \eqref{Chi3Loc} in Figs.~\ref{ris:Chi}, \ref{ris:Chi3}. The results show that significant deviations from the local effective medium model indeed occur in high-$\varepsilon$ mixed regime whereas at lower frequency resonances $f_r/2$ and $f_r/3$ resonant enhancement of nonlinear susceptibilities is accurately captured by the local model. Furthermore, it can be noticed that spatial dispersion dumps the resonance that leads to the decrease of the maximal achievable values of nonlinear susceptibility. Therefore, we conclude that spatial dispersion should be necessarily taken into account while describing nonlinearities of metamaterials in the vicinity of permittivity resonance.

Another interesting manifestation of spatial dispersion is the dependence of nonlinear susceptibilities on the direction of propagation of the fundamental wave with respect to the sample crystallographic axes. In Fig.~\ref{ris:Chi-Angle} we plot the dependence of linear and nonlinear susceptibilities on the angle between the wave vector $\vec{k}$ and $\Gamma$X direction in the first Brillouin zone of the crystal. Even though a dependence of nonlinear susceptibilities on the propagation direction is also known for photonic crystals~\refPR{Sakoda}, it should be stressed that the metamaterial operates in deeply subwavelength regime with the ratio $\lambda/a\approx 48$ at frequency $f_r$. Nevertheless, variation of susceptibility with the direction of wave vector $\vec{k}$ reaches $4\%$ for $\chi^{(1)}$ and $\chi^{(3)}$ and $1\%$ for $\chi^{(2)}$ at the resonance frequency $f_{\rm{r}}=0.616$~GHz. In general, at frequencies around $f_r$ maximal variation of susceptibilities $\chi^{(1)}$, $\chi^{(2)}$ and $\chi^{(3)}$ with the direction of wave vector is $4$-$5\%$.

Finally, as Fig.~\ref{ris:LinearDisp}b clearly shows, in high-$\varepsilon$ mixed regime there are two solutions of the dispersion equation corresponding to the given frequency and $\Gamma$M or $\Gamma$X directions of propagation. As a result, nonlinear susceptibilities Eqs.~\eqref{Chi2}, \eqref{Chi3} are multivalued functions of frequency in this spectral range. Consequently, one may expect that one TM-polarized incident beam can produce {\it two} second-harmonic (third-harmonic) beams with the same polarization and frequency. Importantly, the described  effect arises purely due to spatial dispersion effects and cannot be explained in the framework of the local effective medium model.

\section{Conclusions}\label{sec:Discussion}
We have developed a consistent theoretical approach for calculating effective nonlinear susceptibilities of nonlinear discrete metamaterials taking into account both frequency and spatial dispersion. We have modelled nonlinear metamaterial as a lattice of nonlinear uniaxial electric dipoles, and obtained closed-form expressions for effective nonlinear parameters. It has been demonstrated that spatial dispersion affects strongly nonlinear properties of metamaterials in the vicinity of effective permittivity resonance dumping the frequency  variation of nonlinear susceptibilities in comparison to the models of local effective media. We have predicted that, due to the spatial dispersion effects, one incident light beam may produce two harmonic beams with the same polarization. Additionally, we have demonstrated the dependence of nonlinear susceptibilities on the direction in which the fundamental harmonic propagates with respect to the crystallographic axes. Our results suggest that  nonlocality is important  in metamaterials even if they operate in a deeply subwavelength regime. Furthermore, we have verified that our results yield an accurate form of the so-called local field corrections to the nonlinear susceptibilities when spatial dispersion effects become negligible. Our conclusions are also valid for three-dimensional arrays of uniaxial magnetic scatterers such as varactor-loaded split-ring resonantors. We believe that our study provides important insights into the characterization of nonlinear metamaterials exhibiting large resonant nonlinearities.

\section{Acknowledgments}
This work was supported by the Government of the Russian Federation (Grant No.~074-U01), the Dynasty Foundation, a grant of the President of the Russian Federation (MD-7841.2015.2), the Ministry of Education and Science of the Russian Federation (Projects No. 14.584.21.0009 10, GZ No.~2014/190, GZ No.~3.561.2014/K), Russian Foundation for Basic Research (Project No.~15-02-08957 A), and the Australian Research Council. M.G. acknowledges a visiting appointment at the University of Technology Sydney.

\section*{Appendix. Linear and nonlinear polarizabilities of a short varactor-loaded wire}

    \begin{figure}[b]
    \includegraphics[width=0.7\linewidth]{Varactor.eps}
    \caption{(Color online) A schematic representation of short varactor-loaded wire used as a building block of metamaterial.}
    \label{ris:Varactor}
    \end{figure}

In this appendix we derive expressions characterizing linear and nonlinear properties of a short ($2\,l\ll \lambda$) varactor-loaded wire. Varactor is described by the nonlinear capacitance as well as associated linear parameters. Nonlinearity in such meta-atom arises due to the voltage-dependent varactor capacitance that is well approximated by the formula~\refPR{Skyworks}:
\begin{equation}\label{CU-approximation}
C(U)=\frac{C_{J0}}{(1+U/U_J)^M}
\end{equation}
where $U$ is deemed positive in the case of reverse varactor bias. In the case of varactor SMV 1231-079, the parameters in Eq.~\eqref{CU-approximation} are as follows~\refPR{Skyworks}: $M=4.999$, $C_{J0}=1.88$~pF and $U_J=10.13$~V.

Making use of the definition $C=dq/dU$ one can relate reverse voltage on the varactor $U_V$ to its charge $q$:
\begin{equation}\label{UNonlinear}
U_V(q)=U_J\,\left[\left(1+\frac{1-M}{C_{J0}\,U_J}\,q\right)^{1/(1-M)}-1\right]\:.
\end{equation}
Under the assumption $|q|\ll C_{J0}\,U_J$ the right-hand side of Eq.~\eqref{UNonlinear} can be expanded in a series with respect to $q$:
\begin{equation}\label{UNonlinearAppr}
U_V(q)=\frac{1}{C_{J0}}\,\left[q+\frac{M\,q^2}{2\,C_{J0}\,U_J}+\frac{M\,(2M-1)}{6\,C_{J0}^2\,U_J^2}\,q^3\right]\:.
\end{equation}
Taking into account parasitic linear capacitance $C_p$ loaded parallel to varactor, Eq.~\eqref{UNonlinearAppr} can be further rearranged to yield
\begin{equation}\label{UNonlinearAppr2}
\begin{split}
& U_V(Q)=\frac{1}{C_{0}}\,\left[Q+\frac{M\,C_{J0}\,Q^2}{2\,C_{0}^2\,U_J}+\right.\\
& \left.\frac{C_{J0}\,Q^3}{C_0^4\,U_J^2}\,\left(C_0\,\frac{M(2M-1)}{6}-C_p\,\frac{M^2}{2}\right)\right]
\end{split}
\end{equation}
where $Q$ is the total charge stored by both varactor and parasitic capacitance $C_p$, and $C_0=C_{J0}+C_p$. Denoting the inductance and resistance of the entire varactor inclusion by $L_t$ and $R_t$, respectively, we obtain the nonlinear oscillator equation for the total charge stored in the system:
\begin{equation}\label{NonlinOscEq}
\ddot{Q}+2\,\beta_0\,\dot{Q}+\omega_0^2\,Q+\beta_2\,Q^2+\beta_3\,Q^3=\mathfrak{E}(t)
\end{equation}
where $\mathfrak{E}(t)=\mathfrak{\epsilon}(t)/L_t$, $\mathfrak{\epsilon}(t)$ is electromotive force, $\beta_0=R_t/(2\,L_t)$, $\omega_0=1/\sqrt{L_t\,C_0}$,
\begin{equation}\label{Beta2}
\beta_2=\frac{\omega_0^2\,M\,C_{J0}}{2\,C_{0}^2\,U_J}
\end{equation}
and
\begin{equation}\label{Beta3}
\beta_3=\frac{\omega_0^2\,C_{J0}}{C_0^4\,U_J^2}\,\left[C_0\,\frac{M(2M-1)}{6}-C_p\,\frac{M^2}{2}\right]\:.
\end{equation}

To calculate linear and nonlinear polarizabilities, we consider the system composed of nonlinear varactor with associated linear parameters and wires. Denoting the input impedance of the entire wire by $Z_{\rm{inp}}(\omega)=-1/(i\omega\,C_t)$ we obtain

\begin{equation}\label{NonlinOscEq2}
\begin{split}
& \ddot{Q}+2\,\beta_0\,\dot{Q}+\omega_0^2\,Q+\beta_2\,Q^2+\beta_3\,Q^3=\\
& \text{Re}\left\lbrace\frac{\xi\,e^{-i\omega\,t}}{L_t}\,\left[l\,E(\omega)-I_0(\omega)\,Z_{\rm{inp}}(\omega)\right]+\right.\\
& \left.\frac{\xi^2\,e^{-2i\,\omega t}}{L_t}\,\left[l\,E(2\omega)-I_0(2\omega)\,Z_{\rm{inp}}(2\,\omega)\right]+\right.\\
& \left.\frac{\xi^3\,e^{-3i\,\omega t}}{L_t}\,\left[l\,E(3\omega)-I_0(3\omega)\,Z_{\rm{inp}}(3\,\omega)\right]\right\rbrace-\\
&-\frac{\xi^2\,U_l(0)}{L_t}\:,
\end{split}
\end{equation}
where $I_0(\Omega)=\dot{Q}_\Omega$, $U_l(0)=\lim\limits_{\omega\rightarrow 0} I_0(\omega)\,Z_{\rm{inp}}(\omega)$ is a static voltage arising on varactor inclusion and $\xi$ is an auxiliary dimensionless parameter that is usually introduced for the perturbative solution of nonlinear oscillator equation and which will be set to $1$ at the end of the calculation~\refPR{Boyd}. We consider the incident field $E(\omega)$ as sufficiently small. In this case the steady-state solution for Eq.~\eqref{NonlinOscEq2} may be searched in the form of a power series in $\xi$
\begin{equation}\label{Ansatz}
Q(t)=\xi\,Q^{(1)}(t)+\xi^2\,Q^{(2)}(t)+\xi^3\,Q^{(3)}(t)\:.
\end{equation}
Plugging ansatz Eq.~\eqref{Ansatz} into Eq.~\eqref{NonlinOscEq2} yields the set of equations:
\begin{equation}\label{SetNonlinEq1}
\begin{split}
& \ddot{Q}^{(1)}+2\,\beta_0\,\dot{Q}^{(1)}+\omega_0^2\,Q^{(1)}=\\
& \text{Re}\left\lbrace\frac{e^{-i\omega\,t}}{L_t}\,\left[l\,E(\omega)-I_0'(\omega)\,Z_{\rm{inp}}(\omega)\right]\right\rbrace\:,
\end{split}
\end{equation}
\begin{equation}\label{SetNonlinEq2}
\begin{split}
& \ddot{Q}^{(2)}+2\,\beta_0\,\dot{Q}^{(2)}+\omega_0^2\,Q^{(2)}+\beta_2\,\left[Q^{(1)}\right]^2=\\
& \text{Re}\left\lbrace\frac{e^{-2i\omega\,t}}{L_t}\,\left[l\,E(2\,\omega)-I_0(2\,\omega)\,Z_{\rm{inp}}(2\,\omega)\right]\right\rbrace-\frac{U_l(0)}{L_t}\:,
\end{split}
\end{equation}
\begin{equation}\label{SetNonlinEq3}
\begin{split}
& \ddot{Q}^{(3)}+2\,\beta_0\,\dot{Q}^{(3)}+\omega_0^2\,Q^{(3)}+2\,\beta_2\,Q^{(1)}\,Q^{(2)}+\\
& \beta_3\,\left[Q^{(1)}\right]^3=\text{Re}\left\lbrace\frac{e^{-3i\omega\,t}}{L_t}\,\left[l\,E(3\,\omega)-I_0(3\,\omega)\,Z_{\rm{inp}}(3\,\omega)\right]-\right.\\
&\left.\frac{e^{-i\omega\,t}}{L_t}\,I_0''(\omega)\,Z_{\rm{inp}}(\omega)\right\rbrace
\end{split}
\end{equation}
where $I_0'(\omega)=-i\omega\,Q^{(1)}(\omega)$ and $I_0''(\omega)=-i\omega\,Q^{(3)}(\omega)$, $I_0'(\omega)+I_0''(\omega)=I_0(\omega)$. Each of Eqs.~\eqref{SetNonlinEq1}, \eqref{SetNonlinEq2}, \eqref{SetNonlinEq3} is a linear differential equation with single unknown function ($Q^{(1)}(t)$, $Q^{(2)}(t)$ and $Q^{(3)}(t)$, respectively). The solutions of these equations are as follows:
\begin{gather}
Q^{(1)}(t)=\text{Re}\left(x_1\,e^{-i\omega\,t}\right)\:,\label{SetSolutions1}\\
Q^{(2)}(t)=x_0+\text{Re}\left(x_2\,e^{-2i\omega\,t}\right)\:,\label{SetSolutions2}\\
Q^{(3)}(t)=\text{Re}\left(x_1'\,e^{-i\omega\,t}+x_3\,e^{-3i\omega\,t}\right)\label{SetSolutions3}
\end{gather}
with the amplitudes $x$ defined as
\begin{gather}
x_1=\frac{l\,E(\omega)}{F(\omega)}\:,\label{x1}\\
x_0=-\frac{\beta_2\,l^2\,L_t\,\left|E(\omega)\right|^2}{2\,F(0)\,\left|F(\omega)\right|^2}\:,\label{x0}\\
x_2=\frac{l\,E(2\,\omega)}{F(2\,\omega)}-\frac{\beta_2\,l^2\,L_t\,E^2(\omega)}{2\,F^2(\omega)\,F(2\,\omega)}\:,\label{x2}\\
x_1'=-\frac{\beta_2\,l^2\,L_t}{\left|F(\omega)\right|^2\,F(2\,\omega)}\,E^*(\omega)\,E(2\,\omega)+\notag\\
\frac{l^3\,\left|E(\omega)\right|^2\,E(\omega)}{\left|F(\omega)\right|^2\,F^2(\omega)}\,\left[-\frac{3\,\beta_3\,L_t}{4}+\frac{\beta_2^2\,L_t^2}{F(0)}+\frac{\beta_2^2\,L_t^2}{2\,F(2\,\omega)}\right]\:,\label{x12}\\
x_3=\frac{l\,E(3\,\omega)}{F(3\,\omega)}-\frac{\beta_2\,l^2\,L_t\,E(\omega)\,E(2\,\omega)}{F(\omega)\,F(2\,\omega)\,F(3\,\omega)}+\notag\\
\left[\frac{\beta_2^2\,l^3\,L_t^2}{2\,F^3(\omega)\,F(2\,\omega)\,F(3\,\omega)}-\frac{\beta_3\,l^3\,L_t}{4\,F^3(\omega)\,F(3\,\omega)}\right]\,E^3(\omega)\:.\label{x3}
\end{gather}

where we use the designation
\begin{gather}
F(\Omega)=L_t\,D(\Omega)-i\Omega\,Z_{\rm{inp}}(\Omega)=L_t\,D(\Omega)+\frac{1}{C_t}\:,\\
D(\Omega)=\omega_0^2-2i\,\beta_0\,\Omega-\Omega^2\:.
\end{gather}
Having solved the nonlinear oscillator equation and assuming the current distribution as in a short symmetric antenna~\refPR{Antenna}, we are able to calculate the meta-atom dipole moment as $d(\omega)=l\,\left(x_1+x_1'\right)$, $d(2\,\omega)=l\,x_2$ and $d(3\,\omega)=l\,x_3$. It is now straightforward to prove the validity of Eqs.~\eqref{d1}, \eqref{d2}, \eqref{d3} used in Sec.~\ref{sec:Homogenization} for the meta-atom characterization. Linear and nonlinear meta-atom polarizabilities are given by the formulas:

\begin{gather}
\alpha_1(\omega)=\frac{l^2}{F(\omega)}\:,\label{Al1}\\
\alpha_2(\omega;2\,\omega,-\omega)=-\frac{1}{2}\,\frac{\beta_2\,l^3\,L_t}{\left|F(\omega)\right|^2\,F(2\,\omega)}\:,\label{Al21}\\
\alpha_2(2\,\omega;\omega,\omega)=-\frac{\beta_2\,l^3\,L_t}{2\,F^2(\omega)\,F(2\,\omega)}\:,\label{Al2}\\
\alpha_2(3\,\omega;2\,\omega,\omega)=-\frac{\beta_2\,l^3\,L_t}{2\,F(3\,\omega)\,F(2\,\omega)\,F(\omega)}\:,\label{Al23}\\
\alpha_3(\omega;\omega,\omega,-\omega)=\frac{l^4}{\left|F(\omega)\right|^2\,F^2(\omega)}\times\notag\\
\left[-\frac{\beta_3\,L_t}{4}+\frac{\beta_2^2\,L_t^2}{3\,F(0)}+\frac{\beta_2^2\,L_t^2}{6\,F(2\,\omega)}\right]\:,\label{Al31}\\
\alpha_3(3\,\omega;\omega,\omega,\omega)=\frac{l^4}{F(3\,\omega)\,F^3(\omega)}\,\left[-\frac{\beta_3\,L_t}{4}+\frac{\beta_2^2\,L_t^2}{2\,F(2\,\omega)}\right]\:.
\end{gather}

The derived expressions suggest that nonlinear polarizabilities exhibit resonant enhancement at frequencies satisfying one of the following conditions $F(\omega)=0$ or  $F(2\,\omega)=0$ or $F(3\,\omega)=0$ that was used in Sec.~\ref{sec:Numerical}.