Integrals of functions defined by parts

When the function to be integrated is not continuous, but bounded, we will separate the integration interval using the additive property at the points where the function is not continuous.

$$\displaystyle \int_0^5 f(x) \ dx$$ , where $$f(x) =\left\{ \begin{array} {rcl} x+1 & \mbox{if} & x < 3 \\ 7x^2-5 & \mbox{if} & x \geqslant 3 \end{array}\right.$$

(This function is not continuous in $$x=3$$)

$$\displaystyle \int_0 ^5 f(x) \ dx = \int_0^3 f(x) \ dx + \int_3^5 f(x) \ dx =\int_0^3 x+1 \ dx + \int_3^5 7x^2-5 \ dx =$$

$$=\displaystyle \Big[ \frac{x^2}{2}+x\Big]_0^3+\Big[\frac{7x^3}{3}-5x \Big]_3^5=\frac{1745}{6}$$