# Extreme of an implicit expression

I'm missing a math skill. Obtaining this implicit expression:

$h - \frac{g}{2 u^2} sec(\alpha)^2 d^2 + tan(\alpha) d = 0$

I don't know how to elegantly find $\alpha$ for which $d$ is extreme. It depends on the parameter $h$, too, so if I simply differentiate on $\alpha$ that obviously isn't right. The contour plots look like this:

I though it should be possible to directly differentiate the implicit expression somehow. But how does one do that? The way I'm solving it now is I first solve the expression for $d$, then differentiate on $\alpha$ and after a bit of laborious algebra come to a relatively elegant solution expression.

Why does differentiating the explicit expression for $d$ on $\alpha$ works -- but doing the same on the implicit expression doesn't?