Integration of piecewise function I was doing a question that involved integration of a piecewise function.

The question, as can be seen above, asks to evaluate the integral from 0 to pi. I worked it out by breaking the function into 2 integrals where the first had lower and upper limits of 0 and pi/2 respectively and adding it to the integral with lower and upper limits of pi/2 and pi respectively.
Now, my question is, how can we use FTC 2 on the first integral if it is not continuous over the domain [0, pi/2] as the pi/2 is not included in the sin (x).
I have tried my best to articulate my question but if there is any confusion, please do let me know.
Is there something I am missing? Can someone kindly clarify.
Thank you in advance.
 A: You can still evaluate the integrals individually and then add them together. There is a jump discontinuity at $\frac{\pi}{2}$ due to the interval given in the piecewise, but this point will not impact the sum. That is because the thickness of a single point is intuitively $0$.
Consider the point $c$ (Note: c is finite):
$\int_c^{c} f(x) dx= F(c)-F(c)=0$ by the FTC.
Additionally, note that the function is integrable from that interval.
$\int_0^{\pi/2} \sin(x) dx = [-\cos(x)]_0^{\pi/2} = 0-(-1) = 1$
A: First prove this, from the definition of the integral:


Prop. Suppose $p\in[a,b]$, and $f:[a,b]\to\Bbb R$ satisfies $f(x)=0$ for all $x\in[a,b]\setminus\{p\}$. Then $f$ is integrable on $[a,b]$ and $\int_a^bf=0$.


Hence, even though $f(x)-\sin(x)$ does not quite vanish at every point, it follows that $$\int_0^{\pi/2}(f(x)-\sin(x))\,dx=0,$$hence $$\int_0^{\pi/2}f(x)\,dx=\int_0^{\pi/2}\sin(x)\,dx.$$
(Technicality: Since $\sin(x)$ and $f(x)-\sin(x)$ are both integrable on $[0,\pi/2]$, so is $f$.
