Scaling Transformations - Scalar Field I've started self-studying QFT and I am using some Cambridge notes (Tong's). There is a specific excersise where we are asked to see how the action
$$S=\int d^4x\left(\frac{1}{2}\partial_{\mu}\phi\partial^{\mu}\phi-\frac{1}{2}m^2\phi^2-g\phi^p\right)$$ transforms when
$$x\rightarrow x'=\lambda x\quad\text{and}\quad\phi(x) \rightarrow \phi'(x)= \lambda^{-D}\phi(\lambda^{-1}x)$$
where we can define for simplicity $y=\lambda^{-1}x=\lambda^{-2}x'$. In the notes he is saying that:
$$\frac{\partial \phi(x)}{\partial x^\nu}\rightarrow \frac{\partial x'^{\mu}}{\partial x^{\nu}}\frac{\partial \phi'(x)}{\partial x'^{\mu}}=λ\frac{\partial }{\partial x'^{\mu}}(λ^{-D}\phi(λ^{-1}x))=λ^{-(1+D)}\frac{\partial}{\partial y^{\mu}}\phi(y)\tag{A1}$$
and that
$$\int d^4x=λ^4\int d^4y\tag{B1}$$
Those two do not make sense to me!!! since I would work it out as follows:
$$\frac{\partial \phi(x)}{\partial x^\nu}\rightarrow (\frac{\partial \phi(x)}{\partial x^\nu})'=\frac{\partial x^{\mu}}{\partial x'^{\nu}}\frac{\partial \phi'(x)}{\partial x^{\mu}}=λ^{-1}\frac{\partial }{\partial x^{\mu}}(λ^{-D}\phi(λ^{-1}x))=λ^{-(2+D)}\frac{\partial}{\partial y^{\mu}}\phi(y)\tag{A2}$$
and
$$\int d^4x \rightarrow \left(\int d^4x\right)'=\lambda^8\int d^4y\tag{B2}$$
Could someone tell me what am I doing wrong? Why are the correct transformation relations not (A2) and (B2) instead of (A1) and (B1)?
 A: Your confusion is because in transforming the action $S' \rightarrow S$ you do an "extra" transformation of the variable $x$ when in reality $x$ is just a "dummy" variable that is integrated over. Equations should help make this clear.
Let's make this completely general. We are interested in the effect on the action functional from a transformation affecting both the positions and the fields:
\begin{equation}
x \rightarrow x' \\
\Phi(x) \rightarrow \Phi'(x') = \mathcal{F}(\Phi(x)).
\end{equation}
Written in this way, $\Phi$ is affected by the transformation in two ways. The first is a functional change in the field $\Phi' = \mathcal{F}(\Phi)$ and the second a change in the argument $x \rightarrow x'$.
For a generic Lagrangian $\mathcal{L}$,
\begin{align}
S' &= \int d^dx~\mathcal{L}(\Phi'(x), \partial_{\mu} \Phi'(x)) \\
&= \int d^dx'~\mathcal{L}(\Phi'(x'), \partial_{\mu}' \Phi'(x')) \\
&= \int d^dx'~\mathcal{L}(\mathcal{F}(\Phi(x)), \partial_{\mu}' \mathcal{F}(\Phi(x))) \\
&= \int d^dx~ \Big|\frac{\partial x'}{\partial x}\Big|~\mathcal{L}(\mathcal{F}(\Phi(x)), (\partial x^{\nu}/ \partial x'^{\mu})\partial_{\nu} \mathcal{F}(\Phi(x))).
\end{align}
In the second line there is a change of the integration variable $x \rightarrow x'$; in the third line we express $\Phi'(x')$ in terms $\Phi(x)$; in the last line we express $x'$ in terms of $x$.
$\textbf{Note:}$ At the very beginning, in going from $S \rightarrow S'$, the reason we substitute $\Phi'(x)$ for $\Phi(x)$ (and $\textit{not}$ $\Phi'(x')$), is that since the action integrates over $x$ it is just an integration or "dummy" variable that can be renamed. To see the $\textit{functional}$ change in the action we have to look at how it changes under a new function, in this case $\Phi(x) \rightarrow \Phi'(x)$.
This is why for the specific case
\begin{equation}
x\rightarrow x'=\lambda x\quad\text{and}\quad\phi(x) \rightarrow \phi'(x)= \lambda^{-D}\phi(\lambda^{-1}x)
\end{equation}
with $y=\lambda^{-1}x=\lambda^{-2}x'$, that
\begin{equation}
\frac{\partial \phi(x)}{\partial x^\nu}\rightarrow \frac{\partial x'^{\mu}}{\partial x^{\nu}}\frac{\partial \phi'(x)}{\partial x'^{\mu}}=λ\frac{\partial }{\partial x'^{\mu}}(λ^{-D}\phi(λ^{-1}x))=λ^{-(1+D)}\frac{\partial}{\partial y^{\mu}}\phi(y)
\end{equation}
and
\begin{equation}
\int d^4x=λ^4\int d^4y.
\end{equation}
A: In the same spirit and notation as eigenschwarz's solution, but perhaps a bit more directly, one can say it as follows: under $x\to x' = \lambda x$, the field $\phi$ transforms to
$$\phi(x)\to \phi'(x') \equiv F[\phi(x)] = \lambda^{-D} \phi(\lambda^{-1} x) $$
Remark: one derives this transformation from exponentiating the representation of infinitesimal dilatations acting on fields. This is described nicely in Di Francesco et al, Conformal Field Theory, chapter 4.2.1.
To avoid possible confusion, let's write this with a general argument:
$$\phi'(y) = \lambda^{-D}\phi(\lambda^{-1}y)$$
The action $S[\phi]$ transforms to $S'[\phi']$, where $S'[\phi']$ is simply the integral over the same Lagrangian with $\phi\to \phi'$ (as eigenschwarz writes). Note that we're deliberately not writing $\phi(x)$ or $\phi'(x')$ because the spacetime position is a dummy variable that's integrated over (as eigenschwarz explains clearly).
For simplicity, let's look only at the kinetic term.
\begin{align}
S'[\phi']
&= \frac{1}{2} \int d^dx\; 
\left[\frac{\partial}{\partial x^\mu} \phi'(x)\right]^2
\\
&= \frac{1}{2} \int d^dx\; 
\left[\frac{\partial}{\partial x^\mu} \lambda^{-D} \phi(\lambda^{-1}x)\right]^2
\end{align}
Now we do a change of integration variable so that the argument of the field matches the integration variable: $y^\mu\equiv \lambda^{-1}x^\mu$
\begin{align}
S'[\phi'] 
&= \frac{1}{2} \lambda^{-2D} \int d^dy\, \lambda^d 
\;  \left[
\lambda^{-1}
\frac{\partial}{\partial y^\nu} \phi(y)\right]^2
\\
&= \frac{1}{2} \lambda^{d-2D-2} \int d^dy
\;  \left[
\frac{\partial}{\partial y^\nu} \phi(y)\right]^2
\end{align}
Here we see that $S'[\phi'] = \lambda^{d-2D-2} S[\phi]$; this is clear from recognizing that $y$ is simply a dummy variable. Thus when $d=4$, the kinetic term of the action is dilatation-invariant when $D = 1$. The other terms in the action are straightforward to analyze in the same way.
