TITLE: If $f(x)$ is an integrable function, can we always find its anti-derivative using ordinary methods of integration?
QUESTION [5 upvotes]: Suppose that we have an integrable function $f(x)$ which is expressed in terms of elementary functions. By integrable, I mean that  we can find its anti-derivative in terms of elementary functions, and by elementary function I mean a function of one variable built from a finite number of exponentials, logarithms, polynomials, trigs, inverses of trigs and roots of other elementary function through composition and combinations of the four elementary operations ($+, -, \times, \div$). So $\sqrt{\sin(x)}$ in this definition is elementary function.
Is it necessarily true that we can calculate its integral (anti-derivative) using integration by parts, partial fractions, substitutions, trigonometric & hyperbolic substitutions?
Of course there are functions whose anti-derivatives we can't find in terms of elementary functions (for example, $f(x)= \frac{\sin(x)}{x}$ or $f(x)=e^x \ln(x)$), but my question is about those for which we can find their anti-derivative in terms of elementary functions.
The reason behind specifying only those methods is that those methods are taught in every class in calculus when the instructor talk about methods of integration (also, another reason is that finding the derivative for any function can be calculated using the inverse of those integration methods such as the product rule or chain rule - except quotient rule!) 
My own guess is: Suppose that $A$ is the set of  functions $F(x)$ whose derivatives are calculated using the quotient rule on some level, and $D$ is the set of derivatives of functions of $A$ , then by definition all the functions in $D$ are integrable but there exists a function in $D$ which can't be integrated using ordinary integration methods (remember, this is just a guess!) .

REPLY [2 votes]: I believe you are asking about the situation which is the subject of a classical result of Liouville, which has several modern expositions. The basic situation is the following: the concept of "integrable" that you want is "integrable by elementary functions", where an elementary function is one obtained from polynomials by repeatedly applying:

Algebraic rules (addition, multiplication, inversion)
Exponentiation and logarithms
Extracting roots (solving equations like $t^2 - f(x) = 0$ for the function $t = t(x)$, or for that matter $t^5 - xt - f(x) = 0$, which is not expressible in terms of normal roots).

Other operations, such as trig functions and their inverses, can be reformulated in terms of these by clever use of complex numbers; you'll want to read the paper for that.
This concept leads to the concept of an elementary differential field, namely, a collection $K$ of elementary functions closed under algebraic operations (the first point above) and differentiation. The idea is that $K$ embodies a "type" or "form" of elementary function, for example, functions in which the expression $e^{x^2}$ is allowed to appear.  You can then talk about elementary "extensions" by allowing the above rules to be applied to $K$, for example, adding on $\sqrt{1 + e^{x^2}}$.  (You could even start with a non-elementary field, like a field containing $f(x) = \int e^{x^2} \, dx$, and add on $\sqrt{f(x)}$, and that would be an elementary extension of it.)  Differential fields don't actually have to contain functions (this is discussed in the paper too) but I will use the $f(x)$ notation as though they do.
There is a big theorem, which Liouville proved almost two hundred years ago:
Theorem: Let $K$ be a differential field; then an function $f(x) \in K$ is integrable in an elementary extension of $K$ if and only if $f(x)$ is the sum of

fractions $u'(x)/u(x)$ for various elements $u(x) \in K$;
a derivative $v'(x)$ for some $v(x) \in K$.

The fractions $u'(x)/u(x)$ are logarithmic derivatives, whose integrals are of course $\ln u(x)$ (which are elementary functions over $K$).  Typically, you would get expressions like this in an integration problem by using partial fractions.
The expression $v'(x)$ seems like cheating: it seems to be saying "$f(x)$ has an integral if $f(x)$ has an integral", but it's a little more: this is the part of the integral that looks like $f(x)$.  This term, you can integrate just by making the substitution $v = v(x)$, rendering $\int v'(x) \,dx = \int dv = v$.  In other words, this is the part you can integrate using the chain rule without getting too creative.
So I interpret this theorem as saying that you can do any elementary integral using only:

Partial fractions
Substitution
Simple algebra to figure out which parts require which.

Of course, the third part is really the one requiring some cleverness.
Edit: I feel that I should say that the various very clever trig substitutions seem to, but do not, fall outside this classification.  The reason is again the complex-numbers trick, with which you can rewrite them all in terms of exponentials, and their inverses in terms of logarithms.  If you insist on sticking with real numbers only, then you have to compensate for the loss of algebraic power with an increase in sophistication of your substitutions.