If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: AP®︎/College Calculus AB>Unit 6

Lesson 10: Finding antiderivatives and indefinite integrals: basic rules and notation: definite integrals

# Definite integral of absolute value function

Sal evaluates the definite integral of f(x)=|x+2| between -4 and 0.

## Want to join the conversation?

• Can't I just calculate the integral of x+2 and then take the absolute value of the result?
• The problem you run into when you take the absolute value of final result is that you are still getting different values before you calculate the end result.

You can evaluate this yourself by taking the definite integral from
``[-2, 2]``
of
``(x+2) dx``
and you will see that your end result (whether or not you take the absolute value of it) will give you
``8``
for the area. This makes sense because the x-intercept of
``x+2``
is
``-2``
, and then it ascends linearly with a slope of
``1``
.

Basically you're not evaluating the absolute value of the area of the function you're integrating, you're trying to find the area of the absolute value function.

In summary, taking the absolute value of the definite integral is not a helpful way of evaluating this type of problem. The only way I can think of it to be useful in applied math is if you were trying to get the magnitude of the area of a graph, which may be useful in some cases.
• The piecewise function we get as the anti-derivative here is something like { -(x^2)/2 -2x if x <= -2; (x^2)/2 + 2x if x > -2 }. Does anyone have an explanation/intuition for why you can take the antiderivative of something and get a function that's not differentiable or continuous? It seems like it works and makes sense graphically (from the video), But it feels unintuitive that we can take the antiderivative and end up with something that we can't then take the derivative of.
• We can't take an antiderivative and get something nondifferentiable. So this tells you that the antiderivative you found is incorrect.

You didn't include the +C when you took the antiderivatives of the piecewise function. Because we know the function is continuous and differentiable, we can use this to constrain the possible values of these constants.

If we plug x=-2 into the antiderivative pieces, we get 2+C₁ and -2+C₂, for some constants C₁, C₂. We want these to be equal (since we want the pieces of the function to agree at -2), so setting them equal tells us C₂=C₁+4.

So your pieces should be -x²/2 -2x+C and x²/2 +2x+C+4.
• why not rewrite the expression as √((x+2)^2)?
• Is there any way to take the integral of an absolute value expression without turning it into a piecewise function?
(1 vote)
• The absolute value function is a piecewise function. You can only avoid this if the argument is strictly positive or strictly negative.
• Hi, does it matter if we set the intervals of the piecewise function as
-(x+2) for x = less than or equal to -2 and x+2 for x = greater than -2? or do the intervals have to be specifically set the way that Sal wrote it?
• The anti-derivative for when x<-2 is [-(x^2)/2-2x], did I make a mistake or is it correct that this function can yield a negative value at certain intervals (as x^2 is always positive, -x^2 is always negative and it's value exponentially becomes more and more negative as compared to 2x which only increases linearly)?
How can a negative net area possibly be correct when the whole of the function is above the x-axis?
If my interpretation is wrong, then where does my intuition break down?
• I think you should try graphing this function again because it is definitely not entirely above the x-axis. However, you are correct in that net area cannot be negative if a function is always positive.
(1 vote)
• why cant we just find the integral of x+2 and then double it? because the "area" will be the same since it is symmetric, right?