Why does this term in the Euler-Lagrange equation vanish? I am reading Evans, in the book it is stated that we define the following function
$$i(\tau) = \int_U L(Du + \tau Dv, u + \tau v, x)dx$$
Then we compute:
$$i'(\tau) = \int_U L_{p_i}(Du + \tau Dv, u + \tau v, x)v_{x_i} + L_{z}(Du + \tau Dv, u + \tau v, x)vdx$$
Which is the derivative of the inside of the integral with respect to $\tau$. First confusion, how do we know that
$\frac{d}{d\tau}(\int_U L dx) = \int_U \frac{d}{d\tau}\ L dx$
From then we evaluate at 0 giving:
$$i'(0) = \int_U \sum L_{pi}(Du, u, x)v_{x_i} + L_z(Du, u, x)vdx$$
Then the book claims integration by parts yields:
$$\int_U\bigg[-\sum L_{p_i}(Du, u, x)_{x_i} + L_z(Du, u, x)\bigg]vdx$$
I just don't see how that's possible, lets separate:
$$i'(0) = \int_U \sum L_{pi}(Du, u, x)v_{x_i} dx + \int_u L_z(Du, u, x)vdx$$
Ignore the right for now and treat each term in the sum as its own intergral and set $H = L_{pi}, v' = v_{x_i}$:
$$\int_U L_{pi}(Du, u, x)v_{x_i} dx = \int_U Hv' dx$$
Integration by parts gives:
$$\int_U Hv' dx = [Hv]_U - \int_U H'v dx$$
Ok that right term is present on the equation, but the left term seems to vanish, how are we so certain that
$$[Hv]_U = L_{p_i}(Du, u, x)v = 0$$ for all $i$?
 A: *

*You can interchange the derivative and integral if you have sufficient smoothness/finiteness assumptions. This is known as Leibniz's rule for differentiation under the integral sign. You can either search on Wikipedia/see one of the appendices for Evans more closely.


*Regarding integration by parts,  once you do the product rule, you're left with the following term
\begin{align}
\int_U\sum_{i=1}^n\frac{\partial }{\partial x_i}\left(\frac{\partial L}{\partial p_i}\bigg|_{(Du(x), u(x), x)} \cdot v(x)\right)\, dx
\end{align}
This is the divergence of the vector field $F:U\to\Bbb{R}^n$, $F_i(x)=\frac{\partial L}{\partial p_i}\bigg|_{(Du(x), u(x), x)} \cdot v(x)$. So by the divergence theorem, $\int_U\text{div}F\,dx=\int_{\partial U}\langle F,\nu \rangle\, d\sigma$, where $\nu$ is the unit outward normal to $U$ and $d\sigma$ denotes the surface measure on the boundary. But notice that since $v$ vanishes on the boundary, so does $F$, so this term is zero.
Regarding point $2$, we actually don't even need to invoke the divergence theorem. We have the following elementary fact which follows from the fundamental theorem of calculus and Fubini (this is actually one of the steps used in proving the divergence/Stokes theorem).

Let $U\subset\Bbb{R}^n$ be open, $f:U\to\Bbb{R}$ a $C^1$  function with $\text{supp}(f)$ compact and contained in $U$. Then, $\int_U\frac{\partial f}{\partial x_i}\,dx=0$.

Here, there's no need to assume anything about the boundary of $U$, we also don't need to assume $U$ is a bounded set. The reason for assuming compactly supported functions is just to ensure integrability of everything.
To prove this, define for convenience $\phi:\Bbb{R}^n\to\Bbb{R}$ as $\phi(x)=f(x)$ if $x\in U$ and $\phi(x)=0$ otherwise. Since $f$ has support contained in $U$, it follows $\phi$ is $C^1$ on all of $\Bbb{R}^n$. Also,
\begin{align}
\int_U\frac{\partial f}{\partial x_i}\,dx&=\int_U\frac{\partial \phi}{\partial x_i}\,dx=\int_{\Bbb{R}^n}\frac{\partial \phi}{\partial x_i}\,dx.
\end{align}
Why? Now, we use Fubini's theorem to integrate first with respect to $x_i$:
\begin{align}
\int_{\Bbb{R}^n}\frac{\partial \phi}{\partial x_i}\,dx&=\int_{\Bbb{R}^{n-1}}\left[\int_{\Bbb{R}}\frac{\partial \phi}{\partial x_i}(x)\,dx_i\right]dx_1\cdots dx_{i-1}\,dx_{i+1}\cdots dx_n.
\end{align}
Now, use the fundamental theorem of calculus on the square brackets, and the fact that $\phi$ is compactly supported to deduce that it is $0$. Hence the entire integral vanishes.
