$\displaystyle \int^{\pi}_{-\pi} \frac{\sin nx}{(1+2^{x}) \sin x} \ dx $ for n =0,1,2,...
Printable View
$\displaystyle \int^{\pi}_{-\pi} \frac{\sin nx}{(1+2^{x}) \sin x} \ dx $ for n =0,1,2,...
put $\displaystyle x\mapsto-x$ and your integral equals $\displaystyle \int_{-\pi }^{\pi }{\frac{2^{x}\sin nx}{\left( 1+2^{x} \right)\sin x}\,dx},$ thus $\displaystyle \int_{-\pi }^{\pi }{\frac{\sin nx}{\left( 1+2^{x} \right)\sin x}\,dx}\,+\,\int_{-\pi }^{\pi }{\frac{2^{x}\sin nx}{\left( 1+2^{x} \right)\sin x}\,dx}=\int_{-\pi }^{\pi }{\frac{\sin nx}{\sin x}\,dx}=2\int_{0}^{\pi }{\frac{\sin nx}{\sin x}\,dx}.$
on the last integral let $\displaystyle I_n=\int_0^\pi\frac{\sin nx}{\sin x}\,dx$ and get that $\displaystyle I_n-I_{n-2}=0,$ thus $\displaystyle I_n=\left\{\begin{array}{cl}\pi,&\text{if }n\text{ is odd.}\\
0,&\text{if }n\text{ is even.}\end{array}\right.$
There shouldn't be a two in front of $\displaystyle I_{n} $
$\displaystyle \int^{\pi}_{-\pi} \frac{\sin nx}{(1+2^{x})\sin x} \ dx = \int_{-\pi}^{0} \frac{\sin nx}{(1+2^{x})\sin x} \ dx + \int^{\pi}_{0} \frac{\sin nx}{(1+2^{x})\sin x} \ dx $
$\displaystyle = \int_{0}^{\pi} \frac{\sin nx}{(1+2^{-x})\sin x} \ dx + \int^{\pi}_{0} \frac{\sin nx}{(1+2^{x})\sin x} \ dx $
$\displaystyle = \int_{0}^{\pi} \frac{2^{x} \sin nx}{(1+2^{x})\sin x} \ dx + \int^{\pi}_{0} \frac{\sin nx}{(1+2^{x})\sin x} \ dx $
$\displaystyle = \int_{0}^{\pi} \frac{\sin nx}{\sin x} \ dx $
and for anyone who cares
$\displaystyle I_{n}-I_{n-2} = \int^{\pi}_{0} \frac{\sin nx}{\sin x} \ dx - \int^{\pi}_{0} \frac{\sin (n-2)x}{\sin x} \ dx $
$\displaystyle = \int^{\pi}_{0} \frac{\sin nx - \sin (n-2)x}{\sin x} \ dx $
$\displaystyle = 2 \int^{\pi}_{0} \frac{\sin x \cos (n-1)x}{\sin x} \ dx = 2 \int^{\pi}_{0} \cos (n-1)x \ dx$
$\displaystyle = \frac{2}{n-1} \sin (n-1)x \Big|^{\pi}_{0} = 0$
and obviously $\displaystyle I_{0} = 0 $
and $\displaystyle I_{1} = \int^{\pi}_{0} \frac{\sin x}{\sin x} \ dx = \int^{\pi}_{0} \ dx = \pi $
note that i never said that your integral equals $\displaystyle 2I_n,$ the latter was because $\displaystyle \frac{\sin nx}{\sin x}$ is even, what i actually did was
$\displaystyle \int_{-\pi }^{\pi }{\frac{\sin nx}{\left( 1+2^{x} \right)\sin x}\,dx}=\frac{1}{2}\left( \int_{-\pi }^{\pi }{\frac{2^{x}\sin nx}{\left( 1+2^{x} \right)\sin x}\,dx}+\int_{-\pi }^{\pi }{\frac{\sin nx}{\left( 1+2^{x} \right)\sin x}\,dx} \right),$ and that yields the same you got.
A general formula can be found for: $\displaystyle I(n,m) = \int_{-\pi}^{\pi}\left(\frac{\sin(n\cdot x)}{\sin(x)}\right)^mdx$
Remember $\displaystyle \sin(z)=\tfrac{\exp(z\cdot i)-\exp(-z\cdot i)}{2\cdot i}$ hence: $\displaystyle I(n,m) = \int_{-\pi}^{\pi}\left(\frac{e^{n\cdot x\cdot i}-e^{-n\cdot x\cdot i}}{e^{x\cdot i}-e^{-x\cdot i}}\right)^mdx$
Note that: $\displaystyle \tfrac{b^n-a^n}{b-a}=\sum_{k=0}^{n-1}a^k\cdot b^{n-1-k}$ let $\displaystyle a=e^{-x\cdot i}$; $\displaystyle b=e^{x\cdot i}$ then : $\displaystyle \frac{e^{n\cdot x\cdot i}-e^{-n\cdot x\cdot i}}{e^{x\cdot i}-e^{-x\cdot i}} = e^{(n-1)\cdot x\cdot i}\cdot \sum_{k=0}^{n-1}e^{-2 k\cdot x\cdot i }$
Thus: $\displaystyle I(n,m) = \int_{-\pi}^{\pi}e^{(n-1)\cdot m\cdot x\cdot i}\cdot \left(\sum_{k=0}^{n-1}e^{-2k\cdot x\cdot i }\right)^mdx = 2\pi \cdot [x^{(n-1)\cdot m}]\left\{ \left(\sum_{k=0}^{n-1}x^{2k}\right)^m \right\}$ - that is to say $\displaystyle 2\pi$ multiplied by the coefficient of $\displaystyle x^{(n-1)\cdot m}$ of that polynomial in there - (*)
(*) Because $\displaystyle \int_{-\pi}^{\pi}e^{n\cdot x\cdot i}dx$ is $\displaystyle 2\cdot\pi$ for $\displaystyle n=0$ and 0 for all other integer value of $\displaystyle n$.
In particular then:
- $\displaystyle I(2n+1, 1) = 2\pi$
- $\displaystyle I(n, 2) = 2 \pi \cdot n$, since our answer is the number of pairs of integers (x, y) with $\displaystyle 0\leq x,y\leq n-1$ such that $\displaystyle x+y = n -1$, fix a valid $\displaystyle x$ and that determines $\displaystyle y$.