I'm a bit new to this invariant transformations for fields so I've been having trouble manipulating them and I would appreciate any guidance.
I saw in this wikipedia article that, for example, a $\phi^4$ theory, which has the Lagrangian:
$L=\frac{1}{2}(\partial_\mu\phi)^2+g\phi^4$
Is invariant under the transformations:
$x\rightarrow\lambda x \ \ \ \ \ t\rightarrow\lambda t \ \ \ \ \ \phi\rightarrow\lambda^{-1}\phi$
I tried verifying this by starting from the general scale transformation:
$x^\mu\rightarrow\lambda x^\mu \ \ \ \ \ \phi\rightarrow \lambda^{-a}\phi$
To indeed find that $a=1$ for this theory. Substituting into the Lagrangian I get:
$L=\frac{1}{2}(\partial_\mu(\lambda^{-a}\phi))^2+g(\lambda^{-a}\phi)^4$
$L=\frac{1}{2}\lambda^{-2a}(\partial_\mu\phi)^2+g\lambda^{-4a}\phi^4$
Since the action is invariant if we recover the original lagrangian plus a total derivative, I somehow have to separate the terms to recover this I could show that this theory is indeed invariant. However, I don't know how to proceed.
However, if I take the derivative of the transformation:
$\phi'(x')=\lambda^{-a}\phi(x) \ \rightarrow \ \partial\phi'(x')=\lambda^{-a}\partial\phi'(x')=$
But also:
$\phi'(x')=\phi'(\lambda x) \ \rightarrow \ \partial\phi'(x')=\lambda^{-1}\partial\phi'(x')$
Equating both terms gives me $a=1$. However, since this only depends on the derivative it should apply for any theory and not only $\phi^4$, so I'm guessing I'm doing something wrong.