Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: How do i do this integral?

  1. Aug 11, 2012 #1
    1. The problem statement, all variables and given/known data


    2. Relevant equations


    3. The attempt at a solution

    I tried IBP, didn't work at all.
  2. jcsd
  3. Aug 11, 2012 #2
    That is a nasty integral, does it have to be an exact answer or can it be approximate?
  4. Aug 11, 2012 #3
    Exact. I did this but not sure if it is correct: [tex]I=\int_0^{\pi/2}x\cot(x)\,dx=\int_0^{\pi/2}(\pi/2-x)\tan(x)\,dx[/tex]
  5. Aug 11, 2012 #4
    No that's not a correct representation. ##tan(\frac{\pi}{2}-x)## is though, not sure if that helps however.
  6. Aug 12, 2012 #5
    If you add both of them, xcot(x) and (pi/2-x)tan(x) you get 2I and I think it is relatively easy from there. But I'm not sure if this is correct.

    [tex]I=\int_0^{\pi/2}x\cot(x)\,dx=\int_0^{\pi/2}(\pi/2-x)\tan(x)\,dx\\ \Rightarrow 2I=\int_0^{\pi/2}\frac{2x\cos^2(x)+2(\pi/2-x)\sin^2(x)}{2\sin(x)\cos(x)}\, dx\\=\int_0^{\pi/2}\frac{2x\cos(2x)+\frac{\pi}{2}(1-\cos(2x))}{\sin(2x)}\,dx\\\Rightarrow 4I=\int_0^{\pi}\frac{x\cos(x)+\frac{\pi}{2}(1-\cos(x))}{\sin(x)}\, dx\\=\int_0^{\pi/2}x\cot(x)\,dx+\frac{\pi}{2}\int_0^{\pi/2}\csc(x)-\cot(x)\,dx+\int_{\pi/2}^\pi (x-\pi)\cot(x)\,dx+\frac{\pi}{2}\int_{\pi/2}^\pi\csc(x)+\cot(x)\,dx\\=2I+\pi\int_0^{\pi/2}\csc(x)-\cot(x)\,dx\\=2I-\pi\log|1+\cos(x)|]^{\pi/2}_0\\\Rightarrow I=\frac{\pi}{2}\log(2).[/tex]
  7. Aug 12, 2012 #6


    User Avatar
    Homework Helper
    Gold Member

    Yes it is: [itex]\int_0^a f(x)dx = \int_0^a f(a-x)dx[/itex] and [itex]\cot \left( \frac{\pi}{2} - x \right) = \tan(x)[/itex]

    Everything look fine up until your fifth line. Your last two terms should be [itex]\int_{\frac{\pi}{2}}^{\pi}x \cot x dx = \int_0^{\frac{\pi}{2}} (x-\pi) \cot x dx [/itex] and [itex]\frac{\pi}{2} \int_{\frac{\pi}{2}}^{\pi} (\csc x - \cot x)dx = \frac{\pi}{2} \int_0^{\frac{\pi}{2}} (\csc x + \cot x)dx[/itex], respectively.
  8. Aug 12, 2012 #7
    You're totally right, been stumped all day to what I was doing wrong but I just figured it out. Sorry to the OP for saying incorrect stuff.
  9. Aug 13, 2012 #8
    It's all good =)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook