# Calculating partial derivatives of a rather difficult function

How can I calculate the first partial derivative $P_{x_i}$ and the second partial derivative $P_{x_i x_i}$ of function: $$P(x,y):=\frac{1-\Vert x\rVert^2}{\Vert x-y\rVert^n}, x\in B_1(0)\subset\mathbb{R}^n,y\in S_1(0)?$$

I ask this with regard to Show that the Poisson kernel is harmonic as a function in x over $B_1(0)\setminus\left\{0\right\}$.

I think it makes sense to ask this in a separate question in order to give details to my calculations.

First partial derivative:

I use the quotient rule. To do so I set $$f(x,y):=1-\lVert x\rVert^2,~~~~~g(x,y)=\Vert x-y\rVert^n.$$ Then I have to calculate $$\frac{f_{x_i}g-fg_{x_i}}{g^2}.$$ Ok, I start with $$f_{x_i}=(1-\lVert x\rVert^2)_{x_i}=(1)_{x_i}-(\sum_{i=1}^n x_i^2)_{x_i}=-2x_i.$$ Next is to use the chain rule: $$g_{x_i}=((\sum_{i=1}^{n}(x_i-y_i)^2)^{\frac{n}{2}})_{x_i}=\frac{n}{2}\lVert x-y\rVert^{n-2}(2x_i-2y_i)$$

So all in all I get $$P_{x_i}=\frac{-2x_i\cdot\Vert x-y\rVert^n-(1-\lVert x\rVert^2)\cdot\frac{n}{2}\lVert x-y\rVert^{n-2}(2x_i-2y_i)}{\Vert x-y\rVert^{2n}}$$

Is that correct? Can one simplify that?

I stop here. If you say it is correct I continue with calculatin $P_{x_i x_i}$.

• Ok, but I remebered that. Where is the mistake? Where did I treat y as not constant? Nov 16 '13 at 11:32
• Is the mistake at my calculation of $g_{x_i}$? I do not see where. Nov 16 '13 at 12:02
• @math12 The inner derivative of $g_{x_i}$ is $2x_i$ and not $2x_i - 2y_i$ Nov 16 '13 at 12:14
• But why? The inner function is $\Vert x-y\rVert^2$, right? And if I write this as $\sum_{i=1}^{n}(x_i-y_i)^2$ then to my opinion the derivative is $2x_i-2y_i$? Nov 16 '13 at 12:16
• In the second summand in the numerator of the last expression it must be $\;||x-y||^{n-1}\;$ , I think. Nov 16 '13 at 12:42

If $\;x=(x_1,...,x_n)\;,\;\;y=(y_1,...,y_n)\;$ , then

$$P(x,y):=\frac{1-\sum_{k=1}^nx_i^2}{\left(\sum_{i=1}^n(x_i-y_i)^2\right)^{n/2}}$$

so for example

$$P_{x_i}'=\frac{-2{x_i}\left(\sum_{i=1}^n(x_i-y_i)^2\right)^{n/2}-n(x_i-y_i)\left(\sum_{i=1}^n(x_i-y_i)^2\right)^{n/2-1}\left(1-\sum_{k=1}^nx_i^2\right)}{\left(\sum_{i=1}^n(x_i-y_i)^2\right)^n}$$

• Could you please show me how you got the second summand in the numerator? The first is the same that I have but the second: I do not see how you get that. Nov 16 '13 at 12:44
• Chain rule: the inner derivative$\;=2(x_i-y_i)\;$ multiplied by the exterior one$\;=\frac n2(\sum....)^{n/2 - 1}\;$ ... Nov 16 '13 at 12:45
• So your result is exactly the same as my result. Great! Nov 16 '13 at 12:53
• Now I have to calculate the derivative of this MONSTER. OMG Nov 16 '13 at 12:58
• Yes, we have the same...and now you have to derivate that horror....good luck! Nov 16 '13 at 13:12

As the second derivative I get $$P_{x_i x_i}=-2\lVert x-\xi\rVert^{-n}+4x_in\lVert x-\xi\rVert^{-n-2}(x_i-\xi_i)-n\lVert x-\xi\rVert^{-n-2}(1-\lVert x\rVert^2)-n(x_i-\xi_i)^2(-n-2)\lVert x-\xi\rVert^{-n-4}(1-\lVert x\rVert^2)$$

My question is if then

$$\Delta P=\sum_{i=1}^{n}P_{x_i x_i}=0?$$