While doing optimisation problems with calculus I often find myself needing to optimise expressions such as $$\sqrt{\sin x}$$, though often more complicated. Using the chain rule on the square root is time-consuming, and it seems logical that as a monotonically increasing function, the square root shouldn't affect the x-coordinate of the local minima and maxima. Thus, I give you…

## Theorem

If $$g(f(x))$$ is a composite function, and $$g$$ is a monotonic function, and is differentiable $$g$$ in some domain;
Then the x-coordinates of the local minima and maxima of $$g(f(x))$$ in that domain are the same as the those of $$f(x)$$.

## Proof

Using the chain rule to find the derivative of $$g(f(x))$$ with respect to $$x$$:
\begin{aligned} \frac{\mathrm{d}g}{\mathrm{d}x} &= \frac{\mathrm{d}g}{\mathrm{d}f} \cdot \frac{\mathrm{d}f}{\mathrm{d}x} \end{aligned}
By Fermat's theorem, each local minimum and maximum of $$g(f(x))$$ must be at a critical point $$x_{\text{critical}}$$; where $$\frac{\mathrm{d}g}{\mathrm{d}x}$$ is equal to 0 or undefined:
\begin{aligned} \left(\frac{\mathrm{d}g}{\mathrm{d}x}\right)_{x = x_{\text{critical}}} &= 0\text{ or undefined} \\ \left(\frac{\mathrm{d}g}{\mathrm{d}f}\right)_{x = x_{\text{critical}}} \cdot \left(\frac{\mathrm{d}f}{\mathrm{d}x}\right)_{x = x_{\text{critical}}} &= 0\text{ or undefined} \end{aligned}
By the zero-product property (null factor law),
\begin{aligned} \left(\frac{\mathrm{d}g}{\mathrm{d}f}\right)_{x = x_{\text{critical}}} &= 0\text{ or undefined} \\ &\text{and/or} \\ \left(\frac{\mathrm{d}f}{\mathrm{d}x}\right)_{x = x_{\text{critical}}} &= 0\text{ or undefined} \end{aligned}
Since $$g$$ is a monotonic function, $$\frac{\mathrm{d}g}{\mathrm{d}f}$$ is never equal to 0. Additionally, since the derivative of $$g$$ is always defined in the relevant domain, $$\frac{\mathrm{d}g}{\mathrm{d}f}$$ is never undefined.
Therefore,
\begin{aligned} \left(\frac{\mathrm{d}f}{\mathrm{d}x}\right)_{x = x_{\text{critical}}} &= 0\text{ or undefined} \end{aligned}
Therefore, each critical point on $$g(f(x))$$ is at the same x-coordinate as that on $$f(x)$$, and by extension, each local minimum and maximum of $$g(f(x))$$ is at the same x-coordinate as that of $$f(x)$$.

Q.E.D.

## Disclaimer

I am not a mathematician. As far as I can tell, the above is not any ‘official’ theorem. There are probably some small errors in terminology and corner cases that I forgot to account for. Exercise common sense when applying the above.