# Math Help - Use of chain rule for two variables

1. ## Use of chain rule for two variables

Let $\underline{g}:\mathbb{R}^2 \rightarrow \mathbb{R}^2$ be defined by $\underline{g}(x,y)=(x^2-y^2, 2xy)$.
Let $f:\mathbb{R}^2 \rightarrow \mathbb{R}$ be defined by $f(u,v)= u^2+v^2$
Evaluate $(D(f \circ \underline{g}))(x,y)$

My attempt:

Chain rule for two variables: $(D(f \circ \underline{g}))(x,y)=Df(\underline{g}(x,y)).D\unde rline{g}(x,y)$

$Df(\underline{g}(x,y))=\begin{pmatrix} \frac{\partial (x^2+y^2)^2}{\partial (x^2-y^2)} & \frac{\partial (x^2+y^2)^2}{\partial (2xy)}\end{pmatrix}$

$D\underline{g}(\underline{x})= \begin{pmatrix} \frac{\partial (x^2-y^2)}{\partial (x)} & \frac{\partial (x^2-y^2)}{\partial (y)} \\ \frac{\partial (2xy)}{\partial (x)} & \frac{\partial (2xy)}{\partial (y}\end{pmatrix}=\begin{pmatrix} 2x & -2y \\ 2y & 2x \end{pmatrix}$

My problem is that i have no idea how to differentiate the first matrix???
Also the matrix dimensions dont work for matrix multiplication

2. Originally Posted by FGT12
Let $\underline{g}:\mathbb{R}^2 \rightarrow \mathbb{R}^2$ be defined by $\underline{g}(x,y)=(x^2-y^2, 2xy)$.
Let $f:\mathbb{R}^2 \rightarrow \mathbb{R}$ be defined by $f(u,v)= u^2+v^2$
Evaluate $(D(f \circ \underline{g}))(x,y)$

My attempt:

Chain rule for two variables: $(D(f \circ \underline{g}))(x,y)=Df(\underline{g}(x,y)).D\unde rline{g}(x,y)$

$Df(\underline{g}(x,y))=\begin{pmatrix} \frac{\partial (x^2+y^2)^2}{\partial (x^2-y^2)} & \frac{\partial (x^2+y^2)^2}{\partial (2xy)}\end{pmatrix}$

$D\underline{g}(\underline{x})= \begin{pmatrix} \frac{\partial (x^2-y^2)}{\partial (x)} & \frac{\partial (x^2-y^2)}{\partial (y)} \\ \frac{\partial (2xy)}{\partial (x)} & \frac{\partial (2xy)}{\partial (y}\end{pmatrix}=\begin{pmatrix} 2x & -2y \\ 2y & 2x \end{pmatrix}$

My problem is that i have no idea how to differentiate the first matrix???
Also the matrix dimensions dont work for matrix multiplication
If you write $(u,v) = \underline{g}(x,y)$, then $Df(u,v) = \begin{pmatrix}\frac{\partial (u^2+v^2)}{\partial u} & \frac{\partial (u^2+v^2)}{\partial v}\end{pmatrix} = \bigl(2u\ \ 2v\bigr) = \bigl(2(x^2-y^2)\ \ 4xy\bigr)$. So $Df(\underline{g}(x,y))= \bigl(2(x^2-y^2)\ \ 4xy\bigr) \begin{pmatrix} 2x & -2y \\ 2y & 2x \end{pmatrix}$, which is a 1x2 matrix, as it should be for the derivative of the function $f \circ \underline{g}: \mathbb{R}^2 \rightarrow \mathbb{R}$.