# Derivative and Integral of $\pi(x)$ (primes before $x$)?

What's the derivative and indefinite integral of $\pi(x)$, which gives the number of primes before $x$? I know there's no answer in terms of elementary functions, but is there an answer in terms of other functions or series?

• I would suggest to add the fact that your function is $\pi(x)$ in the title, since it makes ur title more specific and it might help you get more help. :) – Pinocchio Jan 23 '14 at 4:20
• @Pinocchio Good idea :) – dfg Jan 23 '14 at 4:29
• If by indefinite integral you mean antiderivative, then $\pi(x)$ has none since it has a jump discontinuity at each prime. Did you have some other meaning in mind? – Santiago Canez Jan 23 '14 at 5:07
• @SantiagoCanez I just meant a function that I could use to evaluate the area between two points. It doesn't have to be the antiderivative, if theres another way to define the area function. – dfg Jan 23 '14 at 5:08

This is how I would think about it.

You know that $\pi(x)$ is approximately equal to $\dfrac{x}{\ln(x)}$ for sufficiently large $x$ (specifically as $x \to \infty$) http://en.wikipedia.org/wiki/Prime_number_theorem).

Thus, now you have expressed $\pi(x)$ as a continuous function that has a better chance of having derivatives and integrals. Now I would plug that into wolfram to see what the integral and derivatives look like.

Apparently, the derivative is $\dfrac{\ln(x) - 1}{\ln^2(x)}$.

However, the obvious disadvantages of this approach is that, the result is only valid for large values of $x$ , its an approximation and it only gives an asymptotic result.

Maybe if you provide more context or why you need this, a better answer might be possible.

Hope it helps!

• Your welcome! I think the key intuition is to note that a function that is discrete doesn't really become differentiable/integrable until you consider something so large that the sum of the discrete and small things starts to become an integral and add to something that makes sense. – Pinocchio Mar 2 '14 at 21:23

The derivative of π(x) would be 0 except when x is a prime, when it wouldn't exist since π(x) takes a step at prime values of x.