Chain rule question total differentiation Is this always true, no matter the definition of $f$?
$$\frac{d^2f}{db^2}=\frac{d^2f}{da^2}\frac{da^2}{db^2}$$
$f$ can be $f(g(h(b)),u(b))$, it doesn't matter and $f$ is obviously twice differentiable...
 A: No, this is false. Rather:
$$\dfrac{\mathrm{d}^2f}{\mathrm{d}b^2}=\dfrac{\mathrm{d}^2f}{\mathrm{d}a^2}\left(\dfrac{\mathrm{d}a}{\mathrm{d}b}\right)^2+\dfrac{\mathrm{d}f}{\mathrm{d}a}\dfrac{\mathrm{d}^2a}{\mathrm{d}b^2}.$$
Did you miss the product rule when differentiating a second time? besides, the term
$$\frac{\mathrm{d}a^2}{\mathrm{d}b^2}$$ you're writing has no meaning.

Look:
$$\frac{\mathrm{d}f}{\mathrm{d}b}=\frac{\mathrm{d}f}{\mathrm{d}a}\frac{\mathrm{d}a}{\mathrm{d}b}.$$
Then:
\begin{align*}
\frac{\mathrm{d}^2f}{\mathrm{d}b^2}
&=\frac{\mathrm{d}}{\mathrm{d}b}\left(\frac{\mathrm{d}f}{\mathrm{d}a}\frac{\mathrm{d}a}{\mathrm{d}b}\right)\\
&=\left(\frac{\mathrm{d}}{\mathrm{d}b}\frac{\mathrm{d}f}{\mathrm{d}a}\right)\frac{\mathrm{d}a}{\mathrm{d}b}+\frac{\mathrm{d}f}{\mathrm{d}a}\left(\frac{\mathrm{d}}{\mathrm{d}b}\frac{\mathrm{d}a}{\mathrm{d}b}\right)\quad\text{(product rule)}\\
&=\left(\frac{\mathrm{d}^2f}{\mathrm{d}a^2}\frac{\mathrm{d}a}{\mathrm{d}b}\right)\frac{\mathrm{d}a}{\mathrm{d}b}+\frac{\mathrm{d}f}{\mathrm{d}a}\frac{\mathrm{d}^2a}{\mathrm{d}b^2}\\
&=\dfrac{\mathrm{d}^2f}{\mathrm{d}a^2}\left(\dfrac{\mathrm{d}a}{\mathrm{d}b}\right)^2+\dfrac{\mathrm{d}f}{\mathrm{d}a}\dfrac{\mathrm{d}^2a}{\mathrm{d}b^2}.
\end{align*}


$f$ can be $f(g(h(b)),u(b))$, it doesn't matter.

Well, it does matter. This is only valid for a function $f$ of one variable.
