Solution (source code)

= Solution

Put $V(\phi)=m^2\phi^2/2+\sum_{n>2}\lambda_n\phi^n/n!$. The <Euler-Lagrange equation> for the <scalar field> is $\Box\phi+V'(\phi)=0$, or explicitly
$$
\boxed{(\Box+m^2)\phi+\sum_{n>2}\frac{\lambda_n}{(n-1)!}\phi^{n-1}=0.}
$$
The derivative of $\phi^n/n!$ is $\phi^{n-1}/(n-1)!$; all interaction terms therefore enter with the displayed plus sign for the chosen <Minkowski metric>.