4

For a simpliest example, define continuous $f:\mathbb R\to\mathbb R$ to be locally convex in neighborhood $U\subset\mathbb R$ if $\{y>f(x)|x\in U\}$ is a convex set.

$f:\mathbb R\to\mathbb R$ to be locally concave in $U\subset\mathbb R$ if $\{y<f(x)|x\in U\}$ is a convex set.

Say $f$ is neither convex nor concave everywhere if $f$ is neither locally concave nor convex in all neighborhood set $U\subset\mathbb R$ and $|U|>3$. Is it possible? (I guess yes)

Say $f$ is neither convex nor concave everywhere if $f$ is neither locally concave nor convex in all measure non zero neighborhood set $U\subset\mathbb R$. Is it possible? (I guess no)

High GPA
  • 3,776
  • 15
  • 44

1 Answers1

7

The Weierstrass function provides an example of a function that is continuous but not convex or concave in any open neighborhood.

Weierstrass function

The reason being that it has infinitely fine oscillation everywhere (since it is a fractal). It is defined by the infinite series $$ f(x):=\sum_{n=0}^\infty a^n \cos(b^n \pi x) $$ where $a,b\in \Bbb R$ satisfy certain assumptions. You can read more about it in the wikipedia link I provided.

To see why this function has such properties, we recall that if $f$ is convex/concave, then it is (locally) Lipschitz. However, Rademacher's theorem says that a Lipschitz continuous function is differentiable almost everywhere, which contradicts the fact that our $f$ is nowhere differentiable.

BigbearZzz
  • 15,084