Let Say, $G \left(x \right)$ is the Cumulative distribution function of a random variable $X$ which is continuous, now consider below integral
$\int_{0}^{\alpha} 1 \left(G \leq u \right)du$, where $1 \left( x \right)$ is equal to 1 if $x$ is true and 0 otherwise.
The answer I obtain for above integration is $\left( \alpha -G \right) 1 \left( G \leq \alpha\right)$.
How can I obtain this answer using fundamentals of integration?
Within the integral, $0 \leq u \leq \alpha$. Suppose $\alpha < G$. Then $u < G$ throughout the integral, and so $1 \left(G \leq u \right) = 0$ throughout. The integral then evaluates to $0$.
If $\alpha > G$, and since $G$ must be $\geq 0$, then $0 \leq G < \alpha$. So $1 \left(G \leq u \right) = 0$ for $0 \leq u < G$, and $1 \left(G \leq u \right) = 1$ for $G \leq u \leq \alpha$. The integral then evaluates to $\alpha -G$.
The $\alpha = G$ case is similar to the $\alpha < G$, since the integral is non-zero only at a single (finite number) point, and so the integral is still $0$.
$\left( \alpha -G \right) 1 \left( G \leq \alpha\right)$ then represents the three cases through a single expression.