# Evaluating $\int^{\frac\pi2}_{\frac\pi4}(2\csc(x))^{17}dx$

I saw this question in JEE Advanced. But in that we had to simplify it to $$\int^{\log(1+\sqrt2)}_{0}2(e^u+e^{-u})^{16}du$$ But I pose the following question as to evaluate this integral in closed form.
My Attempt: $$\int^{\frac\pi2}_{\frac\pi4}(2\csc(x))^{17}dx$$ $$=\int^{\frac\pi2}_{\frac\pi4}\frac{(2.2i)^{17}}{(e^{ix}-e^{-ix})^{17}}dx$$ (Bit of a cheeky attempt! I know. :D) $$4^{17}i\int^{\frac\pi2}_{\frac\pi4}\frac{e^{17ix}}{e^{2ix}-1}dx$$ If we put $u=e^{ix};du=i.e^{ix}dx$, then $$-4^{17}\int^{i}_{\frac{1+i}{\sqrt2}}\frac{u^{16}}{u^2-1}du$$ (Huh??!!) $$4^{17}\int_i^{\frac{1+i}{\sqrt2}}\frac{u^{16}}{u^2-1}du$$ And $$\int\frac{u^{16}}{u^2-1}=\frac{u^{15}}{15}+\frac{u^{13}}{13}+\frac{u^{11}}{11}+\frac{u^{9}}{9}+\frac{u^{7}}{7}+\frac{u^{5}}{5}+\frac{u^{3}}{3}+u+\frac12\log(1-u)-\frac12\log(u+1)+C$$ But at this point I am stuck. Please can someone help?

• Please avoid \large and similar things in the title. It looks bad in the list of questions. – mickep Oct 10 '15 at 12:52
• Sorry didnt know. The integral was looking horrible without it. @mickep – Aditya Agarwal Oct 10 '15 at 13:01
• I think that it might look nicer if you for example write $\pi/2$ instead of $\frac{\pi}{2}$ in the limits. – mickep Oct 10 '15 at 13:03

By applying the Weierstrass substitution $x=2\arctan t$ we have: $$\color{red}{I}=\int_{\pi/4}^{\pi/2}\left(\frac{2}{\sin x}\right)^{17}\,dx = \int_{\pi/4}^{\pi/2}\left(\frac{1}{\sin\frac{x}{2}\,\cos\frac{x}{2}}\right)^{17}=2\int_{\sqrt{2}-1}^{1}\left(\frac{1+t^2}{t}\right)^{17}\frac{dt}{1+t^2}$$ then by setting $t=e^{-u}$ and applying the binomial theorem it follows that: $$\color{red}{I} = 2\int_{0}^{\log(1+\sqrt{2})}(e^u+e^{-u})^{16}\,du=\color{red}{\frac{16037316\,\sqrt{2}}{7}+25740\log\left(1+\sqrt{2}\right)}.$$

• If I had wanted to proceed by this method, I would have directly put $2\csc(x)=e^u+e^{-u}$. But I want to proceed by my [complex] method. – Aditya Agarwal Oct 10 '15 at 10:29
• Then find your complex solution by evaluating your primitive, why asking? – Jack D'Aurizio Oct 10 '15 at 10:31
• No but how to evaluate the complex log? (To a real number solution) What I mean is that how to simplify my complex situation to a real number answer like yours? – Aditya Agarwal Oct 10 '15 at 10:36
• It depends on how you have defined the complex logarithm. It is a multi-valued function on $\mathbb{C}$, since $z$ and $z+2\pi i$ have the same exponential. – Jack D'Aurizio Oct 10 '15 at 10:42
• So that is what I am saying. Please can you make a small edit on that? – Aditya Agarwal Oct 10 '15 at 10:46

How about substituting $\displaystyle cosecx + cotx = e^{u}$

Also recall that $cosec^2x - cot^2x = 1$ $\implies$ $cosecx - cotx$ = $\dfrac{1}{cosecx + cotx}$

Therefore $\displaystyle cosecx - cotx = \frac{1}{cosecx + cotx} = e^{-u}$

Adding the two equations we have,

$\displaystyle 2cosecx = e^{u} + e^{-u}$

Subtracting the two equations we obtain,

$\displaystyle 2cotx = e^{u} - e^{-u}$

Since we had $\displaystyle 2cosecx = e^{u} + e^{-u}$, differentiating both sides,

$\displaystyle (-2cosecxcotx)dx = (e^{u} - e^{-u})du$

Substituting $\displaystyle 2cotx = e^{u} - e^{-u}$

$=> \displaystyle -cosecx(e^{u} - e^{-u})dx = (e^{u} - e^{-u})du$

Cancelling $\displaystyle (e^{u} - e^{-u})$ on both sides and substituting $\displaystyle 2cosecx = e^{u} + e^{-u}$

$=> \displaystyle dx = \frac{-2du}{e^{u} + e^{-u}}$

Now let’s examine the limits of the integral using our substitution $\displaystyle cosecx + cotx = e^{u},$

At $\displaystyle x = \frac{\pi}{4}$

$\displaystyle cosec(\frac{\pi}{4}) + cot(\frac{\pi}{4}) = e^{u}$

$=> \displaystyle \sqrt2 + 1 = e^{u}$

$=> \displaystyle u = ln(1 + \sqrt2)$

At $\displaystyle x = \frac{\pi}{2}$

$\displaystyle cosec(\frac{\pi}{2}) + cot(\frac{\pi}{2}) = e^{u}$

$=> \displaystyle 1 = e^{u}$

$=> \displaystyle u = 0$

We obtain our new limits as $\displaystyle u = ln(1 + \sqrt2)$ and $u = 0$ , just like in the options!

Hence $\displaystyle cosecx + cotx = e^{u}$ was a smart guess!

So the given integral gets simplified to:

$\displaystyle \int_{\frac{\pi}{4}}^{\frac{\pi}{2}}(2cosecx)^{17}dx = \int_{ln(1+\sqrt2)}^{0}(e^{u}+e^{-u})^{17}\frac{-2du}{e^{u} + e^{-u}}$ $= \displaystyle \boxed{\int_{0}^{ln(1+\sqrt2)}2(e^{u}+e^{-u})^{16}du}$

• Formatting tip: When entering trig functions, notice that adding \ before the functions looks much better see: $sin x$ gives $sin x$ whereas $\sin x$ gives $\sin x$. The same goes in the case of log functions, see: $\log x$ and $\ln x$ give $\log x$ and $\ln x$ and looks better; as opposed to $log x$ and $ln x$ which yield $log x$ and $ln x$. – user409521 Apr 19 '17 at 23:54