# Math Help - integral of complex functions

1. ## integral of complex functions

hi,
i hope, i posted thread to right place.

1) proove the result;

$\int_{-\infty}^{\infty} \frac{xsinx}{x^2+9}dx=\frac{\pi}{e^3}$

$\int_{0}^{2\pi}\frac {cos^2\theta}{2+sin\theta}d\theta$
For the first question, i tried $x^2+9=(x-3i)(x+3i)$ substitution. then my integral became like this;
$\int_{-\infty}^{\infty} \frac{xsinx}{x^2+9}dx=\int_{C_1}\frac{\frac{xsinx} {x-3i}}{x+3i}+\int_{C_2}\frac{\frac{xsinx}{x+3i}}{x-3i}$ where c_1 and c_2 are paths containing -3i and 3i respectively. After this, applied Cauchy's Integral Therom but got zero.
For the second question, i tried to substitute thetas with $z=|z|e^{i\theta} \to e^{i\theta}=\frac{z}{|z|}$ and $cos\theta=\frac{e^{i\theta}-e^{-i\theta}}{2}$ but again got nothing. also since our $sin\theta=-2$ for z_0 and $cos^2\theta=1-sin^2\theta$, can we say answer is $-6i\pi$ by Cauchy's Integral Theorem?