# How can I calculate the characteristic function of these distributions? [previously: difficult integral]

How to compute this integral in general case? $$t(x)=\int_{-\infty}^{\infty}\frac{\exp(ixy)}{1+y^{2q}}dy$$

Mathematica can compute it when q is known. For example,for q=1 this integral is $$\exp(-{\left|x\right|})\pi$$

But even in this case, I don't really know how to get this result.

-
Use the residues. –  Steve Huntsman Jan 31 '10 at 21:25
If q is positive, then you can apply the Residue Theorem to a contour in the upper half plane. –  S. Carnahan Jan 31 '10 at 21:27
First $t(x)$ does not converge for arbitrary values of $q$. In fact you should require that $1/2 < q$. Also, your answer with $q=1$ is wrong. For rational values of $q$ you can make a substitution so the integral can be solved easily using a portion of a circle on the upper half plane as contour( Using rationals makes the contour integral much easier, but as the above comments suggested contour integration is the standard way to proceed) After doing that you'll see a formula for its value and then a continuity argument should work to justify that the formula actually works for all $q>1/2$. –  Guillermo Mantilla Feb 1 '10 at 4:25

If $q$ is a positive integer, then I think one can find this in any one of several undergraduate textbooks on complex analysis, where it's usually one of the standard examples to show the power of contour integration. I dimly remember something like this in Priestley's little OUP book, for instance. For arbitrary positive real values of $q$, I can't remember how this works I'm afraid.