Find partial derivative of composite function

calculusderivativespartial derivative

I am trying to find the partial derivative of composite function $ F(F(x,y), y)$. I will denote $ G= F(F(x,y), y) =F(f, g) $, where $f = F(x,y)$, $g=y$. My attempt to calculate $ \frac{\partial^2 G}{ \partial x^2}$ at point $(x_0, y_0)$ is:

$$ \frac{\partial ^2 G}{ \partial x^2}(x_0, y_0)= \frac{\partial }{ \partial x} \left( \frac{\partial G}{ \partial x} \right) = \frac{\partial }{ \partial x} \left( \frac{\partial G}{ \partial f} \frac{\partial F}{ \partial x} \right ) $$
I am not sure how to proceed, could someone write the whole solution? Thanks a lot in advance!

Best Answer

Note that the variable $y$ isn't playing much of a role here, so it might be easier to see the answer for a function of a single variable: what is $\frac{d^2}{dx^2}f(f(x))$? Let's start by computing the first derivative via the chain rule: \begin{align*} \frac{d}{dx}\left[f(f(x))\right] = f'(f(x))\frac{d}{dx}\left[f(x)\right] = f'(f(x))f'(x). \end{align*} Now the second derivative will require the product rule: \begin{align*} \frac{d^{2}}{dx^{2}}\left[f(f(x))\right] &= \frac{d}{dx}\left[f'(f(x))f'(x)\right] \\ &= \frac{d}{dx}\left[f'(f(x))\right]f'(x) + f'(f(x))\frac{d}{dx}\left[f'(x)\right] \\ &= f''(f(x))\frac{d}{dx}\left[f(x)\right]f'(x) + f'(f(x))\frac{d}{dx}\left[f'(x)\right] \\ &= f''(f(x))f'(x)^{2} + f'(f(x))f''(x). \end{align*}

Now back to the original multivariate problem. Let's try to write out the first derivative without any substitutions. $$ \frac{\partial}{\partial x}\left[F(F(x,y),y)\right] = F_{x}(F(x,y),y)\frac{\partial}{\partial x}\left[F(x,y)\right] = F_{x}(F(x,y),y)F_{x}(x,y). $$ For the second derivative we need the product rule, but this is still straightforward if we can keep track of everything. \begin{align*} \frac{\partial^{2}}{\partial x^{2}}\left[F(F(x,y),y)\right] &= \frac{\partial}{\partial x}\left[F_{x}(F(x,y),y)F_{x}(x,y)\right] \\ &= \frac{\partial}{\partial x}\left[F_{x}(F(x,y),y)\right]F_{x}(x,y) + F_{x}(F(x,y),y)\frac{\partial}{\partial x}\left[F_{x}(x,y)\right] \\ &= F_{xx}(F(x,y),y)F_{x}(x,y)F_{x}(x,y) + F_{x}(F(x,y),y)F_{xx}(x,y) \\ &= F_{xx}(F(x,y),y)F_{x}(x,y)^{2} + F_{x}(F(x,y),y)F_{xx}(x,y). \end{align*} Evaluated at a point $(x_0, y_0)$, we have \begin{align*} \frac{\partial^{2}}{\partial x^{2}}\left[F(F(x,y),y)\right]\big|_{(x_0,y_0)} = F_{xx}(F(x_{0},y_{0}),y_{0})F_{x}(x_0,y_0)^{2} + F_{x}(F(x_0,y_0),y_0)F_{xx}(x_0,y_0). \end{align*}

Related Question