Here is my solution to 5):
$I =\int_{-\infty}^{\infty}\frac{xsinx}{x^4+1}dx$
$Let f(z)=\frac{ze^iz}{z^4+1}$
Solve$z^4+1=0$:$z=e^{i\frac{\pi+2k\pi}{4}},k=0,1,2,3$
f has pole of order 1 at:
$z_1=\frac{1+i}{\sqrt2}$
$z_2=\frac{-1+i}{\sqrt2}$
Then,calculate the residues:
$Res(f;z_1)=\frac{ze^iz}{4z^3}$ at $z=\frac{1+i}{\sqrt2}$= $-\frac{1}{4}z_1^2e^{iz_1}$
Similarly:
$Res(f;z_2)=\frac{ze^iz}{4z^3}$ at $z=\frac{-1+i}{\sqrt2}$= $-\frac{1}{4}z_2^2e^{iz_2}$
Then,calculate the sum of residues
=$-\frac{1}{4}z_1^2e^{iz_1}-\frac{1}{4}z_2^2e^{iz_2}$
=$\frac{1}{2}e^{-\frac{1}{\sqrt2}}sin(\frac{1}{\sqrt2})$
Then,$\int_0^\pi f(Re^{i\theta})e^{i\theta}d\theta|$ = $|\int_0^\pi \frac{Rexp(i\theta)exp(iRe^{i\theta})}{R^4e^{4i\theta}+1}Re^{i\theta}d\theta|$
$\leq \frac{R^2}{R^4+1}$, as $R \rightarrow \infty$
Finally:
$2\pi i(\frac{1}{2}e^{-\frac{1}{\sqrt2}}sin(\frac{1}{\sqrt2}))$ = $\int_{-\infty}^{\infty}\frac{xe^{ix}}{x^4+1}dx + 0$
=$\int_{-\infty}^{\infty} \frac{xcosx+ixsinx}{x^4+1}dx$
Thus, $I=\pi (e^{-\frac{1}{\sqrt2}}sin(\frac{1}{\sqrt2}))$