Home » Blog » Find the integral of the absolute value function

Find the integral of the absolute value function

Show that

    \[ \int_0^x |t| \, dt = \frac{1}{2} x |x| \]

for all x \in \mathbb{R}.


Proof. We consider three cases.
Case #1: If x = 0, then both sides of the equation are 0, so the equation holds.
Case #2: If x > 0, then |t| = t for all t \in [0,x] so,

    \[ \int_0^x |t| \, dt = \int_0^x t \, dt = \frac{1}{2}x^2 = \frac{1}{2}x |x|. \]

The last equality follows since x > 0 implies x = |x|.
Case #3: If x < 0, then |t| = -t for all \in [x,0] so,

    \begin{align*}   \int_0^x |t| \, dt &= - \int_0^x t \, dt \\  &= \int_x^0 t \, dt \\  &= \left. \frac{1}{2}t^2 \right|_x^0 \\  &= -\frac{1}{2}x^2 \\  &= \frac{1}{2} x |x|. \end{align*}

The final line follows since |x| = -x since x < 0. \qquad \blacksquare

One comment

  1. Anonymous says:

    You can use second FTC to show that the integral is in terms of primitives P(x) – P(0) and then show DP(x) = |x| to prove that it is a primitive.

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):