Differentiating under the integral sign. Let $f=f(x, \lambda, z):\mathbb{R}^n\times \mathbb{R}_{+}\times \mathbb{R}^n$ and let
$$F(\lambda, z) = \int_{\mathbb{R}^n} |f(x, \lambda, z)|^p dx$$
be a functional defined for $1<p<+\infty.$ Then if $\lambda^{*}, z^{*}$ are minimizes of $F,$ it must be the case that
$$\partial_{\lambda} F(\lambda^{*},z^{*}) = 0\implies p\int|f|^{p-2} f \partial_{\lambda }f = 0 $$
$$\partial_{z}F(\lambda^{*},z^{*}) = 0 \implies p\int|f|^{p-2} f \partial_{z}f = 0.$$
Are these first-order conditions correct?
 A: If $F(\lambda,z)$ this is strict enough to garanty that the partial derivative and the integration are interchangeable. That stems from a set of theorems and corollares of real and complex Analysis which is part of Mathematics. It is hard to decide how much in depth the set has to go and depends on the schools of Mathematics one tends to prefer.
As shown in the question neither the domain nor the integration infinitesimals are important. Is this cases applies the stem function concept and the simplifications based thereon.
The $p-2$ originates from the fact that the partial derivative is for the absolute function the derivative poses one -1 and the other -1 from the chain role for the potence of $p$. The $f$ originates from the inner derivative of the absolute function and the partial derivative of f $\partial_{\lambda,z}f$ is from the chain rule.
You may attach the integration domain back to the conditions and they remain still correct.
So the main step is
$$\partial_{\lambda,z} \int \rightarrow \int \partial_{\lambda,z}$$
is the identity of equality under the condition
$$F(\lambda,z)=\int_{\Bbb R^{n}} \vert(f(x,\lambda,z))\vert^{p}dx$$
This define a space of functions and is famous mathematics definition and condition set. An example for text to dive deeper is Locally integrable function where this is generalization with the name absolute p-integrable function space on the $\Bbb R^{n}$.
Would not the complicated integral there the following equation holds by simple rules for partial derivative of functions:
$$\partial_{\lambda,z}\vert(f(x,\lambda,z))\vert^{p}=p\vert(f(x,\lambda,z))\vert^{p-2}f(x,\lambda,z)\partial_{\lambda,z}f(x,\lambda,z)$$
As explain above without the use of a formulare.
The last problem part is $1<p<2$. In this open interval the first factor has negative potence. This might be cause to some extra discussion whether the conditions hold depending on the inner structure of $f$. As You imagine the convergence of $f$ depending on $x$ has to be faster than a limiting border function. The restriction to the $\Bbb R^{n}$ limits what might happen further.
The main step holds in general under the condition and is valid pointwise locally and for $\Bbb R^{n}$ it is valid in $\Bbb R^{n}$ for $(f,p)$. There are som examples discussed in the linked page and the references therein.
$$\partial_{\lambda,z} \int = \int \partial_{\lambda,z}$$
A set of important functions is Lp_space $L^p$ and this is valid on the Banach space. This is a better starting point L-infinity and Sobolev_space with the scalar product as inner product.
The main knowledge is the condition is stronger than the named first-order conditions to take away from this for the restriction $1<p<\infty$.
