What is $PQ^{-1}$ if $P=\int^{\pi}_{0}\frac{\sin(994 x)}{\sin x}\sin(1332x)\,dx$ and $Q=\int^{1}_{0}\frac{x^{338}(x^{1988}-1)}{x^2-1}\,dx$? 
If $\displaystyle P=\int^{\pi}_{0}\frac{\sin(994 x)}{\sin x}\cdot \sin(1332x)\,dx$ and $\displaystyle Q=\int^{1}_{0}\frac{x^{338}(x^{1988}-1)}{x^2-1}\,dx$. Then $P\cdot Q^{-1}$ is 

Try: put $x=e^{i\theta}$ in $\displaystyle Q=\int^{1}_{0}\frac{x^{338}(x^{1988}-1)}{x^2-1}dx$
$\displaystyle Q =\int \frac{e^{i338\theta}(e^{i1988\theta}-1)}{e^{i2x}-1}\cdot ie^{i\theta}d\theta$
$\displaystyle Q=\int\frac{(\cos (1332x)+i\sin (1332 x))\cdot \sin(994x)}{\sin x}\cdot i dx$
Could some help me How to convert limit and solve that integral . Thanks
 A: Very nice idea!
More accurate approach is
$$P = \int\limits_0^\pi \dfrac{\sin994x\sin1332x}{\sin x} \,dx
 = \dfrac12\int\limits_0^\pi\dfrac{\cos338x - \cos2326x}{\sin x} \,dx$$
$$ = \dfrac12\Re\int\limits_0^\pi\dfrac{e^{338ix} - e^{2326ix}}{\sin x} \,dx
= \dfrac12\Re\int\limits_0^\pi\dfrac{e^{338ix} - e^{2326ix}}{e^{ix}-e^{-ix}} \,d(ix) = \Re\oint\limits_{|z|=1\\ \Im z>0}\dfrac{z^{338}-z^{2326}}{z^2-1}dz$$
$$ = \Re\lim\limits_{\delta\to 0}\left(\oint\limits_{z=-1+\delta e^{i\varphi}\\ \varphi 
= \frac\pi2\to 0}\dfrac{z^{2326}-z^{338}}{z^2-1}dz
 + \int\limits_{-1}^1\dfrac{z^{2326}-z^{338}}{z^2-1}dz
+ \oint\limits_{z=1+\delta e^{i\varphi}\\ \varphi = \pi\to\frac\pi2}\dfrac{z^{2326}-z^{338}}{z^2-1}dz\right)$$
$$ = \Re\lim\limits_{\delta\to 0}\left(\int\limits_{\large \frac\pi2}^0\dfrac{(-1+\delta e^{i\varphi})^{2326}-(-1+\delta e^{i\varphi})^{338}}{(-1+\delta e^{i\varphi})^2-1}d\varphi
+\int\limits_\pi^{\large \frac\pi2}\dfrac{(1+\delta e^{i\varphi})^{2326}-(1+\delta e^{i\varphi})^{338}}{(1+\delta e^{i\varphi})^2-1}d\varphi\right)
 + \int\limits_{-1}^1\dfrac{x^{2326}-x^{338}}{x^2-1}dx$$
$$ = {\Re\lim\limits_{\delta\to 0}}\left(\int\limits_{\large \frac\pi2}^0\dfrac{2326e^{i\varphi}(-1+\delta e^{i\varphi})^{2325}-338e^{i\varphi}(-1+\delta e^{i\varphi})^{337}}{2e^{i\varphi}(-1+\delta e^{i\varphi})}d\varphi
+\int\limits_\pi^{\large \frac\pi2}\dfrac{2326e^{i\varphi}(1+\delta e^{i\varphi})^{2325}-338e^{i\varphi}(1+\delta e^{i\varphi})^{337}}{2e^{i\varphi}(1+\delta e^{i\varphi})}d\varphi\right)
 + 2\int\limits_0^1\dfrac{(x^{1938}-1)x^{338}}{x^2-1}dx$$
$$ = \dfrac\pi4(-2326+338+2326-338) + 2Q\color{brown}{\mathbf{ = 2Q.}}$$
