# How to compute $\int\frac{x^7}{\sin(x)} dx$ efficiently?

How to compute $\int\frac{x^7}{\sin(x)} dx$ efficiently ? We need $Polylog$ for this.

-
Not sure I understand. Do you need to efficiently evaluate the definite version of the integral? Where is efficiency in the analytical solution? –  gt6989b Sep 21 '12 at 19:42
Efficients as in not too complicated or long. Efficient as in not 7 substitutions and 10 partials used. –  mick Sep 21 '12 at 19:46
The most efficient way today is to ask wolfram –  Norbert Sep 21 '12 at 19:54
Do you have any reason to think there is a less nasty answer? Maple, by the way, gives what appears to be the same answer. –  Robert Israel Sep 21 '12 at 20:05
OK then, the short method is to ask Wolfram or Maple. –  Robert Israel Sep 21 '12 at 20:09
You could substitute $w = e^{ix}$, obtaining $2 i \int \log(w)^7/(w^2-1)\ dw$. Now $$2 i \int \frac{w^p\ dw}{w^2-1} = -i{w}^{p+1}{\Phi} \left( {w}^{2},1,\frac{p+1}{2} \right)$$ (where $\Phi$ is the Lerch Phi function) so take the $7$'th derivative of this with respect to $p$ and evaluate at $p=0$. Then substitute back $w = e^{ix}$. According to Maple the result is $$-\frac{7}{2}\,{{\rm e}^{ix}} \left( \frac{2}{7}\,{x}^{7}{\Phi} \left( {{\rm e} ^{2\,ix}},1,1/2 \right) +i{x}^{6}{\Phi} \left( {{\rm e}^{2\,ix }},2,1/2 \right) -3\,{x}^{5}{\Phi} \left( {{\rm e}^{2\,ix}},3, 1/2 \right) \right.\\ -\frac{15}{2}\,i{x}^{4}{\Phi} \left( {{\rm e}^{2\,ix}},4,1 /2 \right) +15\,{x}^{3}{\Phi} \left( {{\rm e}^{2\,ix}},5,1/2 \right) +{\frac {45}{2}}\,i{x}^{2}{\Phi} \left( {{\rm e}^{2\, ix}},6,1/2 \right)\\\left. -{\frac {45}{2}}\,x{\Phi} \left( {{\rm e}^{ 2\,ix}},7,1/2 \right) -{\frac {45}{4}}\,i{\Phi} \left( { {\rm e}^{2\,ix}},8,1/2 \right) \right)$$