So I have this PDF: $$ f(x)= \begin{cases} x + 3 & \text{ for } -3 \leq x < -2\\ 3 - x & \text{ for } 2 \leq x < 3\\ 0 & \text{ otherwise} \end{cases} $$
To make this a CDF, I have integrated the PDF from $-\infty$ to some value, $x$.
$$ F(x)= \begin{cases} \frac{x^2}{2} + 3x + \frac{9}{2} & \text{ for } -3 \leq x <-2\\ \frac{1}{2} & \text{ for } -2 \leq x<2\\ \frac{-x^2}{2} + 3x + \frac{7}{2} & \text{ for } 2 \leq x<3 \end{cases} $$
My friend argues that the first term in this CDF which is $(x^2/2 + 3x + 9/2)$ should actually be $(x^2/2 + 3x)$. But isn't this impossible? At $x = -3$, the CDF must be $0$, am I correct?. This is only true in the case where the first term is $(x^2/2 + 3x + 9/2)$.
If someone could shed light on this topic, that would be much appreciated.
$ f(x) = \begin{cases} 0 &, \phantom{-3 \leq {}}x< -3 \\ x+3 &, -3 \leq x \leq -2 \\ 0 &, -2 \leq x \leq \phantom{-{}}2 \\ 3-x &, \phantom{-{}}2 \leq x \leq \phantom{-{}}3 \\ 0 &, \phantom{-{}}3 \leq x\end{cases}$
\begin{align} F(x) = \int_{-\infty}^x f(t) \,\mathrm{d}t &= \begin{cases} 0 &, \phantom{-3 \leq {}}x< -3 \\ 0+\int_{-3}^x t+3 \,\mathrm{d}t &, -3 \leq x \leq -2 \\ 0+\int_{-3}^{-2} t+3 \,\mathrm{d}t + 0&, -2 \leq x \leq \phantom{-{}}2 \\ 0+\int_{-3}^{-2} t+3 \,\mathrm{d}t + \int_{2}^x 3-t \,\mathrm{d}t&, \phantom{-{}}2 \leq x \leq \phantom{-{}}3 \\ 0+\int_{-3}^{-2} t+3 \,\mathrm{d}t + \int_{2}^3 3-t \,\mathrm{d}t + 0 &, \phantom{-{}}3 \leq x\end{cases} \\ &= \begin{cases} 0 &, \phantom{-3 \leq {}}x< -3 \\ 0+\frac{x^2+6x+9}{2} &, -3 \leq x \leq -2 \\ 0+\frac{1}{2} &, -2 \leq x \leq \phantom{-{}}2 \\ 0+\frac{1}{2} + \frac{-x^2+6x-8}{2}&, \phantom{-{}}2 \leq x \leq \phantom{-{}}3 \\ 0+\frac{1}{2} + \frac{1}{2} + 0 &, \phantom{-{}}3 \leq x\end{cases} \end{align}
As you can see $F(-3) = 0$ because $\frac{9-18+9}{2} = 0$. Your argument is correct that the CDF must increase from zero (starting) at $-3$.