I found some derivatives and integrals involving the absolute value functions are expressable in terms of the absolute value functions, for examples:


$=\lim\limits_{\Delta x\to 0}\dfrac{|x+\Delta x|-|x|}{\Delta x}$

$=\lim\limits_{\Delta x\to 0}\dfrac{(|x+\Delta x|-|x|)(|x+\Delta x|+|x|)}{\Delta x(|x+\Delta x|+|x|)}$

$=\lim\limits_{\Delta x\to 0}\dfrac{|x+\Delta x|^2-|x|^2}{\Delta x(|x+\Delta x|+|x|)}$

$=\lim\limits_{\Delta x\to 0}\dfrac{(x+\Delta x)^2-x^2}{\Delta x(|x+\Delta x|+|x|)}$

$=\lim\limits_{\Delta x\to 0}\dfrac{x^2+2x\Delta x+(\Delta x)^2-x^2}{\Delta x(|x+\Delta x|+|x|)}$

$=\lim\limits_{\Delta x\to 0}\dfrac{2x+\Delta x}{|x+\Delta x|+|x|}$






$=x|x|-\int x~d(|x|)$

$=x|x|-\int x\times\dfrac{|x|}{x}dx$



Why does current mathematics education often not to teach like these?

  • $\begingroup$ For the derivatives case, there is the big issue that when students work with formulas they may lose sight of whether the derivative exists for all x in the domain. $\endgroup$ Commented Aug 24, 2014 at 12:20

5 Answers 5


I do not know the full reason why these are not taught, but one reason is that there are many ways to write your solutions. For example we also have:

$$\dfrac{d}{dx}|x| = \operatorname{sgn} (x) = \frac {1} {\operatorname{sgn} (x)}$$


$$\int|x|~dx = \frac {\operatorname{sgn} (x) \cdot x^2} 2$$

$\operatorname{sgn} (x)$ is the signum function: +1 for $x>0$, $-1$ for $x<0$. Usually, $\operatorname{sgn} (0)$ is $0$, but in the first solution in the first line above it would need to be undefined. (It could be zero or undefined in the second solution in the first line, since zero would make the expression undefined.)

Pesky little details like that make using the absolute value formulae somewhat problematic.

That said, I do give an exercise each year where I have my students come up with formulae for $\dfrac{d}{dx}|x|$ and $\int|x|~dx$. They rarely come up with proper ones, and I end by giving them the formulae that you proposed.


There is something really pretty about the formula $\int |x| dx = \frac{1}{2}x|x|+c$. It extends across $x=0$. This means we don't have to break into cases in an explicit calculation. For example, $$ \int_{-3}^2 |x| \, dx = \frac{1}{2}x|x|\bigg{|}^2_{-3} = \frac{1}{2}[4+3]= \frac{7}{2}.$$ This is half the computation in comparison to the technique which breaks into cases. Ok, admittedly, the $x=0$ bounds are fairly easy to calculate, but, still, I think this is interesting. Moreover, I am fairly sure I can use this observation to craft nasty problems which become far more difficult if one thinks in cases. To my taste, this formula is interesting precisely because it hides cases without bringing any new unknown functions into play.

For the derivative, I usually emphasize $|x| = \sqrt{x^2}$ for $x \neq 0$ so we can derive the derivative by chain-rule: $$ \frac{d}{dx} (|x|) = \frac{d}{dx}\sqrt{x^2} = \frac{1}{2\sqrt{x^2}}(2x) = \frac{x}{|x|}.$$ The function $f(x)=x|x|$ is interesting as it is an example of a once, but not twice, differentiable function. In fact, this function is usually mentioned in the study of the Wronskian as $\{ x^2, x|x| \}$ has a identically vanishing Wronskian on $\mathbb{R}$ yet $f(x)=x^2$ and $g(x)=x|x|$ are not linearly independent functions on $\mathbb{R}$.

In short, I think these are worth talking about and they're not that hard. So, if someone was deliberately avoiding them I would hope it was just a quirk of the textbook in play etc.

  • $\begingroup$ I'd prefer to teach calculations that arise in applications -- are there any applications (physics, economics, whatever) in which that integral would arise? $\endgroup$
    – user173
    Commented Aug 26, 2014 at 1:47
  • $\begingroup$ @Matt F. I suppose you might want to calculate the average of a triangular waveform over some duration. The $x/|x|$ is essentially a mathematical switch, it's not hard to build formulas for step-functions from it... I think step functions have applications to many real world applications. $\endgroup$ Commented Aug 26, 2014 at 3:43
  • $\begingroup$ Since $y=|x|$ describes only part of the triangular waveform, most averages would use some other formula, using cases. It is a good application, but maybe not for this function! $\endgroup$
    – user173
    Commented Aug 26, 2014 at 10:49
  • $\begingroup$ @MattF. but, we can develop facts about waveforms by just one "window" function so this simple function (or perhaps sums and products etc. of it) could be used. $\endgroup$ Commented Aug 26, 2014 at 12:33

The expressions in the question are good for minimizing the number of symbols. But:

$$|x|' = \begin{cases} +1, & \text{if $x>0$} \\ -1, & \text{if $x<0$} \\ \end{cases}; \ \ \ \int_0^a|x|\,dx = \begin{cases} \ \ \ a^2\,/\,2, & \text{if $a\geqslant 0$} \\ -a^2\,/\,2, & \text{if $a<0$} \\ \end{cases}$$

have the pedagogical advantages of being easier to read and quicker to understand.

  • $\begingroup$ You left out the case $a=0$ in the integral. It might be simplest to add it to the case $a \gt 0$. $\endgroup$ Commented Aug 25, 2014 at 0:21

I personally prefer writing $|x|$ as $\sqrt{x^2}$ and then using the chain rule:

$\dfrac{d}{dx} |x|$ = $\dfrac{d}{dx} \sqrt{x^2}$

$= \frac12(x^2)^{-1/2}\cdot 2x$

$ = \frac{x}{\sqrt{x^2}}$

$ = \frac{x}{|x|}$


It's just a matter of priorities. First, many or most of the students are only taking calculus as a filter/weeder course (certainly in the U.S.), so the specific content doesn't matter _at_all_. Second, even if a student will be using some elementary mathematics (basic calculus) later, it is my impression/experience that mostly the questions of such integrals and derivatives will not arise immediately.

In more substantive situations (some parts of physics, some parts of mathematical analysis) where such a question would be "live", there would be a very pointed need to address very-nearby questions about "generalized functions", such as Dirac's delta and its derivatives... which naturally arise in such context, ... unless one artificially constrains the situation to a point of uselessness and dysfunction. That is, at the point that one choose to go down that road, there is much more that immediately merits attention... which is not part of the traditional Calc I syllabus in the U.S. ... for better or worse.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.