Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible for function $f : \mathbb{R} \to \mathbb{R}$ have a maximum at every point in a countable dense subset of its domain ? The motivation for this question is I have a sequence of functions $\{f_n\}$ where the number of maxima increases with $n$ and I am interested to know what happens to the sequence of functions.

PS : every function of the sequence has a finite number of maxima.

EDIT : $f$ should not be constant function.

share|cite|improve this question
What if the function $f$ was constant?... ;) Or do you want to have the set of maximas to be countable? If you can allow ''more'' maximas, the constant function would be an example of one such function. – Patrick Da Silva Jun 3 '11 at 5:04
@Patrick: Or, if you insist on countable, the characteristic function of the rationals. – Ross Millikan Jun 3 '11 at 5:06
@Patrick : maxima means second derivative should be negative. – Rajesh Dachiraju Jun 3 '11 at 5:07
@Rajesh: So you want your function to be twice differentiable. Please include that in the statement of your question. – Yuval Filmus Jun 3 '11 at 5:08
@Yuval : Ok, i do not need it to be differentiable but i do not want constant function either. – Rajesh Dachiraju Jun 3 '11 at 5:10
up vote 4 down vote accepted

Thomae's function has a strict local maximum at each rational number.

I believe the Weierstrass function is another example.

Another question on this site posed the problem of showing that if $f$ is continuous and not monotone on any interval, then $f$ has a local maximum at each point in a dense subset of $\mathbb{R}$.

share|cite|improve this answer
You're quick, aren't you. XD – Patrick Da Silva Jun 3 '11 at 5:13
I'd like to know if it's possible for the sequence of functions $\{f_n\}$ where each one is smooth to converge to such a function ? – Rajesh Dachiraju Jun 3 '11 at 5:20
@Rajesh: The Weierstrass function is a uniform limit of smooth functions. – Jonas Meyer Jun 3 '11 at 5:22

Sample paths of Brownian motion have this property (with probability $1$), see here.

share|cite|improve this answer
See the third item in that subsection (Qualitative properties). – Shai Covo Jun 3 '11 at 5:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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