1. Jul 29, 2011

### yungman

Please tell me what did I do wrong on this integration. The book claimed this can only be solved in numerical method and the answer is 1.218.

$$\int _0^{\pi} \frac {\cos ^2\left [\frac {\pi} 2 \;\cos\;\theta\right]}{\sin \theta}\;d\;\theta$$

$$\hbox { Let }\; u=\frac {\pi} 2\; \cos \theta\;\Rightarrow\; d\theta =-\frac{2\;d\;u}{\pi\;\sin\;\theta}\; \Rightarrow\;\int _0^{\pi} \frac {\cos ^2\left [\frac {\pi} 2 \;\cos\;\theta\right]}{\sin \theta}\;d\;\theta \;=\; -\frac 2 {\pi}\int \cos^2\;u \;d\;u\;=-\frac 1 {\pi} \left[ \int d\;u \;+\; \int \cos(2u) d\;u \right ]$$

$$= -\left [\frac { \frac {\pi} 2 \cos \theta}{\pi}\right]_0^{\pi} \;-\;\frac 1 {2\pi} \int \cos v \;dv \;\;\;\;\;\;\hbox { where }\;\; \;v=2u \;\hbox { and }\;d\;u=\frac {d\;v} 2$$

$$= 1 -\left[\frac { \sin (2\frac {\pi} 2 \;\cos \theta)}{2\pi}\right]^{\pi}_0 \;= 1$$

I solve this without using numerical method and the answer is 1 instead of 1.218. Who is right?

2. Jul 29, 2011

### cragar

your du is not $du= \frac{1}{sin(x)}$
you cant get rid of that sine in the bottom with that u substitution

3. Jul 29, 2011

### yungman

I really don't get it. Please explain more.

Thanks

Alan

Last edited: Jul 29, 2011
4. Jul 29, 2011

### cragar

yes that's what you would have. This integral looks tricky if its even doable, I tried some stuff using trig identities and stuff and even thought about using Eulers formula .

5. Jul 29, 2011

### Isak BM

After the substitution the integrand should become

$-\frac{2}{\pi}\frac{cos^2 u}{sin^2 \theta}$

6. Jul 29, 2011

### akaritakai

I spent awhile on this and eventually asked Mathematica for help in calculating the integral. It confirmed the answer as $\approx 1.21883$, and gave that
$\int^{\pi }_0{{cos}^2\left(\frac{\pi }{2}{\cos \left(x\right)\ }\right){\csc \left(x\right)\ }dx=\frac{1}{2}\left(-Ci(2\pi \right)+\gamma +{\rm ln}(2\pi ))}.$
Where Ci(x) is the cosine integral (http://mathworld.wolfram.com/CosineIntegral.html) and $\gamma$ is the Euler-Mascheroni constant (http://mathworld.wolfram.com/Euler-MascheroniConstant.html), which would seem to confirm this as a non-elementary integral. I don't even think it's possible to solve without the aid of a very comprehensive set of integration tables. =\

Last edited by a moderator: Apr 26, 2017
7. Jul 29, 2011

### yungman

Thanks, I was so blind!!! No wonder!!! It was late last night. I don't know why I tend to make this kind of stupid mistake all the times, it is so obvious that I miss it. That's the reason I never get 100 in my ODE class, always 96 97, always have one of these mistakes to take off a few points!!! Kicker is I still did not see it after your first reply.....and I did went through the whole thing!!!!

Thanks.

8. Jul 29, 2011

### yungman

Thanks.

Last edited by a moderator: Apr 26, 2017