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

Ln(cosx+1) integral

  1. Jun 9, 2010 #1
    Whats the integral of ln(cosx+1)? By the way don't give me the answer, give me the basic idea, i want to find the solution myself(i love integrals :smile:). I tried to multiply by x'(=1) and then integrate by parts but the integral became even more complicated. I really need to calculate this one so i can calculate another integral. Also are there any general methods to calculate any ln(P(x))?
     
  2. jcsd
  3. Jun 9, 2010 #2

    Mark44

    Staff: Mentor

    I can't think of any way other than integration by parts, but you are very limited in the choice of u and dv. For this problem u = ln(cos(x) + 1) and dv = dx, so du = 1/(cos x + 1) * (-sin x), and v = x. You might or might not be able to do something with this.

    What did you mean when you said "I tried to multiply by x'(=1)"?
     
  4. Jun 9, 2010 #3
    i am not sure what you mean either. Are you suggesting integration by u substitution? If so u=ln(cosx+1) du=-sinx/(cosx+1)dx and since i don't have the -sinx/cosx+1 i can't "create" the du. I multiplied by x' in order to integrate by parts. That way you also find the integral of lnx
     
  5. Jun 9, 2010 #4

    Mark44

    Staff: Mentor

    No, I didn't say or mean integration by substitution. What I said was that I couldn't think of any approach other than integration by parts, and I gave what I think is the only feasible separation. Ordinary substitution clearly won't work here.
     
  6. Jun 9, 2010 #5

    Mark44

    Staff: Mentor

    What did you mean when you said "I tried to multiply by x'(=1)"?
     
  7. Jun 9, 2010 #6
    [tex]2 i \text{Li}_2\left(-e^{i x}\right)+\frac{i x^2}{2}-2 x \log
    \left(1+e^{i x}\right)+x \log (\cos (x)+1)[/tex]

    yea there's no way you're figuring that out from just integration by parts
     
  8. Jun 9, 2010 #7
    any mathematician can explain how to get to that conclusion?
     
  9. Jun 9, 2010 #8

    Char. Limit

    User Avatar
    Gold Member

    I was about to ask the same...

    Considering that e^(ix) appears as a term, I would assume that one of the steps involves splitting the cosine into two exponential functions using the identity...

    [tex]cos(z) = \frac{e^{iz}+e^{-iz}}{2}[/tex]

    And I'm looking at the Dilogarithm now... I've never seen it before, so I don't know how it would arrive.
     
  10. Jun 9, 2010 #9
    Complex number!!! Great. From real to imaginary... Anyway, I am really interested in this particular integral because i need it to integrate another function. This one x/sinx
    Take a look at the attached file to see why i need the integral of ln(cosx+1)
     

    Attached Files:

    Last edited: Jun 9, 2010
  11. Jun 9, 2010 #10
    What exactly is the context of this? These kind of things tend to pop out in math competitions, though they are usually definite integrals and it turns out there's some trick you can pull off with the bounds on the integral, given the right bounds.
     
  12. Jun 9, 2010 #11

    Char. Limit

    User Avatar
    Gold Member

    Hmm... yes, you will have imaginary numbers, considering that the integral of ln(cos(x)+1), given earlier, can be written...

    [tex]x\left(ln\left(cos\left(x\right)+1\right)+ln\left(1+e^{ix}\right)\right) + i \left(2 Li_2\left(-e^{ix}\right) + \frac{i x^2}{2}\right)[/tex]

    Hmm... I'm not saying this will help at all, but if you combined the logarithms in the left side, it might at least make the equation a bit simpler. Or maybe it will make the equation not understandable at all.
     
  13. Jun 9, 2010 #12
    What you did makes no sense on the last line. You found the integral of 1/sin x. However,

    [tex]
    \int \frac{x}{sin x} dx \neq \int x (\int \frac{1}{sin x}) dx
    [/tex]

    Which is what you are implying.

    EDIT: Oops, didn't see the prime.
     
  14. Jun 9, 2010 #13
    I am not implying this.

    EDIT: Oops, didn't see you edited your post

    Anyway(I have a feeling that i am using this word too many times recently), are my calculations correct ? Is there any shorter path to the solution?
     
    Last edited: Jun 9, 2010
  15. Jun 9, 2010 #14
    The context? My brain.
    One day i woke up and i said "Its time to integrate! Lets start with an easy one.... maybe this one: ln(cosx+1)! Its going to take half a second....(after half an hour)...Its impossible to integrate this!!!! Oh wait, the polite members of the physics forums could help a little..." And here we are, Guillaume de l'Hospital
     
  16. Jun 9, 2010 #15
    I think I can but I'm not a Mathematician: it takes a bunch of integration by parts. But first write it as:

    [itex]\int \log(1+\cos(x))dx=\frac{i x^2}{2}-2 x \text{log}\left[1+e^{i x}\right]+x \text{log}[1+\text{cos}[x]]+2 i \text{PolyLog}\left[2,-e^{i x}\right][/itex]

    and recall:

    [itex]\text{Polylog}[n,z]=\sum_{k=1}^{\infty}\frac{z^k}{k^n}[/itex]

    Now consider the last integration by parts (I'm jumping to the end):

    [itex]\int \log(1+e^{ix})dx[/itex]

    can you evaluate that integral in terms of that Polylog sum? So that gives the Polylog term. Now start from the beginning:

    [itex]\int \log(1+\cos(x))dx[/itex]

    You can do that one via parts and get a term:

    [itex]\int\frac{x\sin(x)}{1+\cos(x)}dx[/itex]

    Now express the sin and cos in terms of their complex exponential forms and then start doing more integration by parts.
     
    Last edited: Jun 9, 2010
  17. Jun 10, 2010 #16
    How did you get from [itex]\int \log(1+\cos(x))dx[/itex]
    to
    [itex]\frac{i x^2}{2}-2 x \text{log}\left[1+e^{i x}\right]+x \text{log}[1+\text{cos}[x]]+2 i \text{PolyLog}\left[2,-e^{i x}\right][/itex]
    ?
    Is this a property or something? Also, isn't the Reimann sum used in definite integrals?
     
  18. Jun 10, 2010 #17
    Ok, I have done some progress, even though i am afraid that i have abused the mathematical laws due to my limited knowledge of complex numbers. If i am correct, all i need is the integral
    of ln(e^(ix)-1)
     

    Attached Files:

    Last edited: Jun 10, 2010
  19. Jun 10, 2010 #18
    Reading that I think I completely failed in presenting the route to you. Start with:

    [tex]\int\log(1+\cos(x))dx[/tex]

    Let [itex]u=\log(1+\cos(x))[/itex] and [itex] dv=dx[/itex]

    then I get via parts:

    [tex]x\log(1+cos(x))+\int \frac{x\sin(x)}{1+\cos(x)}dx[/tex]

    Now:

    [tex]\int \frac{x\sin(x)}{1+\cos(x)}=\int\frac{x\left(\frac{e^{ix}-e^{-ix}}{2i}\right)}{1+\frac{e^{ix}+e^{-ix}}{2}}dx[/tex]

    Now simplify that exp expression and then approach the integral strictly in terms of the exponentials. Will have to do a few more integrations by parts. Also, I didn't look at the doc file in the other post.
     
    Last edited: Jun 10, 2010
  20. Jun 10, 2010 #19
    Now i understand what you meant but its gonna take a lot of integration by parts
     
  21. Jun 11, 2010 #20
    I did it !!!!! I have propably made some errors in some operations(i think thats how you call addition, substraction etc.) and in the sings(i think thats how you also call the "+" and "-") but the whole idea is correct. What i found really interesting is that it took me 2 lines to find integral of 1/sinx while it took me 24 lines(1 page and a half) to find the integral of x/sinx
    Also the integral of x/sinx is two times longer than the integral of 1/sinx and the first includes complex numbers while the second doesn't. Enough said, click on the attached file
    PS: The Wolfram mathematica answer is very different
     

    Attached Files:

  22. Jun 11, 2010 #21
    On the first line, you wrote

    [tex]
    \int \frac{\ln x}{x+1} = \int (\frac{1}{x})' \frac{1}{x+1}
    [/tex]

    This implies that ln x = (1/x)'.

    But (1/x)' = -1/x^2

    Unless I went blind again.
     
  23. Jun 12, 2010 #22
    Oh no no no no!!!!!! You are right!!!! (1/x)' is not lnx God the whole solution is wrong even from the first line!!!! I was tired the night i was writing that and i got confused
     
  24. Jun 12, 2010 #23
    Let me suggest a 21st cenury approach: Do each step and then verify it in Mathematica before going to the next step and in this way Mathematica "channels" you towards the correct (final)answer.
     
  25. Jun 16, 2010 #24
    hey one method i think is that first put cosx=t(t is some variable). then use log(1+t) series and expand. again after expanding put t=cosx. now if possible integrate or again use the series of cosx in terms of x. u may get the ans.
     
  26. Nov 18, 2011 #25
    Hi there I have solved this integral and found the exact answer applying integral by parts and trigonometric formulas only
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook