Functional derivative of meta-generalized gradient approximation (meta-GGA) I am not able to derive Eq. 21 of this paper 

F. Zahariev, S. S. Leang, and Mark S. Gordon, "Functional derivatives of meta-generalized gradient approximation (meta-GGA) type exchange-correlation density functionals",
  The Journal of Chemical Physics 138, 244108 (2013); https://doi.org/10.1063/1.4811270 
https://www.researchgate.net/publication/245026289_Functional_derivatives_of_meta-generalized_gradient_approximation_meta-GGA_type_exchange-correlation_density_functionals.

I attached herewith the steps of my derivation which I have tried.
Can you please help me to derive that equation? Looking forward to your kind reply.
$$\tau({\bf r}') = \frac{1}{2}\sum_i|\nabla\psi_i({\bf r'})|^2
=\frac{1}{2}\sum_i \int |\nabla\psi_i({\bf r'})|^2 \delta^3({\bf r}-{\bf r}')d{\bf r}',\tag{2} $$
\begin{equation}
\begin{split}
\frac{\delta \tau({\bf r}')}{\delta \psi_i({\bf r})}&= - \nabla\cdot\frac{\partial}{\partial (\nabla\psi_i({\bf r}))}\Big(\frac{1}{2}|\nabla\psi_i({\bf r'})|^2 \delta^3({\bf r} - {\bf r}')\Big)\\
 &= -\nabla \cdot (\nabla\psi_i({\bf r})\delta^3({\bf r} - {\bf r}'))\\
&= - \nabla\psi_i({\bf r})\cdot\nabla\delta^3({\bf r}-{\bf r}') - \nabla^2\psi_i({\bf r})\delta^3({\bf r}-{\bf r}').
\end{split}
\end{equation}
 A: TL;DR: The published eq. (21) does not seem correct because of a factor of 2 and carelessness of whether the argument is primed or unprimed.
Hints: Use that $$\frac{\delta \psi_j({\bf r}^{\prime})}{\delta \psi_i({\bf r})}~=~\delta^i_j ~\delta^3({\bf r}^{\prime}\!-\!{\bf r}),$$ 
so that 
$$\begin{align} \frac{\delta \tau({\bf r}^{\prime})}{\delta \psi_i({\bf r})}
~=~&\sum_j\nabla^{\prime} \psi_j({\bf r}^{\prime})\cdot \nabla^{\prime}\frac{\delta \psi_j({\bf r}^{\prime})}{\delta \psi_i({\bf r})}\cr
~=~&\nabla^{\prime} \psi_i({\bf r}^{\prime})\cdot \nabla^{\prime}\delta^3({\bf r}^{\prime}\!-\!{\bf r})\cr
~=~&-\nabla^{\prime} \psi_i({\bf r}^{\prime})\cdot \nabla\delta^3({\bf r}\!-\!{\bf r}^{\prime})\cr
~=~&\ldots\cr
~=~&-\nabla \psi_i({\bf r})\cdot \nabla\delta^3({\bf r}\!-\!{\bf r}^{\prime}) -\delta^3({\bf r}\!-\!{\bf r}^{\prime})~\nabla^2 \psi_i({\bf r})  . \end{align}$$
A: Your question is rather specialized for stackexchange (IMHO) although it's not impossible that some expert may be able to answer it definitively. I am not that person. However, I can say that your derivation seems fine to me, and that eqns (128) and (129) of Int J Quant Chem, 116, 1641 (2016) by Della Sala et al (Open Access) are identical with your equations. And I can't see an easy way to transform your result into equation (21) of the paper you cite. So, a possible answer is that they made a slip there. But this doesn't exclude someone coming along and showing that the results are equivalent.
