# a function not continuous but sill has antiderivative (necessary and sufficient condition for having antiderivative)

1) if f(x) continuous on domain D then it is integrable and has antiderivative.

2) f(x) is almost continuous (that is, the set of discontinuities has measure zero) is equivalent to integrability, but "almost continuous" doesn't guarantee having antiderivative.

Now I am wondering is it possible for f(x) not continuous but still have antiderivative. Could you give me an example. It seems that people don't care about a function that have antiderivative, just integrable functions. Thank you.

-
You may want to read this Wiki page en.wikipedia.org/wiki/Antiderivative and especially the section Antiderivatives of non-continuous functions. There are some nice examples here – Nameless Nov 18 '12 at 8:14

Let $f(x)$ be the derivative of the function $F(x)$ such that $F(x)=x^2\sin(1/x)$ when $x\ne 0$, and $F(0)=0$. Then $f(x)$ is not continuous at $0$.
Note that from the definition of the derivative, we can readily prove that $F'(0)$ exists and is equal to $0$. So $f(0)=0$.
But for $x\ne 0$, $$f(x)=F'(x)=(x^2)(-1/x^2)\cos(1/x) +2x\sin(1/x)=-\cos(1/x)+2x\sin(1/x).$$ The $2x\sin(1/x)$ part approaches $0$, but the $\cos(1/x)$ part wiggles wildly near $0$. So $f(x)$ is not continuous at $0$.