Skip to main content
Build your math mind

Integrals of absolute value functions

Integrals of absolute value functions

As we’ve seen, some integrals need to be divided into a few integrals if there are some discontinuities in the segment determined by the limits of integration. Sometimes, the functions are defined differently on different intervals, and the absolute value function is one of them.

Interesting, yes? Let’s take a closer look.

What is integral of absolute value function?

The integral of an absolute value function is an integral where the integrand is an absolute value function.

But what is an absolute value function? It’s pretty simple: An absolute value function is a function in which the variable is inside the absolute value bars.

As always, to find the integral, properties of integrals need to be used, so be sure to keep our favorite table handy!

Constant multiple property of integrals (c×f(x))dx=c×f(x)dx
Sum rule for integrals (f(x)+g(x))dx=f(x)dx+g(x)dx
Difference rule for integrals (f(x)g(x))dx=f(x)dxg(x)dx
Substitution rule f(φ(t))φ(t)dt=f(x)dx
Integration by parts udv=uvvdu

Why is the integral of absolute value function so useful?

We can use integrals to calculate the distance that someone has traveled. For example, someone is walking to break a new world record, and his velocity is described by the function f(x)=|x|, where x is the time in seconds. If his destination is placed at the origin, it would imply that he’s slowing down while approaching the place and speeding up while getting further away. If what we really want is the total distance that he’s traveled from place a to b, we can use the integral of an absolute value function!

How to solve integrals of absolute value functions?

Okay, let’s go through the solving method and walk through some example problems together!

Example 1


Find the integral:

|x|dx

Using the definition of an absolute value, let’s separate the integral into 2 possible cases:

xdx,x0

xdx,x<0

Use a×f(x)dx=a×f(x)dx for the second integral:

xdx,x0

xdx,x<0

Notice that we have same integral xdx, so solve this integral first.

xdx

Use xdx=x22 to evaluate the integral:

x22

Since the derivative of a constant is zero, we need to add the constant of integration C to include all possible anti-derivative functions in the result:

x22+C,CR

Substitute this result for integrals:

x22+C,CR,x0

x22+C,CR,x<0

Awesome! The evaluated integral is equal to:

x22+C,CR,x0
x22+C,CR,x<0

Example 2


Find the integral:

|x||x+1|dx

This one has two absolute values in the integrand! We still need to separate each absolute value into 2 possible cases, so let’s use the definition of absolute value and separate this integral into 4 possible cases:

x(x+1)dx,x0,x+10

x(x+1)dx,x<0,x+10

x((x+1))dx,x0,x+1<0

x((x+1))dx,x<0,x+1<0

Simplify the integrands:

1dx,x0,x+10

2x1dx,x<0,x+10

2x+1dx,x0,x+1<0

1dx,x<0,x+1<0

Notice that there is a system of inequalities for every integral. Let’s start with the first:

x0,x+10

Solve the second inequality for x:

x0,x1

Find the intersection:

x[0,+

Using the same procedure, find the other intervals and substitute them:

1dx,x[0,+

2x1dx,x[1,0

2x+1dx,

1dx,x,1

In the third case, x is in an empty set, so we can reject this case since there are no solutions.

1dx,x[0,+

2x1dx,x[1,0

1dx,x,1

Notice that in the first case, we can use adx=a×x to get the same integral as in the third case:

1dx,x[0,+

2x1dx,x[1,0

1dx,x,1

Now let’s find the integral 1dx:

1dx

Use adx=a×x to evaluate the integral:

x

Since the derivative of a constant is zero, we need to add the constant of integration C to include all possible anti-derivative functions in the result:

x+C,CR

Substitute x+C,CR for 1dx into the first and third cases:

x+C,CR,x[0,+

2x1dx,x[1,0

x+C,CR,x,1

Now let’s focus on our last one — the second case:

2x1dx,x[1,0

Use the property of integral f(x)±g(x)dx=f(x)dx±g(x)dx:

2xdx1dx

Use a×f(x)dx=a×f(x)dx:

2xdx1dx

Now, use xdx=x22 for the first integral and adx=a×x for the second integral:

2×x221×x

Simplify the expression:

x2x

Since the derivative of a constant is zero, we need to add the constant of integration C to include all possible anti-derivative functions in the result:

x2x+C,CR

Substitute x2x+C,CR for 2x1dx into the second case:

x+C,CR,x[0,+

x2x+C,CR,x[1,0

x+C,CR,x,1

So, the evaluated integral is equal to:

x+C,CR,x[0,+
x2x+C,CR,x[1,0
x+C,CR,x,1

Phew! Nice work.

Ready to try it on your own? Just remember these steps:

Study summary

  1. Use the absolute value definition to separate the integral into 2 possible cases.
  2. Evaluate each indefinite integral separately.

Do it yourself!

Try these practice problems to really get the hang of the method. If you get stuck, we can help!

Evaluate the integral:

  1. |x35x2+6x|dx
  2. |cos(x)|dx
  3. |1ex1|dx
  4. |log3(x1)|dx

Solutions:

  1. x445x33+3x2+C,CR,for x35x2+6x0  and  x44+5x333x2+C,CR,for x35x2+6x<0
  2. sin(x)+C,CR,forcos(x)0  and  sin(x)+C,CR,forcos(x)<0
  3. xex1+C,CR,for 1ex10  and x+ex1+C,CR,for 1ex1<0
  4. log3(x1)×(x1)x1ln3+C,CR,for log3(x1)0  and   log3(x1)×(x1)+x1ln3+C,CR,for log3(x1)<0

How’s it going? Do you need some help? Just scan the problem with your Photomath app and we’ll walk you through it!

Here’s a sneak peek of what you’ll see: