Suppose you want to compute the integral

where

and

. Recall the definition of the absolute value function:

What this means is that the function has a different meaning depending on the domain from which

is picked (the two domains being non-negative and negative real numbers). For non-negative numbers

, you have

exactly, while if

is negative, you have

exactly.
Choosing between

and

is then determined by the "turning point"

. Because the function behaves differently at values to either side of this point, you essentially have two different integrands to consider.
So, to compute the integral above, you would split the interval of integration at

and use the appropriate definition for

.

which comes from the linearity property of definite integrals, and the fact that the interval

contains only negative numbers, while
![(0,b]](https://img.qammunity.org/2018/formulas/mathematics/college/14cfifp018zi0g69gjqii72p4c02tcc2d4.png)
contains only positive numbers.
Then, carry on with the integration:

Edit: The key here is that

is a piecewise function, i.e. a function that basically takes on the role of potentially completely different functions. In the case of

, there are two possible equivalences,

and

.
Splitting up the domain of integration is a requirement for computing integrals of piecewise functions. Take for another example the function

and let's say we want to compute the integral

How is this done? Well, you have to split up the domain of integration because

doesn't have the same meaning everywhere in its domain:



