What are some examples of subadditive functions such that the absolute value is not subadditive?

1.4k Views Asked by At

Can we find some nice examples of functions $f\colon \mathbb R\to\mathbb R$ such that $f$ is subbaditive, i.e., $$f(a+b)\le f(a)+f(b)$$ but $|f|$ does not have this property?

Feel free to interpret the word nice in any reasonable way. (Defined in a simple way, having some additional properties, being easily generalizable, covering large class of functions, etc.)

Also if you can think of some restrictions which every such function has to fulfill, that would be interesting, too. (What I mean something like: "It is impossible to get a differentiable function with these properties.")

One example of such function is $f(x)=\left\lceil\frac{x}2\right\rceil$. See The inequality $\left\lceil\frac{a_1+\dots+a_k}k\right\rceil\le\left\lceil\frac{a_1}k\right\rceil+\dots+\left\lceil\frac{a_k}k\right\rceil$ for a proof of subadditivity. However, the subadditivity fails for $|f|$ since $|f(-2)|=1$ and $|f(-1)|=0$.

This question came quite naturally from: If a function $d(x,y)$ fulfills triangle inequality, is the same true for $|d(x,y)|$? (As you can see from an answer there, every such function gives a counterexample to the previous question using $d(x,y)=f(y-x)$.)

1

There are 1 best solutions below

0
On

The simplest example I can think of is $f(x)=x+1$. Edit: Let $f(x)=x$ for $x\ge 0$ and $f(x)=x+1-e^x$ for $x<0$. Unless I overlooked something obvious, this is a counterexample additionally satisfying $f(x)=0$ iff $x=0$.