Making a mistake when changing variable of differentiation.

88 Views Asked by At

I am making a mistake somehow when differentiating and changing the variable of differentiation. I think it has something to do with the way I introduce a new variable that relates two independent variables, but I'm confusing myself and can't undertand exactly what I'm doing wrong.

So I have a product of three matrices whose entries are parameterised by $r$ and $r'$. The product is

$$ \mathbf{F}(r,r')=\mathbf{G}(r-r')\mathbf{Q}(r')\mathbf{n}(r-r'). $$

I am interested in the derivative with respect to $r$, namely $\partial_r \mathbf{F}(r,r')$.

I notice that two of the matrices only depend on the difference between $r$ and $r'$ so I introduce the variable $R=r-r'$. I wish to change the variable of differentiation to $R$ as follows

$$ \begin{align} \partial_r \mathbf{F}(r,r') &= \partial_r \left[ \mathbf{G}(r-r')\mathbf{Q}(r')\mathbf{n}(r-r') \right]\\ &= \left[ \partial_r \mathbf{G}(r-r') \right] \mathbf{Q}(r') \mathbf{n}(r-r') + \mathbf{G}(r-r') \mathbf{Q}(r') \left[ \partial_r \mathbf{n}(r-r')\right] \\ &= \left[ \partial_R \mathbf{G}(R) \right] \mathbf{Q}(r') \mathbf{n}(R) + \mathbf{G}(R) \mathbf{Q}(r') \left[ \partial_r \mathbf{n}(R)\right] \\ &= \partial_R \mathbf{F}(r,r') \end{align} $$

Then, I notice that I can write $\mathbf{Q}(r')$ as $\mathbf{Q}(r-R)$, and therefore

$$ \begin{align} \partial_R \mathbf{F}(r,r') &= \partial_R \left[ \mathbf{G}(R)\mathbf{Q}(r-R)\mathbf{n}(R) \right] \\ &= \partial_R \left[ \mathbf{G}(R)\right]\mathbf{Q}(r-R)\mathbf{n}(R) + \mathbf{G}(R)\partial_R \left[\mathbf{Q}(r-R)\right]\mathbf{n}(R) + \mathbf{G}(R)\mathbf{Q}(r-R)\partial_R \left[\mathbf{n}(R)\right] \end{align} $$

This result is not the same as calculated above (there is an additional term $\mathbf{G}[\partial_R \mathbf{Q}] \mathbf{n}$). Please could you tell me what I'm doing wrong?

2

There are 2 best solutions below

1
On BEST ANSWER

The notation for partial derivatives is unfortunately ambiguous. One has to specify the variable of differentiation but also what variable is remaining constant. I.e., $\tfrac{\partial}{\partial x} f(x,y)$ means the derivative of $f(x,y)$ in $x$ leaving $y$ constant. This is not, for example, the same as the derivative of $f(x,y)$ in $x$ leaving $x+y$ constant!

You should always specify a change of two variables into two variables to make sense of partial derivatives. Hence in this case, set $R=r-r'$ and also $S=r'$. Then, by the general transformation rule for partial derivatives, $$ \frac\partial{\partial r}=\frac{\partial R}{\partial r}\frac\partial{\partial R}+\frac{\partial S}{\partial r}\frac\partial{\partial S}=\frac{\partial}{\partial R}. $$ Here, as is always left implicit, $\tfrac\partial{\partial r}$ is the derivative in $r$ at $r'$ fixed and $\tfrac\partial{\partial R}$ is the derivative in $R$ at $S$ fixed. Hence, in the last computation you have $$ \frac\partial{\partial R}(G(R)Q(S)n(R)) $$ and you should not differentiate $Q$.

Note the following alternative: if $R=r-r'$ but $S=r$ instead, which is more in the spirit of your final computation, we have $$ \frac\partial{\partial r}=\frac{\partial R}{\partial r}\frac\partial{\partial R}+\frac{\partial S}{\partial r}\frac\partial{\partial S}=\frac{\partial}{\partial R}+\frac\partial{\partial S} $$ and so $$ \frac\partial{\partial r}(G(r-r')Q(r')n(r-r'))= \frac\partial{\partial R}(G(R)Q(S-R)n(R))+\frac\partial{\partial S}(G(R)Q(S-R)n(R)) $$ and note that the additional term coming from differentiating $Q(S-R)$ in $R$ (that you have) is compensated by the last term obtained from differentiating $Q(S-R)$ in $S$ (that you missed).

0
On

We have a function

$$f(r,r')=G(r-r')Q(r')n(r-r').$$

We make a change of variables to $R=r-r'$ and $S=r'$. The function transforms to

$$f(R,S)=G(R)Q(S)n(R).$$

We wish to calculate $\partial f/\partial r$. First note that the differential of $f(R,S)$ is

$$df = \left( \frac{\partial f}{\partial R} \right)_S dR + \left( \frac{\partial f}{\partial S} \right)_R dS,$$

where we have been careful and explicitly stated (in the bracket subscript) which variable is being held constant in the partial derivatives. Thus, if we are interested in the partial derivative of $f$ with respect to the original variable $r$, we have

$$\left( \frac{\partial f}{\partial r} \right)_{r'} = \left( \frac{\partial f}{\partial R} \right)_S \left( \frac{\partial R}{\partial r} \right)_{r'} + \left( \frac{\partial f}{\partial S} \right)_R \left( \frac{\partial S}{\partial r} \right)_{r'}.$$

The derivatives of $R$ and $S$ with respect to $r$, whilst holding $r'$ constant, simplify the above equation to

$$\left( \frac{\partial f}{\partial r} \right)_{r'} = \left( \frac{\partial f}{\partial R} \right)_S.$$

Continuing the computation a step further (and dropping the explicit notation) we have

$$\frac{\partial f}{\partial r} = \frac{\partial f}{\partial R} = \frac{\partial G(R)}{\partial R} Q(S) n(R) + G(R)Q(S)\frac{\partial n(R)}{\partial R}.$$