How to integrate a composite function with a variable exponent? Is there a general formula, or any "tools",  for solving
$$\int f(x)^n \, dx $$ ?
I apologize if this is a basic question... but I am trying to remember my calculus, and even with searching online and through the archives here, I can't figure this one out.  I'm looking for just a general formula (such as I know exists for differentiation).  Or, I can make some restrictions, such as $n$ is positive, and $f(x)$ is always between 0 and 1.
 A: It can be difficult in general. $\int(\arctan\,x)^2\;\mathrm dx$ cannot be expressed in terms of elementary functions, for instance.

If the $f(x)$ in $\int f(x)^n \mathrm dx$ is a polynomial, things are a little easier. As Hans mentions in the comments, one can in general use the multinomial theorem to expand out the integrand into chunks that are slightly easier to integrate, but one should watch out for approaches that are more convenient for manipulation, e.g. if $f(x)$ is in fact the power of some binomial.
For linear and quadratic $f(x)$, some preliminary manipulations can be done so that one does not require the full generality of the multinomial theorem. For instance, if $f(x)=ax+b$, one can do the following:
$$\int(ax+b)^n \mathrm dx=a^n\int\left(x+\frac{b}{a}\right)^n \mathrm dx$$
and letting $u=x+\frac{b}{a}$, we have
$$a^n\int u^n\mathrm du=a^n\frac{u^{n+1}}{n+1}=\frac{(ax+b)^{n+1}}{a(n+1)}$$
For $f(x)=ax^2+bx+c$, one can "complete the square" like so (see anything familiar?):
$$\int(ax^2+bx+c)^n \mathrm dx=a^n\int\left(x^2+\frac{b}{a}x+\frac{c}{a}\right)^n \mathrm dx=a^n\int\left(\left(x+\frac{b}{2a}\right)^2-\frac{b^2-4ac}{4a^2}\right)^n \mathrm dx$$
from which one can (repeatedly) use the (probably more familiar) binomial theorem instead of the multinomial theorem for the expansion.
