Integration of tensor to find potential I have question given as:
$$\partial_k \varphi = -(C_k+ D_{jk}r_j)$$
where $C_k \,\&\, D_{jk}$ are constants and $D_{jk}$ is symmetric and traceless. I have to find $\varphi$.
I am getting : $\varphi = A -C_kr_k - D_{jk}r_jr_{k}$
but answer is: $\varphi = A -C_mr_m - \frac12 D_{sm}r_sr_{m}$
I am clueless about $\frac12$ term in the answer.
 A: Welcome to Physics StackExchange!
If you consider differentiating the third term:
$$\partial_i\left(-\frac{1}{2}D_{jk}r_jr_k\right)$$
First pull the constants put front:
$$-\frac{1}{2}D_{jk}\partial_i\left(r_jr_k\right)$$
Then apply product rule to $r_jr_k$ and see what you get. As this is a homework question I won't go further and want to let you try with this hint, but I am happy to add more if you still don't get it.
A: I think your answer and the official answer are basically the same but they used the fact that the tensor D is symmetric and there is on additional little problem in your solution. Let me start from the beginning:
\begin{equation}
\partial_{k}\phi=-D_{jk}r_{j}
\end{equation}
this expression can be written as:
\begin{equation}
\partial_{k}\phi=-\frac{1}{2}\sum_{j\neq k}\left(D_{jk}r_{j}+D_{kj}r_{j}\right)- D_{kk}r_{k}
\end{equation}
Where I just used symmetry.This is easily integrated as:
\begin{equation}
A-\frac{1}{2}\sum_{j\neq k}\left(D_{jk}r_{j}r_{k}+D_{kj}r_{j}r_{k}\right)- \frac{1}{2}D_{kk}r_{k}r_{k}
\end{equation}
Now since any term that does not contain $r_{k}$ is just a constant in this moment you can and subtract this quantity to the expression:
\begin{equation}
\pm\sum_{s\neq k \;\;m\neq k}D_{sm}r_{s}r_{m}
\end{equation}
where the plus term goes into A and the minus allows you the get the exact expression.
