# Question on derivative of multi variable.

1. Feb 6, 2010

### yungman

I have a hard time taking the derivative $$\frac{\partial u}{\partial A}$$

Where $$u=A+B$$ and $$A = x+2y,B = x-2y$$

This is because A and B are both function of x and y. I don't think I can treat A and B as totally indenpend to each other where

$$\frac{\partial B}{\partial A}=0, \frac{\partial A}{\partial B}=0$$ .

This is what I did and please tell me what did I do wrong.

$$A = x+2y,B = x-2y \Rightarrow x=\frac{A +B}{2}, y=\frac{A - B}{4}$$

$$\Rightarrow \frac{\partial A}{\partial x}= 1 , \frac{\partial A}{\partial y}= 2 , \frac{\partial B}{\partial x}= 1 , \frac{\partial B}{\partial y}= -2$$

$$x=\frac{A +B}{2}\Rightarrow \frac{\partial x}{\partial A}=\frac{1}{2} [\frac{\partial A}{\partial A}+\frac{\partial B}{\partial x}\frac{\partial x}{\partial A}] = \frac{1}{2} [1 + \frac{\partial B}{\partial x}\frac{\partial x}{\partial A}] = \frac{1}{2} + \frac{1}{2}\frac{\partial x}{\partial A}\Rightarrow \frac{\partial x}{\partial A} = 1$$

$$y=\frac{A - B}{4} \Rightarrow \frac{\partial y}{\partial A}=\frac{1}{4} [\frac{\partial A}{\partial A}- \frac{\partial B}{\partial y}\frac{\partial y}{\partial A}] = \frac{1}{4} [1 + 2\frac{\partial y}{\partial A}] = \frac{1}{4} + \frac{1}{2}\frac{\partial y}{\partial A}\Rightarrow \frac{\partial y}{\partial A} = \frac{1}{2}$$

$$\frac{\partial y}{\partial B}=\frac{1}{4} [\frac{\partial A}{\partial y}\frac{\partial y}{\partial B} - \frac{\partial B}{\partial B}] = \frac{1}{4} [ 2\frac{\partial y}{\partial B} - 1] = \frac{1}{2}\frac{\partial y}{\partial B} -\frac{1}{4} \Rightarrow \frac{\partial y}{\partial B} = -\frac{1}{2}$$

$$\frac{\partial u}{\partial A} = \frac{\partial A}{\partial A}+ \frac{\partial B}{\partial x}\frac{\partial x}{\partial A} + \frac{\partial B}{\partial y}\frac{\partial y}{\partial A} = 1 +\frac{\partial B}{\partial x} + \frac{1}{2}\frac{\partial B}{\partial y} = 0$$

Obviously I did it wrong, can anyone tell me what I did wrong. This is not homework. Question is how to treat A and B when they both are function of x & y.

Thanks

Last edited: Feb 7, 2010
2. Feb 7, 2010

### HallsofIvy

So u= (x+2y)+ (x- 2y)= 2x?
$$\frac{\partial u}{\partial x}= 2$$
$$\frac{\partial u}{\partial y}= 0$$

Or the chain rule:
$$\frac{\partial u}{\partial x}= \frac{\partial u}{\partial A}\frac{\partial A}{\partial x}+ \frac{\partial u}{\partial B}\frac{\partial B}{\partial x}$$
$$= 1(1)+ 1(1)= 2$$

$$\frac{\partial u}{\partial y}= \frac{\partial u}{\partial A}\frac{\partial A}{\partial y}+ \frac{\partial u}{\partial B}\frac{\partial B}{\partial y}$$
$$= 1(2)+ 1(-2)= 0$$

That doesn't matter.

I don't know that there is any thing wrong with what you did, but I don't know why you would do it. Neither the derivative of x with respect A nor the derivative of y with respect to B is relevant to your original question.

3. Feb 7, 2010

### yungman

I gave a bad example that it simplify into 2x. I since read the Chain Rule again. I just want to double check with you:

Assumming $$A=x+2y, B=cos(x)+sin(y)$$ so it cannot be simplify like the other one. Please tell me the two points I make below is correct:

1) My understanding now is in order for $$\frac{\partial u}{\partial A}$$ to be valid, A has to be a function of u. $$\frac{\partial A}{\partial u}$$ is invalid because u is not a function of A and therefore $$\frac{\partial A}{\partial u} = 0$$.

2) THis also true that A is not a function of B or the other way around EVEN both contain the same two variable x and y. Therefore
$$\frac{\partial A}{\partial B} = 0,\frac{\partial B}{\partial A} = 0$$.

THanks

Last edited: Feb 7, 2010
4. Feb 7, 2010

### Landau

You probably meant to say "because A is not a function of u". But if u=A+B, then A=u-B. So A does depend on u. (u,A, and B all depend on each other, namely because they all depend on x and y and those are the actual variables)

5. Feb 7, 2010

### yungman

Can you tell me how should I look at it? I am still pretty confused.