[proofplan]
We derive the density of $Y = h(X)$ by differentiating the cdf. We compute $F_Y(y) = \mathbb{P}(h(X) \le y)$, handling the two cases (increasing and decreasing $h$) separately, and differentiate using the chain rule. The absolute value of $(h^{-1})'(y)$ unifies both cases.
[/proofplan]
[step:Compute the cdf of $Y = h(X)$ in both the increasing and decreasing cases]
**Case 1: $h$ is strictly increasing.** Since $h$ is strictly increasing with inverse $h^{-1}$, the inequality $h(X) \le y$ is equivalent to $X \le h^{-1}(y)$ for $y \in \operatorname{Im}(h)$. Therefore
\begin{align*}
F_Y(y) = \mathbb{P}(Y \le y) = \mathbb{P}(X \le h^{-1}(y)) = F_X(h^{-1}(y)).
\end{align*}
**Case 2: $h$ is strictly decreasing.** The inequality $h(X) \le y$ reverses to $X \ge h^{-1}(y)$, giving
\begin{align*}
F_Y(y) = \mathbb{P}(X \ge h^{-1}(y)) = 1 - F_X(h^{-1}(y)).
\end{align*}
[/step]
[step:Differentiate the cdf using the chain rule to obtain the pdf]
**Case 1 ($h$ increasing).** Since $h^{-1}$ is differentiable (by the inverse function theorem, as $h'$ is non-vanishing), we differentiate $F_Y(y) = F_X(h^{-1}(y))$ using the chain rule:
\begin{align*}
f_Y(y) = F_Y'(y) = f_X(h^{-1}(y)) \cdot \frac{d}{dy} h^{-1}(y).
\end{align*}
When $h$ is increasing, $h^{-1}$ is also increasing, so $\frac{d}{dy} h^{-1}(y) > 0$ and the absolute value is unnecessary.
**Case 2 ($h$ decreasing).** Differentiating $F_Y(y) = 1 - F_X(h^{-1}(y))$,
\begin{align*}
f_Y(y) = -f_X(h^{-1}(y)) \cdot \frac{d}{dy} h^{-1}(y).
\end{align*}
When $h$ is decreasing, $h^{-1}$ is also decreasing, so $\frac{d}{dy} h^{-1}(y) < 0$ and the negative sign makes $f_Y(y) > 0$.
[/step]
[step:Unify the two cases using the absolute value]
In both cases, the density of $Y$ is
\begin{align*}
f_Y(y) = f_X(h^{-1}(y)) \left|\frac{d}{dy} h^{-1}(y)\right|.
\end{align*}
When $h$ is increasing, the absolute value has no effect (the derivative is positive). When $h$ is decreasing, the absolute value absorbs the negative sign from the chain rule and the negative sign from differentiating $1 - F_X$.
[/step]