The PDF of a random variable $X$ is:
$f(x) = \begin{cases} 0 , x<2 \ \text{or} \ x >4 \\ a(x-2)(4-x), 2 \leq x \leq 4 \end{cases} $
Find $a$ and $F_X (x)$.
My attempt: By taking $\int_{2}^{4} f_X (x) = 1$, I worked out $a = \frac{3}{4}$. Then
$F_x (x) = \begin{cases} 0 , x<2 \ \text{or} \ x >4 \\ - \frac{x^3}{4} + \frac{9}{4}x^2 - 6x, 2 \leq x \leq 4 \\ 1, x >4 \end{cases} $
But the solution in my book is:
$F_x (x) = \begin{cases} 0 , x<2 \ \text{or} \ x >4 \\ - \frac{x^3}{4} + \frac{9}{4}x^2 - 6x + \textbf{5}, 2 \leq x \leq 4 \\ 1, x >4 \end{cases} $
I don't know where $\textbf{5}$ comes from. I suspect it's from the $C$ when we take the anti-derivative of $f(x)$ but I couldn't figure out how to calculate it.