Integral of ln(cosx+1) - Basics & General Methods

  • Thread starter 3.1415926535
  • Start date
  • Tags
    Integral
In summary: I hope that helps.In summary, the integral of ln(cosx+1) can be solved using integration by parts and manipulating the expression to involve the Polylog function. However, this method may not be the most efficient and there may be other tricks or methods to solve this integral.
  • #1
3.1415926535
80
0
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))?
 
Physics news on Phys.org
  • #2
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)"?
 
  • #3
Mark44 said:
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)"?

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
 
  • #4
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.
 
  • #5
What did you mean when you said "I tried to multiply by x'(=1)"?
 
  • #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
 
  • #7
ice109 said:
[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

any mathematician can explain how to get to that conclusion?
 
  • #8
3.1415926535 said:
any mathematician can explain how to get to that conclusion?

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.
 
  • #9
Char. Limit said:
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.

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)
 

Attachments

  • equation.doc
    16.5 KB · Views: 453
Last edited:
  • #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.
 
  • #11
3.1415926535 said:
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)

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.
 
  • #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.
 
  • #13
l'Hôpital said:
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.

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:
  • #14
l'Hôpital said:
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.

The context? My brain.
One day i woke up and i said "Its time to integrate! Let's 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
 
  • #15
3.1415926535 said:
any mathematician can explain how to get to that conclusion?

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:
  • #16
jackmell said:
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.

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?
 
  • #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)
 

Attachments

  • equation.doc
    17.5 KB · Views: 341
Last edited:
  • #18
3.1415926535 said:
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?

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:
  • #19
jackmell said:
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] du=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.

Now i understand what you meant but its going to take a lot of integration by parts
 
  • #20
I did it ! I have propably made some errors in some operations(i think that's how you call addition, substraction etc.) and in the sings(i think that's 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
 

Attachments

  • equation.doc
    31 KB · Views: 422
  • #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.
 
  • #22
l'Hôpital said:
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.

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
 
  • #23
3.1415926535 said:
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

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.
 
  • #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.
 
  • #25
3.1415926535 said:
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))?

Hi there I have solved this integral and found the exact answer applying integral by parts and trigonometric formulas only
 

FAQ: Integral of ln(cosx+1) - Basics & General Methods

What is the general method for finding the integral of ln(cosx+1)?

The general method for finding the integral of ln(cosx+1) is to use integration by parts. This involves breaking down the integral into two parts, one of which can be easily integrated while the other can be differentiated. By using a specific formula, the integral can be solved.

Can the integral of ln(cosx+1) be solved using substitution?

Yes, the integral of ln(cosx+1) can also be solved using substitution. This involves substituting u = cosx+1 and then solving for the integral in terms of u. The final answer can then be converted back to the original variable, x.

Is there a specific range of values for which the integral of ln(cosx+1) is defined?

Yes, the integral of ln(cosx+1) is defined for all real values of x except for x = -π/2 + kπ, where k is an integer. This is because the natural logarithm function is not defined for negative values.

Can the integral of ln(cosx+1) be solved without using any specific formulas?

Yes, the integral of ln(cosx+1) can also be solved without using any specific formulas. This involves breaking down the integral into simpler integrals using algebraic manipulation and then solving each integral separately.

Are there any other methods for solving the integral of ln(cosx+1) besides integration by parts and substitution?

Yes, there are other methods for solving the integral of ln(cosx+1) such as using trigonometric identities and partial fraction decomposition. However, these methods may not be as efficient as integration by parts or substitution in this particular case.

Back
Top