Derivation of tensor (with einstein summation) Let $f$ be a scalar defined by:
$$f = a_{iik}a_{kjj} (1 \leq i, j, k \leq 3)$$
in which $a$ is a third-rank tensor $a_{ijk} = a_{jik}$ and the summation convention for repeated indices is employed.
Now, we define $g = \frac{\partial f}{\partial a}$. Someone please explain to me why do we get:
$$g_{pqr} = \frac{1}{2}(a_{iip} \delta_{qr} + 2a_{rii} \delta_{qp} + a_{iiq} \delta_{pr})$$
where $\delta$ is the Kronecker delta.

The derivative of $f$ at $a$ in direction $x$ (also a tensor) is 
$x_{iik}a_{kjj} + a_{iik}x_{kjj}$ and 
$g_{pqr}x_{pqr} = \frac12(a_{iip}x_{prr} + 2a_{rii}x_{qqr} + a_{iiq}x_{pqp})$
so your formula is not correct without further symmetries for the tensors.
But $g_{qpr} = a_{iip}\delta_{qr} + a_{rii}\delta_{qp}$ is correct.
