Calculate the integral from zero to four of two plus the absolute value of 𝑥 minus one with respect to 𝑥.
Now we can see that the integrand here involves an absolute value or modulus function. And you may be thinking, “Well, how do I integrate such a function?” What we’re going to do is to try and write this as a piecewise function instead of a function involving the absolute value. We’ll define the entire integrand to be 𝑓 of 𝑥. And what we’re going to do is think about intervals over which 𝑥 minus one — that’s the part inside the absolute value function — is positive or negative.
The point at which this function 𝑥 minus one changes from negative to positive is when 𝑥 minus one is equal to zero which is when 𝑥 is equal to one. So the two intervals we will consider are 𝑥 is greater than one and 𝑥 is less than one. When 𝑥 is greater than or equal to one, 𝑥 minus one is greater than or equal to zero; it’s positive or zero. And so, the absolute value of 𝑥 minus one is just 𝑥 minus one itself. However, when 𝑥 is less than one, 𝑥 minus one is negative. And so, the absolute value of 𝑥 minus one will be the negative of 𝑥 minus one.
We, therefore, defined 𝑓 of 𝑥 as a piecewise function as two plus 𝑥 minus one for 𝑥 greater than or equal to one and two plus negative 𝑥 minus one for 𝑥 less than one. This simplifies to one plus 𝑥 for 𝑥 greater than or equal to one and three minus 𝑥 for 𝑥 less than one. We can also consider what the graph of 𝑓 of 𝑥 will look like.
The graph of the absolute value of 𝑥 is shown in orange and our function will be a translation of the absolute value of 𝑥 one unit in the positive 𝑥-direction and two units in the positive 𝑦-direction. That’s the graph shown in blue. We can see that the area below this graph between zero and four which is what’s defined by the integral we’ve been asked to calculate will be made up of two areas: the area below the graph between zero and one and the area between one and four.
We’ll, therefore, be able to split this integral of the absolute value function into the sum of two integrals of our piecewise function: an integral with limits of zero and one and an integral with limits of one and four. We have then that this integral is equal to the integral from zero to one of three minus 𝑥 with respect to 𝑥 plus the integral from one to four of one plus 𝑥 with respect to 𝑥. We’ve split the area up into two separate areas. And in each case, we’re integrating the piecewise function in that interval.
Now, we can perform an integration, remembering that when we integrate powers of 𝑥, we increase the power by one and then divide by it provided the power is not equal to negative one. Our first integral will therefore be equal to three 𝑥 minus 𝑥 squared over two with lower limit of zero and an upper limit of one. Our second integral will be equal to 𝑥 plus 𝑥 squared over two with a lower limit of one and an upper limit of four. Remember we don’t need a constant of integration as these are definite integrals.
We now substitute the limits into our first integral, giving three multiplied by one minus one squared over two minus three multiplied by zero minus zero squared over two. That’s just three minus a half which is equal to two and a half. For our second integral, we have four plus four squared over two minus one plus one squared over two. That’s four plus eight minus one minus a half which is equal to 10 and a half. Adding the two evaluated integrals together gives two and a half plus 10 and a half which is equal to 13.
So by splitting this absolute value function up into a piecewise function, we’ve found that the integral from zero to four of two plus the absolute value of 𝑥 minus one with respect to 𝑥 is equal to 13.