How to derive the formula of angular momentum of light in Maxwell equation? According to wikipedia,the angular momentum of light is expressed by
$$\epsilon_0\int \left(\vec E\times \vec{A} + \sum_{i=x,y,z}\vec E_i(\vec r\times \vec \nabla)A_i  \right) d\vec r$$
How to derive this?
Since the momentum of light is
$$\frac{1}{c^2} \vec E\times \vec H,$$
where $E$ and $H$ are the electric and magnetic fields.
the angular momentum is
$$\int \vec r\times \frac{1}{c^2}  \left(\vec E\times \vec H \right)d\vec r$$
If we substitute $\vec H=1/\mu_0\vec\nabla\times \vec A$, we get
$$
\int \vec r\times \frac{1}{c^2}  (\vec E\times \vec H) d\vec r
=\int \vec r\times \frac{1}{\mu_0 c^2} \vec E\times (\vec \nabla \times \vec A) d\vec r
.
$$
Using the equation, $\vec a \times (\vec b \times \vec c)=(\vec a\cdot\vec c)\vec b-(\vec a\cdot \vec b)\vec c$,
$$
\int \vec r\times \frac{1}{\mu_0 c} \vec E\times (\vec \nabla \times \vec A) d\vec r
=\frac{1}{\mu_0 c^2} \int \sum_{i=x,y,z} E_i (\vec r \times \vec \nabla) A_i -\vec r \times (\vec E \cdot \vec \nabla )\vec Ad\vec r
,
$$
and here I get stuck.

If we conduct integration by parts to remove $\vec r$, some unnecessary parts remains.
Let's focus on the term,   $\frac{1}{\mu_0 c^2} \int -\vec r \times (\vec E \cdot \vec \nabla )\vec Ad\vec r$.
By the integration by parts,
\begin{align}
\frac{1}{\mu_0 c^2} \int -\vec r \times (\vec E \cdot \vec \nabla )\vec Ad\vec r
& =\frac{1}{\mu_0 c^2} \sum_i \int [ -\vec r \times E_i\vec A ]_{x_i=-\infty}^{\infty}dx_{i'}dx_{i''} 
\\ & \qquad + \frac{1}{\mu_0 c^2} \int \vec E \times \vec Ad\vec r
\\ & \qquad + \frac{1}{\mu_0 c^2} \int \vec r \times (\vec \nabla \cdot \vec E)\vec Ad\vec r
\\ & =
\frac{1}{\mu_0 c^2} \sum_i \int [ -\vec r \times E_i\vec A ]_{x_i=-\infty}^{\infty}dx_{i'}dx_{i''} 
\\ & \qquad + \frac{1}{\mu_0 c^2} \int \vec E \times \vec A d\vec r
\end{align}
I'm not sure why the first term,
$$\frac{1}{\mu_0 c^2} \sum_i \int [ -\vec r \times E_i\vec A ]_{x_i=-\infty}^{\infty}dx_{i'}dx_{i''}$$
vanishes.
 A: The canonical decomposition that you're asking about is intrinsically dependent on an integration-by-parts argument that is calculated in full in this previous answer of mine. I'll refer you to that previous text for the details, but the summary is that if you define the total angular momentum as $(1)$, you can then expand it as $(2)$ and do an integration by parts to get (in vacuum) the result in $(3)$:
\begin{align}
\mathbf J 
& = \frac{1}{\mu_0c^2} \int_V\mathrm d\mathbf r \: \mathbf r \times (\mathbf E\times\mathbf B)
\tag{1}
\\ & = 
\frac{1}{\mu_0c^2} \int_V\mathrm d\mathbf r \: \mathbf r \times (E_i \nabla \! A_i )
- \frac{1}{\mu_0c^2} \int_V\mathrm d\mathbf r \: \mathbf r \times ((\mathbf E\cdot\nabla)\mathbf A)
\tag{2}
\\ & = 
\frac{1}{\mu_0c^2} \int_V\mathrm d\mathbf r \: \mathbf r \times (E_i \nabla \! A_i )
+ \frac{1}{\mu_0c^2}
\int\mathrm d\mathbf r \: \mathbf E\times \mathbf A
\\ & \qquad
- \frac{1}{\mu_0c^2}
\epsilon_{ijk}\mathbf e_i
\int_{\partial V}\mathrm d\mathbf S \cdot\left(x_j A_k \mathbf E\right)
\tag{3}
\end{align}
This final result contains the usual orbital and spin angular momentum terms, but it also has a boundary term:
$$
- \frac{1}{\mu_0c^2}
\epsilon_{ijk}\mathbf e_i
\int_{\partial V}\mathrm d\mathbf S \cdot\left(x_j A_k \mathbf E\right)
.
\tag{4}
$$
This boundary term is rather important, and it is crucial to note that this boundary term does not vanish in general, and that the decomposition of $\mathbf J$ into orbital and spin components is only valid in those situations where the boundary term vanishes.
Generally speaking, for physically-realizable fields, the $\mathbf E$ and $\mathbf A$ fields will go to zero at infinity fast enough that the boundary term $(4)$ vanishes, which makes the $L+S$ decomposition valid for physical fields.
However, this does not include all the fields you might want to consider. The canonical example of such fields (and, by extension, of why the $L+S$ decomposition should be treated with care) is that of a circularly-polarized plane wave, where


*

*the spin integral $ \frac{1}{\mu_0c^2} \int\mathrm d\mathbf r \: \mathbf E\times \mathbf A$ gives a constant SAM over all of space,

*the OAM integral $\frac{1}{\mu_0c^2} \int_V\mathrm d\mathbf r \: \mathbf r \times (E_i \nabla \! A_i )$ gives zero, and

*the original total-angular-momentum integral $\frac{1}{\mu_0c^2} \int_V\mathrm d\mathbf r \: \mathbf r \times (\mathbf E\times\mathbf B)$ is tricky to handle, but the only symmetric way to treat it says that it should be equal to zero.


This gives rise to an apparent paradox, with two different aspects: 


*

*how come the two expressions are different? The answer to that is, of course, that the boundary term cannot be neglected. 

*what happens if the plane wave is actually just the center of a circularly-polarized gaussian beam? Then, as it turns out, the original integral $\frac{1}{\mu_0c^2} \int_V\mathrm d\mathbf r \: \mathbf r \times (\mathbf E\times\mathbf B)$ will have a rather complicated behaviour at the edges, where the beam trails off to zero, and it will integrate to a nonzero value at those edges.


If that makes it sound like the angular momentum of light is a subtle quantity that requires careful handling, then... yes, absolutely. It's probably a bit advanced for you, given the way in which you've pitched your question, but if you want to read more about the subject then I normally recommend 

R.P. Cameron. On the angular momentum of light. PhD thesis, University of Glasgow (2014).

as a comprehensive yet readable introduction.
A: The required expression follows from application of the Noether theorem to the standard Lagrangian.
