## A calculus exercise from a probability distribution

Several calculus exercises that are derived from a probability problem are presented here.

Let $\alpha>0$ be a constant.

Evaluate $\displaystyle \int_0^1 (1-e^{-\alpha z}) \ dz + \int_1^{\infty}(e^\alpha-1) e^{-\alpha z} \ dz$.

Evaluate $\displaystyle \int_0^1 z \ (1-e^{-\alpha z}) \ dz + \int_1^{\infty} z \ (e^\alpha-1) e^{-\alpha z} \ dz$.

Evaluate $\displaystyle \int_0^1 z^2 \ (1-e^{-\alpha z}) \ dz + \int_1^{\infty} z^2 \ (e^\alpha-1) e^{-\alpha z} \ dz$.

Background
For anyone who is interested in the origin of these integrals, the first exercise is to verify that the following function is a probability density function (pdf). The second and the third exercises are to find the first and second moment of this probability distribution.

$\displaystyle f_Z(z)=\left\{\begin{matrix} \displaystyle 1-e^{-\alpha z}&\ \ \ \ \ \ 0 \le z <1 \\{\text{ }}& \\{\text{ }}& \\{\displaystyle e^{-\alpha z}(e^\alpha-1)}&\ \ \ \ \ \ 1 \le z <\infty \end{matrix}\right.$

The above pdf $f_Z(z)$ is the independent sum of an exponential distribution and the uniform distribution $U(0,1)$. So the answers of the integrals can be derived from knowing these probability distributions. Otherwise, they are excellent exercises in calculus.

$\displaystyle \int_0^1 (1-e^{-\alpha z}) \ dz + \int_1^{\infty}(e^\alpha-1) e^{-\alpha z} \ dz=1$.

$\displaystyle \int_0^1 z \ (1-e^{-\alpha z}) \ dz + \int_1^{\infty} z \ (e^\alpha-1) e^{-\alpha z} \ dz=\frac{1}{2}+\frac{1}{\alpha}$.

$\displaystyle \int_0^1 z^2 \ (1-e^{-\alpha z}) \ dz + \int_1^{\infty} z^2 \ (e^\alpha-1) e^{-\alpha z} \ dz=\frac{1}{3}+\frac{1}{\alpha}+\frac{2}{\alpha^2}$.