Just to reiterate: we need to know what you have in mind by an elementary function.

The algebraic approach is to take say polynomials, $\exp(x)$ and perhaps $\ln(x)$ and then to say a function is elementary if it can be written in terms of these using operations of linear combinations, multiplication, composition. Then there are elementary functions with no antiderivative. So the obvious thing to do is to extend the definition of elementary function to include these antiderivatives. The theorem is that this doesn't work.

There are algorithms which are implemented in computer algebra systems which given an elementary function will either find an antiderivative or will prove that no elementary function is an antiderivative.