Let $X \sim \operatorname{Exp}(1)$, and show $Y = F_X(X)$ has uniform distribution on $[0,1]$.
I calculated $F_Y$, since the cumulative distribution function identifies a distribution. We have: \begin{align*} F_Y(y) &= P(Y \leq y) \\ &= P(1 - e^{-X} \leq y) \\ &= P(X \leq -\ln(1 - y)) \tag{for y < 1}\\ &= F_X(-\ln(1 - y)) \\ &= 1 - \exp(\ln(1 - y)) \\ &= y. \end{align*}
So I got $F_Y(y) = \boldsymbol{1}_{(-\infty, 1)}(y)$, but I should have gotten instead $F_Y(y) = \boldsymbol{1}_{[0, 1]}(y) + H(y - 1)$, which is completey different! So where did I go wrong?
Note: $H(x)$ is the Heaviside step function.
If $F$ is a CDF and it must be shown that $F$ is the CDF corresponding with the uniform distribution on $[0,1]$ then it is enough to prove that $F(y)=y$ for every $y\in(0,1)$.
This because the values of $F$ on elements not in $(0,1)$ are determined by the following rules for a CDF:
If $y\geq1$ then $1\geq F(y)\geq F(z)=z$ for every $z\in(0,1)$ and consequently $F(y)=1$.
If $y\leq0$ then $0\leq F(y)\leq F(z)=z$ for every $z\in(0,1)$ and consequently $F(y)=0$.
We make use of the facts that $0\leq F(y)\leq1$ must be true for any $y$, and $F$ is monotonically increasing.