TITLE: Is it necessary that every function is a derivative of some function?
QUESTION [40 upvotes]: I thought about this a lot and consulted a lot of people but everyone had contradicting answers. I am a high school student. please help.

REPLY [17 votes]: A simple example of a real function, which does not have an antiderivative, is the function
$$f(x)=
  \begin{cases}
    1 & x=0, \\
    0 & \text{otherwise}.
  \end{cases}
$$
It follows from Darboux's theorem that this function is not a derivative, but we can show this even without using Darboux's theorem:
Suppose that there exists a function $F(x)$ such that $F'(x)=f(x)$. Since $F'(x)=0$ for $x>0$ we get that $F(x)$ is constant on the interval $(0,\infty)$, i.e. there exists some $c_1$ such that $F(x)=c_1$ for each $x>0$. The same argument shows that $F(x)=c_2$ for $x<0$. Since every differentiable function is continuous, we get that $F(0)=c_1=c_2$. From this we get $F'(0)=0\ne f(0)$, a contradiction.