# How obtain the n-th derivative of a function with an implicit variable? [duplicate]

I'm interested in obtain the analytical n-th derivative with respect to the variable $x$ of an implicit function like $V(h(x))$ where $h(x)$ is an implicit equation and can not be obtained the variable $h$ in terms of $x$. But we know that $\frac{dh}{dx}=f(h)$, so that we can make the derivatives with respect to $h$ using the chain rule:

$\frac{dV(h(x))}{dx}=\frac{dV(h)}{dh}\frac{dh}{dx}=\frac{dV(h)}{dh}\cdot f(h)$

$\frac{d^2V(h(x))}{dx^2}=\frac{d^2V(h)}{dh^2} \left(\frac{dh}{dx}\right)^2+\frac{dV(h)}{dh}\frac{df(h)}{dh}f(h) =\frac{d^2V(h)}{dh^2} f(h)^2+\frac{dV(h)}{dh}\frac{df(h)}{dh}f(h)$

. . .

And here is the problem, how can be obtained this in Mathematica?, since using the command D[V[h[x]], {x, n}] it doesn't work.

• Is this what you are after? h /: Derivative[1][h] := f@*h; D[V[h[x]], {x, 2}] – Kuba Feb 19 '16 at 12:35
• I think this has been covered extensively in a previous question – gpap Feb 19 '16 at 12:47
• I think that it's not exactly the same. Here we want only use the chain rule and express the derivatives in x with respect to h. Because as we know the functions of V(h) and f(h) then we can evaluate numerically putting up the value of h. – Joe Feb 19 '16 at 13:26
• Ah it doesn't work me the code, gives me an error on the character "@", I don't know why. – Joe Feb 19 '16 at 13:31
• Ah now it works, my version of Mathematica was 9, a lot of thanks! – Joe Feb 19 '16 at 15:09