# Nowhere continuous real valued function which has an antiderivative

My question:

Is there a function $f: \mathbb{R} \rightarrow \mathbb{R}$ that nowhere continuous on its domain, but has an antiderivative?

If there is no such a function, is it true to conclude that: to have an antiderivative, $f$ is necessary to be continuous at least at one point on its domain?

-
I may be misunderstanding your question, but couldn't you take any nowhere continuous $L^1$ function $f$ and define $F(x) = \int_{-\infty}^x f(t) dt$? – Chris Janjigian Feb 13 '12 at 2:15
The derivative of $F$ is not $f$, I think it's only $f$ a.e. – N. S. Feb 13 '12 at 2:20
@Chris that $\frac d {dx} F(x) = f(x)$ does not follow from that. I take anti-derivative to mean that there exits a function whose derivative is $f$. – guy Feb 13 '12 at 2:24
I didn't realize that was the definition! Thanks for clearing that up :) I always thought of anti-derivatives as functions $F$ which satisfy $F(b) - F(a) = \int_a^b f(x) dx$, which on reflection really doesn't make much sense. – Chris Janjigian Feb 13 '12 at 2:31
Thanks for your feedbacks! Previously, I also thought the same as Christ, but later on I was in doubt, therefore I asked this question... I think the right answer is "no such function", as verified by Sam and Kahen below, using Baire's theorem – netsurfer Feb 13 '12 at 3:11

There is no such function.

In fact, by an application of Baire's theorem one can show that, given a sequence of continuous functions $f_n:\mathbb R \to \mathbb R$, which converges pointwise, i.e. $f_n(x)\to f(x)$ for each $x\in \mathbb R$, the set of points where $f$ is continuous is a dense $G_\delta$-set.

Applied to your situation, we can consider the sequence $$f_n(x) = \frac{f(x+1/n) - f(x)}{1/n}$$ All of these functions are continuous and converge pointwise to $f'(x)$. So $f'(x)$ must be continuous on a dense $G_\delta$-set.

So you are right with your second statement: For a function $g$ to be the derivative of some other function, $g$ necessarily has to have at least one point of continuity.

-
Thanks for your answer and analysis. It makes things clearer... – netsurfer Feb 13 '12 at 3:18

If you want your antiderivative to be differentiable everywhere, this is impossible since the derivative of a differentiable function $F: \mathbb R \to \mathbb R$ can be realized as a pointwise limit of continuous functions (use the "$\lim_{h\to0} \frac{f(x+h)-f(x)}h$"-definition of differentiability to construct a suitable sequence), and the pointwise limit of a sequence of continuous functions from $\mathbb R$ to $\mathbb R$ must be continuous on a comeagre set by the Baire-Osgood theorem.

-
Thanks for your comment and inputs. – netsurfer Feb 13 '12 at 3:26
– kahen May 1 '12 at 11:05