Is there a function whose antiderivative can be found but whose derivative cannot?

Does a function, $f(x)$, exist such that $\int f(x) dx $ can be found but $f' (x)$ cannot be found in terms of elementary functions.

For example, if $f(x)=e^{x^2}$, then the derivative is easily calculated by using the chain rule. However, there does not exist an anti-derivative in terms of elementary functions.

Does a function exist with the opposite property?


If the antiderivative $F$ of $f$ is elementary, then so is $f' = F''$ (for any reasonable definition of "elementary function"). Thus, no such example can be found.


EDIT

Here are some more details which were adressed in the comments and/or other answers:

  1. What I assume here is that for your favorite definition of "elementary function", the following is true: Every elementary function is differentiable and the derivative is again an elementary function.

    This is indeed fulfilled (on the respective domains) if you take as your elementary functions all functions which can be obtained from $\exp, \ln, \sin, \cos$ and polynomials by taking sums/quotients/products and compositions of these functions. This is a consequence of the chain rule.

    It is not fulfilled, however, if you also want to include roots, since e.g. $x \mapsto \sqrt{x}$ is not differentiable at the origin. But note that it is true if you only consider the roots as functions on $(0,\infty)$ instead of $[0,\infty)$.

  2. I assume that if your function $f$ has a continuous version (with respect to equality a.e.), you identify it with its continuous version.

    As noted in the answer of @RossMillikan, the Dirichlet function $f = 1_\Bbb{Q}$ is (Lebesgue)-integrable with "antiderivative" $x \mapsto 0$, but not differentiable. But note that $f = 0$ almost everywhere, which is elementary and has an elementary derivative.

    Finally, if $F(x) = \int_a^x f(t) \, dt$ is elementary, then (by Lebesgue's differentiation theorem) you have $f(x) = F'(x)$ almost everywhere. Hence, if $F$ is elementary (as outlined in point 1), then $F'$ is elementary and hence continuous, so that we get $f = F'$ almost everywhere. Since we agreed to identify $f$ with its continuous version, we get $f = F'$ everywhere, so that $f$ is differentiable with $f' = F''$ elementary, as claimed above.


Although the other answers say differently, I would put up the example of the Weierstrass function which is a pathological mathematical idea.

Quoting from Wikipedia:

In mathematics, the Weierstrass function is an example of a pathological real-valued function on the real line. The function has the property of being continuous everywhere but differentiable nowhere. It is named after its discoverer Karl Weierstrass.

Historically, the Weierstrass function is important because it was the first published example (1872) to challenge the notion that every continuous function was differentiable except on a set of isolated points.

In Weierstrass' original paper, the function was defined as the sum of a Fourier series:

$$f(x)=\sum_{n=0} ^\infty a^n \cos(b^n \pi x)$$ where $0<a<1$, $b$ is a positive odd integer, and

$$ab > 1+\frac{3}{2} \pi$$

The minimum value of $b$ which satisfies these constraints is $b=7$. This construction, along with the proof that the function is nowhere differentiable, was first given by Weierstrass in a paper presented to the Königliche Akademie der Wissenschaften on 18 July 1872.

The proof that this function is continuous everywhere is not difficult. Since the terms of the infinite series which defines it are bounded by $\pm a^n$ and this has finite sum for $0 < a < 1$, convergence of the sum of the terms is uniform by the Weierstrass M-test with $M_n = a^n$. Since each partial sum is continuous and the uniform limit of continuous functions is continuous, it follows $f$ is continuous.

As is evident from the functional form of this special function, it does have an antiderivative. So this can be considered a valid example.


$f(x)=|x|$ is integrable, with integral $\frac 12x|x|$. You can take $f'(x)$ everywhere but zero.

The Dirichlet function, which is $1$ on the rationals and $0$ on the irrationals, is Lebesgue integrable (with value $0$) but has no derivative anywhere.


PhoemueX's answer is correct, but if you want a little more detail on the subject, I actually wrote a paper on the topic that goes on to prove that all elementary functions have elementary derivatives (and quite a bit more). All it requires is an understanding of high school and some basic experience with proofs.

Here is a link to the paper

I explain what it means for a function to be an elementary function in section 2 (page 2), and then I begin section 3 (page 6) by proving that all elementary functions have elementary derivatives.