Let have for example $$f(x) = \frac{\sin^2 x}{1- \cos x}$$ And let say that we want calculate: $$ \int_{-\pi/2}^{\pi/2} f(x) \, dx $$
After transform: $$f(x) = \frac{\sin^2 x}{1- \cos x} = 1 + \cos x$$ so $$ \int_{-\pi/2}^{\pi/2} f(x) \, dx = x + \sin x + C := F(x)$$ But $f$ was not defined on $x = 0$. So if we interpret this integral as space under graph then we have hole at $x=0$. I know that $$\int_{-\pi/2}^{\pi/2} f(x) = F(\pi/2) - F(-\pi/2) $$ but why we can ignore lack of domain at $x=0$?