# Thread: Partial Derivatives Of Composite Function

1. ## Partial Derivatives Of Composite Function

Question: Let $x(t_1, t_2) = t_1 e^{t_2}, y(t_1, t_2) = t_1^2 + sin(t_1 t_2)$. Let $f(x,y)$ be a differentiable function $f: \mathbb{R}^2 \rightarrow \mathbb{R}$. Let $g(t_1, t_2) = f( x(t_1, t_2), y(t_1, t_2) )$. Express $\frac{ \partial g}{\partial t_1} (1,0)$ in terms of partial derivatives of $f$.

My Solution: Let $h: \mathbb{R}^2 \rightarrow \mathbb{R}^2$ be defined as $h(t_1, t_2) = (x(t_1,t_2), y(t_1, t_2)) = (t_1e^{t_2}, t_1^2 + sin(t_1 t_2))$. Then $g(t_1, t_2) = f(x(t_1, t_2), y(t_1, t_2)) = f(h(t_1, t_2))$. Note that $f$ is differentiable and so is $h$, because its component functions are differentiable. Thus their composition, $f(h(t_1,t_2)) = g(t_1, t_2)$ is differentiable. Note that $dfh(1,0) = df(h(1,0)) dh(1,0)$. Observe that $dfh(1,0) = \begin{pmatrix} \frac{\partial fh}{\partial t_1}(1, 0) & \frac{\partial fh}{\partial t_2} (1,0) \end{pmatrix}$.

We also know that $df(h(1,0)) = \begin{pmatrix} \frac{\partial f}{\partial x} h(1,0) & \frac{\partial f}{\partial y} h(1,0) \end{pmatrix}$ and $dh(1,0) = \begin{pmatrix} 1 & 2\\ 1 & 1 \end{pmatrix}$.

Thus $\begin{pmatrix} \frac{\partial fh}{\partial t_1}(1,0) & \frac{\partial fh}{\partial t_2} (1,0) \end{pmatrix} = \begin{pmatrix} \frac{\partial f}{\partial x} h(1,0) & \frac{\partial f}{\partial y} h(1,0) \end{pmatrix} \begin{pmatrix} 1 & 2\\ 1 & 1 \end{pmatrix}$

$= \begin{pmatrix} \frac{\partial f}{\partial x}(1,0) + \frac{\partial f}{\partial y}(1,0) & 2 \frac{\partial f}{\partial x}(1,0) + \frac{\partial f}{\partial y}(1,0) \end{pmatrix}$

Thus $\frac{\partial g}{\partial t_1}(1,0) = \frac{\partial fh}{\partial t_1}(1,0) = \frac{\partial f}{\partial x} (1,0) + \frac{\partial f}{\partial y} (1,0)$.

Is this correct? Also, is there a faster way to do this? Also, one last question...are the partial derivatives of f taken with respect to x and y or with respect to t_1 and t_2 ? Or are they just dummy variables that I can interchange?

2. It looks almost perfect. It sounds like you know what's going on. I didn't check you calculation of $dh(1,0)$, but this is not the hardest part anyway.

Originally Posted by JG89
Thus $\begin{pmatrix} \frac{\partial fh}{\partial t_1}(1,0) & \frac{\partial fh}{\partial t_2} (1,0) \end{pmatrix} = \begin{pmatrix} \frac{\partial f}{\partial x} h(1,0) & \frac{\partial f}{\partial y} h(1,0) \end{pmatrix} \begin{pmatrix} 1 & 2\\ 1 & 1 \end{pmatrix}$

$= \begin{pmatrix} \frac{\partial f}{\partial x}(1,0) + \frac{\partial f}{\partial y}(1,0) & 2 \frac{\partial f}{\partial x}(1,0) + \frac{\partial f}{\partial y}(1,0) \end{pmatrix}$

Thus $\frac{\partial g}{\partial t_1}(1,0) = \frac{\partial fh}{\partial t_1}(1,0) = \frac{\partial f}{\partial x} (1,0) + \frac{\partial f}{\partial y} (1,0)$.

Is this correct? Also, is there a faster way to do this? Also, one last question...are the partial derivatives of f taken with respect to x and y or with respect to t_1 and t_2 ? Or are they just dummy variables that I can interchange?
Note that in the expression

$\begin{pmatrix} \frac{\partial f}{\partial x}(1,0) + \frac{\partial f}{\partial y}(1,0) & 2 \frac{\partial f}{\partial x}(1,0) + \frac{\partial f}{\partial y}(1,0) \end{pmatrix}$

you forget to apply $h$ to (1,0) (so that instead of e.g. $\frac{\partial f}{\partial x}(1,0)$, you want $\frac{\partial f}{\partial x}h(1,0)$).

As for a faster way of solving this, I guess you could save a wee bit of time, but it's not a method I would utilize in a small problem like this. Specifically, you are being asked only for $\frac{\partial g}{\partial t_1}$. For calculating this, you do not need the second column of the matrix for $dh(1,0)$, so you could save yourself some work by calculating only the first column.

In this problem, the partial derivatives of $f$ are being taken with respect to the variables $x$ and $y$. Since $x$ and $y$ are, in turn, functions of the variables $t_1,t_2$, you could also consider $f$ as a function of $t_1$ and $t_2$. But the partial derivatives of $f$ with respect to $t_1$ and $t_2$ will be completely different from the partial derivatives of $f$ with respect to $x$ and $y$.