Suppose I have the following expression $||y-w||^2$ where y and w is a singular coordinate in the x-y plane.
I need to compute the derivative of this norm squared value and here is my approach.
According to (118) from here, the derivative of the norm is $\frac{y-w}{||y-w||}$, therefore would it be safe to say for my problem it would become 2$||y-w||\cdot\frac{y-w}{||y-w||}$ ?
Let $v:=y-w$ so, using the Kronecker delta,$$\frac{\partial}{\partial y_i}\Vert v\Vert^2=\frac{\partial}{\partial v_i}\sum_j v_j^2=\sum_j 2v_j\delta_{ij}=2v_i,$$i.e. $\frac{\partial}{\partial y}\Vert v\Vert^2=2v$. It's in fact easier to differentiate the norm starting from differentiating the squared norm than the reverse, since $$\frac{\frac{\partial}{\partial y}\Vert v\Vert^2}{\frac{\partial}{\partial y}\Vert v\Vert}=\frac{\partial\Vert v\Vert^2}{\partial\Vert v\Vert}=2\Vert v\Vert.$$