Set the function inside the absolute value signs to zero and solve for the variable. If the function is x^ - 4, for example, x^2 - 4 = 0. Subtract -4 from both sides to get x^2 = 4. The square root of 4 can be 2 or -2, so the zeros of the function are x = 2, -2.
Divide the function into regions based on the zeros. If the zeros are x = 2, -2, the regions of the function are x <= -2, -2 < x < 2 and x >= 2.
Choose a point in each region and plug it into the function to determine whether the function is positive or negative in that region. For example, choose x = -3, x = 0 and x = 3. To continue: x^2 - 4 = 5 for both x = -3 and x = 3, so the function is positive in the regions x < = -2 and x > = 2. Finally, x^2 - 4 = -4 for x = 0, so the function is negative in the region -2 < x <2.
Write two new integrals, one for the positive region and one for the negative region of the function. In the positive region, the modulus of the function is equal to the function. In the negative region, the modulus of the function is equal to the negative of the function. If the original integral was int(|x^2 - 4|dx), the new integrals are int[(x^2 - 4)dx] for x < = -2 and x > = 2 and int[(-x^2 + 4)dx] for -2 < x < 2.
Evaluate each integral and indicate the appropriate regions for each result in the answer. For example, int[(x^2 - 4)dx] = x^3/3 - 4x + c and int[(-x^2 + 4)dx] = -x^3/3 + 4x + c, so the solution to int(|x^2 - 4|dx) is x^3/3 - 4x + c for x < = -2 and x > = 2 and -x^3/3 + 4x + c for -2 < x < 2.
Split the interval of integration, according to the negative and positive regions of the function, to evaluate a definite integral. To evaluate int(|x^2 - 4|dx) over the region -4 to 4, for example, evaluate x^3/3 - 4x for -4 to -2 and 2 to 4, and -x^3/3 + 4x for -2 to 2. Evaluate each region separately and add them together to get the result: [((-2)^3/3 - 4(-2)) - ((-4)^3/3 - 4(-4))] + [(-2^3/3 + 4*2) - (-(-2)^3/3 + 4(-2))] + [(4^3/3 - 4*4) - (2^3/3 - 4*2)] = [16/3 - (-16/3)] + [16/3 - (-16/3)] + [16/3 - (-16/3)] = 32.