Simple question but not sure why for, $ f = \frac{\lambda}{2}\sum_{j=1}^{D} w_j^2$ $$\frac{\partial f}{\partial wj}= \lambda w_j$$
I would have thought the answer would be $\frac{\partial f}{\partial wj}= \lambda \sum_{j=1}^{D} w_j^2$
Since we get the derivative of $w_j^2$ which is $2w_j$, pull out the 2, getting rid of $\frac{\lambda}{2}$, and multiply by $w_j$.
Take for example $D=2$. Then $$ f=\frac\lambda2(w_1^2+w_2^2) $$ and indeed $$ \frac{\partial f}{\partial w_1}=\frac\lambda22w_1=\lambda w_1 $$ and $$ \frac{\partial f}{\partial w_2}=\frac\lambda22w_2=\lambda w_2. $$ The case of arbitrary $D$ is analogous.