Given $X$ continuous random variable $f(x) =$ \begin{cases} \frac{k^3}{2} x^2 e^{-kx}, & {x \geq 0 , k \gt 0} \\ 0, & { x \lt 0, k \gt 0} \end{cases}
For this function i need to calculate the cumultative distribution (i.e. $P(X \leq x$) ). I got this:
$F(x) =$ \begin{cases} 0, & {x \lt 0 , k \gt 0} \\ 1 - \frac{k^2x^2+2kx+2}{2} e^{-kx}, & { x \geq 0, k \gt 0} \end{cases}
But i can't obtain $F(x) = 1$, so where am I wrong?
You want to show your CDF $\to1$ as $x\to\infty$. This follows from the famous result $\lim_{x\to\infty}x^ne^{-kx}$ for $k>0$.
Incidentally, this is a Gamma distribution with $\alpha=3,\,\beta=k$. In fact, it's an Erlang distribution.