Finding $\frac{\partial g\left(x,x+y\right)}{\partial x}$?

47 Views Asked by At

Suppose I have a function such that \begin{align} f\left(x,y\right)&=x^2+y^2+xy, \end{align} now let $v=x+y\implies y=v-x$, therefore \begin{align} f\left(x,v-x\right)&=x^2+\left(v-x\right)^2+x\left(v-x\right)\\ \require{cancel}&=x^2+v^2-\cancel{xv}+\cancel{x^2}+\cancel{xv}-\cancel{x^2}-2vx\\ &=x^2-2vx+v^2. \end{align} Now I'm going to let \begin{align} g\left(x,v\right)=x^2-2vx+v^2. \end{align}


Suppose now that I want to find $\displaystyle\frac{\partial g}{\partial x}$? It seems I would have to add in the piece from before since $v=y+x$, but how do I do that throughout the chain rule of partial differentials? This is what I think might happen: \begin{align} \frac{\partial g}{\partial x}&=\frac{\partial g}{\partial x}+\frac{\partial g}{\partial v}\frac{\partial v}{\partial x},\tag{1} \end{align} and if I might want to find $\displaystyle\frac{\partial g}{\partial y}$ I would have to do something like \begin{align} \frac{\partial g}{\partial y}&=\frac{\partial g}{\partial v}\frac{\partial v}{\partial y},\tag{2} \end{align} but are $\left(1\right)$ and $\left(2\right)$ right?

1

There are 1 best solutions below

3
On

Chain rule is not so helpful here, as it calculates derivative of composition of two or more functions, but you may write:

$$ \frac{\partial g(x,v(x,y))}{\partial x} = 2x - 2 v -2x \frac{\partial v}{\partial x} + 2v \frac{\partial v}{\partial x}= 0. $$

Note that:

$$ g(x,v) = (x-v)^2 = y^2 \Rightarrow \frac{\partial g}{\partial y}= 2y . $$