# (partial) Derivative of norm of vector with respect to norm of vector

I'm doing a weird derivative as part of a physics class that deals with quantum mechanics, and as part of that I got this derivative:

$$\frac{\partial}{\partial r_1} r_{12}$$

where $r_1 = |\vec r_1|$ and $r_{12} = |\vec r_1 - \vec r_2|$. Is there any way to solve this? My first guess was to set it equal to 1 or since $r_{12}$ is just a scalar, but then I realized it really depends on $r_1$ after all.

The expression appears when I try to solve

$$\frac{\nabla_1^2}{2} \left( \frac{r_{12}}{2(1+\beta r_{12})} \right)$$

($\beta$ is constant)

-
Don't play dice with derivatives. –  copper.hat Feb 27 '13 at 8:26
I think I'm onto a solution, by replacing r_12 with \sqrt{(x_1 - x_2)^2 + \cdots}. I'll see if I can format it nicely and post it here in a while. –  Filip Sund Feb 27 '13 at 9:26
I can't answer my own question yet, so if anyone want to see the solution it's here until I can post it (in 6 hours), or someone else posts it as an answer: pastebin.com/Q4n4TYyR –  Filip Sund Feb 27 '13 at 9:34
The second question, about the Laplacian of a certain function, makes sense to me. The first one does not. One can find the gradient of $r_{12}$, which is a vector of partial derivatives with respect to the components of the vector $r_1$. In any case, using the same symbol for two different things, like you did with $r_1$, is a recipe for confusion. –  user53153 Feb 27 '13 at 14:01

A better way to obtain the same result would be to recall that the directional derivative is the dot product with the gradient. The gradient of the norm being $\dfrac{\vec r_1-\vec r_2}{r_{12}}$, we obtain $$\frac{\vec r_1}{r_1}\cdot \frac{\vec r_1-\vec r_2}{r_{12}}$$ which is the same answer.