Stuck on a really simple chain rule problem

So I'm going through a PDE book, and working on deriving the fundamental solution of Laplace's equation. The derivation obviously doesn't show all of the calculations/steps involved that are easy, but while doing one, I think I'm having a brain fog moment, and I keep making some mistake? Can someone help me figure out why I'm wrong?

What I have is Laplace's equation in 2-D, $$u_{x_1x_1}+u_{x_2x_2} = 0$$

Now, we let $u(x) = v(r)$ where $r=(x_1^2+x_2^2)^{1/2}$ and work out the partial derivatives $u_{x_1}$ and then $u_{x_1x_1}$ by the chain rule.

I get $u_{x_1} = v'(r)\frac{x}{r}$ and then use the chain rule again to get $u_{x_1x_1}$ but, where the book says it should be $$u_{x_1x_1} = v''(r)\frac{x^2}{r^2} + v'(r)\bigg(\frac{1}{r} - \frac{x^2}{r^3}\bigg)$$ I get $$u_{x_1x_1} = v''(r)\frac{x^2}{r^2} + v'(r)\bigg(\frac{x}{r^2} - \frac{x^3}{r^4}\bigg)$$

This is because, if I'm thinking of this correctly, won't we find $u_{x_1x_1}$ by $(u_{x_1})_rr_{x_1}$? Which would be $$u_{x_1x_1} = \bigg[v'(r)\bigg(\frac{1}{r} - \frac{x^2}{r^3}\bigg) + \frac{x}{r}v'(r)\bigg]. \frac{x}{r}$$

I clearly know there's an error in the way I'm doing this, but I can't really figure out what. Can someone help?


If we do the usual direct chain rule: $$ u_{x_1}=v'(r)\frac{x_1}{r} $$ $$ u_{x_1x_1}=v''(r)\frac{x_1}{r }\frac{x_1}{r}+v'(r)\frac{r-x_1{\frac{x_1}{r}}}{r^2} $$ Simplifies to $$ u_{x_1x_1} = v''(r)\frac{x_1^2}{r^2} + v'(r)\bigg(\frac{1}{r} - \frac{x_1^2}{r^3}\bigg) $$


won't we find $u_{x_1x_1}$ by $(u_{x_1})_rr_{x_1}$?

Note that $u_{x_1}$ is a function of $r,v'(r),x_1$ and $r$ is a function of $x_1, x_2$, so the chain rule gives

$$ \frac{\partial u_{x_1}}{\partial x_1}= \frac{\partial u_{x_1}}{\partial r} \frac{\partial r}{\partial x_1}+ \frac{\partial u_{x_1}}{\partial v'(r)} \frac{\partial v'(r)}{\partial x_1} + \frac{\partial u_{x_1}}{\partial x_1} \frac{\partial x_1}{\partial x_1}$$ The first term reduces to $$ -v'(r)\frac{x_1}{r^2}\frac{x_1}{r} $$ The second term reduces to $$ \frac{x_1}{r }v''(r)\frac{x_1}{r} $$ The last term reduces to $$ v'(r)\frac{1}{r} $$ Which, again, returns to the answer provided by the book