# Second derivatives, reciprocals, and the chain rule

Once in a while, a student puts me on the spot; it’s not always deliberate.

In this case, changing a variable in a second-order differential equation, he blithely said “Well, $\diffn 2yx = \frac{1}{\diffn 2xy}$…”

“Whoa whoa whoa…”

“… isn’t it?”

Now, had I not had a series of discussions with @realityminus3 recently about notation and how it can mislead, I probably wouldn’t have caught the error. But I’ve seen the error of my ways! Even if I couldn’t readily explain why the error was an error beyond “don’t let the notation fool you!”, I was able to convince the student to attack it another way.

And, now I have some time to write things down, I can explain… well, not exactly *why*, but at least *what* the link is.

Here’s how it goes: suppose $y=f(x)$. We’re going to differentiate this with respect to $y$, and mix Leibniz and Newton notation like heathens.

$1 = f’(x) \diff xy$, according to the chain rule. Now we can differentiate this with respect to $y$ again, using the product rule:

$0 = f’‘(x) \left(\diff xy\right)^2 + f’(x) \diffn 2xy$. Almost lastly, rearrange:

$-\frac {f’‘(x) \left(\diff xy\right)^2}{f’(x)} = \diffn 2xy$

However, $\diff xy = \frac{1}{f’(x)}$ ((“That one you can just flip upside down, right?”)), so:

$\diffn 2xy = -\frac{f’‘(x)}{\left[ f’(x) \right]^3}$

As to *why* it should be thus… that, dear readers, I don’t know.