In calculus, integration is a fundamental tool used to directly find areas under curves in the xy plane, but also can be applied to solve many other real world problems. The basic rules of integration are easy to remember and straightforward, but they can only be applied to certain kinds of integrands, leaving some problems only solvable by using integration tables.
One of these groups of functions that one is not taught how to integrate in an entry level calculus class is absolute value functions. The reason for this is that absolute value functions are a type of piecewise function, and that means that nearly all functions containing an absolute value operator have a sharp turn in their domain. It is taught to calculus students that functions with sharp turns are not differentiable, but the distinction is often missed that functions with sharp turns, as long as they are continuous, are in fact integrable. Since absolute value functions always make their sharp turn at f(x) = 0, where f(x) is the function contained by the absolute value operator, they are always continuous over their domain because lim x→f-1(0)+ (g(x)) = lim x→f-1(0)– (g(x)), where g(x) is the complete function.
So, we can integrate absolute value functions using a creative technique. The method is to integrate the independent piecewise components of a whole function and rewrite the respective results as its own whole piecewise absolute value function. The following are two general forms that can be applied to most cases of these functions.
∫|f(x)|dx = {∫f(x)dx ∀f(x)≥0 | ∫-f(x)dx ∀f(x)<0} = {F(x) ∀f(x)≥0 | -F(x) ∀f(x)<0} = (|f(x)|/f(x))F(x) + C
∫f(|x|)dx = {∫f(x)dx ∀x≥0 | ∫f(-x)dx ∀x<0} = {F(x) ∀x≥0 | -F(-x) ∀x<0} = (|x|/x)F(|x|) + C