How do I evaluate int_0^5|x-5|dx by interpreting it in terms of areas?

Jan 26, 2015

$| x - 5 |$ equals $x - 5$ if $x - 5 > 0$ (i.e. $x > 5$), and $5 - x$ otherwise (i.e. $x < 5$).

Both equations $x - 5$ and $5 - x$ are lines, so the graph of your absolute value will be shaped like a V:
graph{|x-5| [-5.37, 14.63, -1, 9]}
As you can see, before the abscissa 5 (i.e., $x < 5$) you have a line with a negative slope, which is $5 - x$, and after that critical value you have a positive-sloped line, which is $x - 5$.

If you want to integrate the function over the interval $\left[0 , 5\right]$, you need to (as you said) calculate the area under the graph in said interval.

If you say "by interpreting it in terms of areas", I assume that you don't want the explicit calculation of the integral. If so, it should be clear from the figure that the area you're looking for is the one of the triangle with vertices $\left(0 , 0\right)$, $\left(5 , 0\right)$ and $\left(0 , 5\right)$.

It is a right triangle with both catheti long 5, and so you can easily find the area, which is $\frac{25}{2}$

If my supposition was wrong, and you actually need the integral to be done, here are the steps:

First of all, remark that in your range of integration (i.e. the interval $\left[0 , 5\right]$) $| x - 5 | = - x + 5$, and so you can substitute the integrand. Then, you have that the integral of a sum is the sum of the integrals, and so you have

\int_0^5 -x+5 dx = -\int_0^5 x dx + \int_0^5 5 = (-\frac{x^2}{2}+ 5x)|_0^5 = -\frac{25}{2}+25=\frac{25}{2}