How can you find the antiderivative of absolute value of $x$

absolute valueintegration

In high school calculus, I am in the unit on antidifferentiation and its applications. One of its applications is finding distances with a velocity function. You can use this to find both net distance and total distance. To find the total distance, you take the integral of the absolute value of velocity like this: $\int |v(t)|dt$. This is possible by taking the derivative of $v(t)$ and solving for $0$ in order to find when $v(t)$ is negative. My question though, is can you solve this as one equation — $\int|v(t)|dt$. Here is my work showing my original thought process which failed:
$v(t)=3t^2+6t-9$. Then the total distance can be represented by $\int_a^b|v(t)|dt$ where $a$ is $t_1$ and $b$ is $t_2$. In order to solve this, you will need the antiderivative of $v(t)$ which I will call $V(t)$. Then, by FTC, this becomes $V(b)- V(a)$. So in order to get $V(t)$, I started by doing u-sub making $u = 3t^2+6t-9$. The integral becomes $\int|u|dt$. In order to get $du$, I solved for $t$ getting $t=\frac{\pm\sqrt{3(u+12)}+3}{3}$. Then, $dt = \pm\frac{1}{2}(3u+36)^{-1/2}du$. Substituting $dt$ for $du$, I get $\pm\frac{1}{2}\int(3u+36)^{-1/2}|u|du$. I then tried to integrate by parts making $f(u) = (3u+36)^{-1/2}$, $g(u)=\int|u|du$ which I thought was $u^2$, then $f'(u) = (-3/2)(3u+36)^{-3/2}$ and $g'(u) = |u|$. This is where I know now that I went wrong. $\int|u|du \neq u^2$. I found this out the hard way by continuing with my working out and then finally getting an answer for $\left.V(t)\right\rvert_a^b$ that completely failed to match up with the easy way of doing this. Is it even possible to do what I am trying to do here? If so, could anybody point me in the right direction? Keep in mind, I am only in high school calculus and as a side note, if you use the integration function on Desmos, it plots the right graph which I checked by testing it with two numbers and FTC.

Best Answer

There exists an explicit formula for the antiderivative of function $f$ defined by $f(x)=|x|$ which is

$$F(x)=\tfrac12 x |x| +k$$

enter image description here

Indeed

  • for $x \ge 0, |x|=x \implies F(x)=\tfrac12 x^2 +k \implies F'(x)=x=f(x)$

  • for $x \le 0, |x|=-x \implies F(x)=-\tfrac12 x^2 + k \implies F'(x)=-x = f(x)$

Related Question