I had looked around on the web and can't find much information related to the integration of piecewise continuous functions.
Let's say we have a simple function
$$f(x)= \begin{cases} 0 & x\leq 0 \\ x & 0\leq x\leq 1 \\ 0 & x>1 \end{cases}$$
and we are looking to find the integral $\int f(x) dx$
WolframAlpha gives me the following result:
$$\int f(x) dx= \begin{cases} c & x\leq 0 \\ \frac{x^2}{2}+c & 0\leq x\leq 1 \\ \frac{1}{2}+c & x>1 \end{cases}$$
The cases $x\leq 0$ and $0\leq x\leq 1$ are clear. But why do we need the $\frac{1}{2}$ for the $x>1$ case? I see that this makes the integral continuous but is it necessary, i.e. is it wrong to have simply $c$ for the $x>1$ case for the integral?
The short answer is no. An indefinite integral is not a continuous function, because an indefinite integral is not a function. However, once you fix $a\in \mathbb{R}$, $$\int_a^x f(t)dt$$ is a continuous function. Note that once we fix $a$, the constant of integration is completely determined.