Let the dimension be arbitrary. I want to calculate
$$ L_i\equiv \frac{\partial}{\partial x_i} \int_{x-\epsilon/2}^{x+\epsilon/2} d\mathbf{z} \cdot \mathbf{A} $$
There are two ways to manipulate.
Strictly speaking, in order to postulate the existence of $\phi$ such that
$$ d\phi(\mathbf{z}) =A_i dz_i \quad \Leftrightarrow \quad \frac{\partial \phi(\mathbf{z})}{\partial z_i} =A_i \,, $$
(where repeated indices follow the Einstein summation convention), we need the condition
$$ \frac{\partial A_j}{\partial z_i} = \frac{\partial A_i}{\partial z_j} . $$
But we assume it in most cases.
Method 1
\begin{alignat}{2}
L_i &=&& \frac{\partial}{\partial x_i} \int_{x-\epsilon/2}^{x+\epsilon/2} d\phi \\
&=&& \frac{\partial}{\partial x_i} (\phi(x+\epsilon/2)-\phi(x-\epsilon/2)) \\
&=&& \frac{\partial}{\partial x_i} \left( \phi(x)+ \frac{\epsilon_j}{2} \frac{\partial}{\partial x_j} \phi(x)-\phi(x) -\frac{-\epsilon_j}{2} \frac{\partial}{\partial x_j} \phi(x) + {\cal O}(\epsilon^2) \right) \\
&=&& \epsilon_j \frac{\partial}{\partial x_i} A_j + {\cal O}(\epsilon^2)
\end{alignat}
Method 2
\begin{alignat}{2}
L_i &=&& \frac{\partial}{\partial x_i} \int_{x-\epsilon/2}^{x+\epsilon/2} d\phi \\
&=&& \frac{\partial}{\partial x_i} \phi(x+\epsilon/2) - \frac{\partial}{\partial x_i} \phi(x-\epsilon/2) \\
&=&& A_i(x+\epsilon/2) - A_i(x-\epsilon/2) \\
&=&& A_i(x) + \frac{\epsilon_j}{2} \frac{\partial}{\partial x_j} A_i -A_i(x) - \frac{-\epsilon_j}{2} \frac{\partial}{\partial x_j} A_i +{\cal O}(\epsilon^2) \\
&=&& \epsilon_j \frac{\partial}{\partial x_j} A_i +{\cal O}(\epsilon^2)
\end{alignat}
It seems to me that both methods are correct.
Which method is correct?
(This question is related with this post.)
Thanks.
The point is that in general cases we cannot postulate the existence of $\phi$ such that $$ d\phi(\mathbf{z}) =A_i dz_i \quad \Leftrightarrow \quad \frac{\partial \phi(\mathbf{z})}{\partial z_i} =A_i \, . $$
Only when the condition $ \frac{\partial A_j}{\partial z_i} = \frac{\partial A_i}{\partial z_j} $ is satisfied, $\phi$ exists.
The correct calculation goes as follows. \begin{alignat}{2} L_i &=&& \frac{\partial}{\partial x_i} \sum_{m=1}^n \int_0^1A_m(x -\epsilon/2+t \epsilon) d(t \epsilon)_m \\ &=&& \sum_{m=1}^n \epsilon_m \int_0^1 \frac{\partial}{\partial x_i} A_m(x -\epsilon/2+t \epsilon) dt \\ &=&& \sum_{m=1}^n \epsilon_m \int_0^1 \left( \frac{\partial}{\partial x_i} A_m(x) +{\cal O}(|\mathbf{\epsilon}|) \right) dt \\ &=&& \sum_{m=1}^n \epsilon_m \frac{\partial}{\partial x_i} A_m(x) +{\cal O}(|\mathbf{\epsilon}|^2) \end{alignat}
If we restrice the situation to the cases where $\frac{\partial A_j}{\partial z_i} = \frac{\partial A_i}{\partial z_j} $ is satisfied, both methods are correct. Then the results will be the same : $$ L_i = \sum_{j=1}^n \epsilon_j \frac{\partial}{\partial x_i} A_j + {\cal O}(|\mathbf{\epsilon}|^2) $$ (n : the dimension of the vector space)