# Chain Rule Definition $f=f(x,g(x,y))$

Apply the chain rule to calculate: $\frac{\partial^2 f}{\partial x^2}$

$\ f=f(x,g(x,y))$

I have a trouble in the the first member of F becouse I don't know how to write correctly.

if x was another fuction like h(x,y), then $\ f=f(h(x,y),g(x,y))$ i write:

$$\frac{\partial f}{\partial x} = \frac{\partial f}{\partial h}\frac{\partial h}{\partial x} + \frac{\partial f}{\partial g}\frac{\partial g}{\partial x}$$

but no. how to write correctly

$\frac{\partial^2 f}{\partial x^2}$ where $\ f=f(x,g(x,y))$

-
Do you mean $\frac{\partial^2 f}{\partial x^2}$ instead of $\frac{\partial f^2}{\partial x^2}$? Because the latter doesn't make a lot of sense. – Javier Apr 25 '13 at 2:22
@JavierBadia Yes! Thanks! – Argentino2013 Apr 25 '13 at 2:38

You can use total differential concept such as (by skipping dy) $$df(x,g(x,y))=\frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial g}\frac{\partial g}{\partial x}dx$$ $$\Rightarrow \frac{d f}{d x}=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial g}\frac{\partial g}{\partial x}$$ and for second order $$d^2f(x,g(x,y))=\frac{\partial^2 f}{\partial x^2}(dx)^2+\frac{\partial^2 f}{\partial g^2}\bigg(\frac{\partial g}{\partial x}dx\bigg)^2+\frac{\partial f}{\partial g}\frac{\partial^2 g}{\partial x^2}(dx)^2$$ $$\Rightarrow \frac{d^2 f}{d x^2}=\frac{\partial^2 f}{\partial x^2}+\frac{\partial^2 f}{\partial g^2}\bigg(\frac{\partial g}{\partial x}\bigg)^2+\frac{\partial f}{\partial g}\frac{\partial^2 g}{\partial x^2}$$
You know the formula for $f = f(h(x,y),g(x,y))$. Simply replace $h(x,y) = x$ and you should be done.
Yes, but i think that this is not correct: $$\frac{\partial f}{\partial x} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial x} + \frac{\partial f}{\partial g}\frac{\partial g}{\partial x}$$ – Argentino2013 Apr 25 '13 at 2:39
may be this? $$\frac{\partial f}{\partial x} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial g}\frac{\partial g}{\partial x}$$ then, $$\frac{\partial f}{\partial x} = 1 + \frac{\partial f}{\partial g}\frac{\partial g}{\partial x}$$ – Argentino2013 Apr 25 '13 at 2:40