# Non elementary antiderivative of $\phi(\cos x,\sin x)$ when $\phi(x,y)$ is a rational real function?

With the method of Residues, we can calculate the integral $$\int_{0}^{2\pi}\phi(\cos x,\sin x)\, dx$$ where $\phi(x,y)=\frac{p(x,y)}{q(x,y)}$, ($p,q$ are polynomials of $x,y$)

In all the examples I have seen however, the antiderivative of $\phi$ is an elementary function (although very complicated) and as such, residues are an optional aid, not a "neccessity". My question is does there exist a function $\phi(x,y)$ so that $$\int\phi(\cos x,\sin x)\, dx$$ is not elementary yet $$\int_{0}^{2\pi}\phi(\cos x,\sin x)\, dx$$ can be (preferably easily) computed using the Residue Theorem?

A function is said to be elementary if it can be written in terms of polynomial, rational, exponential, logarithmic, trigonometric functions and their inverses. Whether or not a function has an elementary antiderivative is decided by the Risch algorithm.

-

The indefinite integral of such a function can always be written in terms of elementary functions.

Given such a $\phi$, there exists polynomials $P$ and $Q$ such that: $$\phi(\cos x,\sin x)=\frac{P(e^{ix})}{Q(e^{ix})}$$

Using $u=e^{ix}$, we see that $du/(iu)=dx$, and so you want a closed form for:

$$\int \frac{P(u)}{iuQ(u)}du$$

But we can apply partial fractions to come up with a closed form for such an integral.

This is not necessarily gonna be pretty - the formula depends on the roots of $Q$. But there will be a formula in terms of the elementary functions and numbers that are algebraic with respect to the coefficients of $P$ and $Q$.

-
So the answer to my question is no. Thank you. –  Nameless Dec 7 '12 at 18:43