$f(x) = \begin{cases} 1& \text{ if } -1\leq x < 0 \\ 1/2 & \text{ if } x = 0 \\ x& \text{ if } 0 < x \leq 1 \end{cases} \text{for the interval} [-1,1]$
So I understand that you suppose to calculate the integral for every region but here at x = 0 function is 1/2. So should I add the f(0) value? For example for calculating $a_0$
$a_0 =\int_{-1}^{0}1dx +\int_{0}^{1}xdx$
or should i add f(0) value
$a_0 =\int_{-1}^{0}1dx +\int_{0}^{1}xdx + f(0)$