How to Solve Complex Logarithmic Integrals?

In summary, the integrand for the last integral is impossible to integrate and involved series expansion.
  • #1
sutupidmath
1,630
4
Hi,

I was trying to solve the following integral, but i don't seem to get anywhere.

[tex]\int_{0}^{\infty}ln^2(\frac{x^2}{x^2+3x+2})dx[/tex]


I played around with it, but got to a dead end each time.

At some point i get to integrating the following, which seem equaly difficult:

[tex]\int ln(x)ln(x+1)dx, \int ln(x+1)ln(x+2)dx, \int ln(x)ln(x+2)dx[/tex]

About the last ones, i was thinking for some series expansion, but it looks too nasty, and i am not even sure how to really go about it.


Any hints would be greatly appreciated.
 
Physics news on Phys.org
  • #2
sutupidmath said:
Hi,

I was trying to solve the following integral, but i don't seem to get anywhere.

[tex]\int_{0}^{\infty}ln^2(\frac{x^2}{x^2+3x+2})dx[/tex]I played around with it, but got to a dead end each time.

At some point i get to integrating the following, which seem equaly difficult:

[tex]\int ln(x)ln(x+1)dx, \int ln(x+1)ln(x+2)dx, \int ln(x)ln(x+2)dx[/tex]

About the last ones, i was thinking for some series expansion, but it looks too nasty, and i am not even sure how to really go about it.Any hints would be greatly appreciated.

You probably also got integrals like [itex]\int (\ln(x))^2dx[/itex], [itex]\int (\ln(x+1))^2dx[/itex] and [itex]\int (\ln(x+2))^2dx[/itex] correct?

Did you have any trouble dealing with those? If so, I'd deal with them first since they are a little easier than the other 3.Anyways, Let's take a look at [itex]\int \ln(x)\ln(x+1)dx[/itex]...

Start by integrating by parts once using [itex]u=\ln(x)[/itex] and [itex]dv=\ln(x+1)dx[/itex]; you should arrive at a bunch of terms minus the integral

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

Here is where you want to involve series; use the Taylor series of [itex]\ln(1+x)[/itex] to find the series representation of the integrand and then integrate it term by term. You should end up with the series

[tex]-\sum_{k=1}^{\infty}\frac{(-x)^k}{k^2}[/tex]

Which is otherwise known as the special function PolyLogarithm: [itex]-Li_2(-x)[/itex]

Apply a similar methodology to the other two integrals, then simplify your total integral as much as possible (to remove any singularities\diverging sums) before substituting in the limits.
 
  • #3
This is exactly what i have done so far, with the exception of involving series representation, which i wasn't sure would be the best way.

I didn't have any problem with those integrals that you listed, i managed to do them pretty easily, it was only this latter part that required me to involve series representation that bothered me.

Well, i'll try to crack it now, and see whether i can get it done. If not, i'll be around..hehe..


Thanks a lot.
 
  • #4
Well, I'm back.


I'm having trouble at some stage integrating

[tex]\int ln(x+1)ln(x+2)dx[/tex]

If all my calculations are right, at some stage towards the end i am comming up with an integral of the form, and i am having trouble finding a series representation for that function:


[tex]\int \frac{ln(x+2)}{x+1}dx[/tex]


THe deal is that i couldn't find a series reperesentation for the integrand.

By doing some manipulations, here it is where i came to:


[tex]ln(x+2)=\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{2^n}\frac{x^n}{n}=\sum_{n=1}^{\infty}\frac{1}{2^n}\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}x^n=\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}x^n[/tex]

But now when i divide ln(x+2) by (x+1) i get stuck.


Edit: THis was quick, i think i got it, here is what i do:


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


Now, i take the substitution x+1=t, and i get, dx=dt, so


[tex]\int \frac{ln(t+1)}{t}dt[/tex]

Now, i know the series for this function, since i have done while doing the other integrals, and we get


[tex]
\frac{ln(t+1)}{t}=\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}t^{n-1}=\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}(x+1)^{n-1}[/tex]

Is this correct?
 
Last edited:
  • #5
Looks fine to me, although you may as well integrate that series before you switch back from t to x+1.
 
  • #6
gabbagabbahey said:
Looks fine to me, although you may as well integrate that series before you switch back from t to x+1.

This was the longes integral i have ever done in my life, it took me 8 full A4 pages to do only the indefinite integral of it,(just the final result is about half a page) i haven't yet even started to take the limit,and i don't think i am even going to do it, wayyyy toooo much work.
 
  • #7
Which course gives you to work this hard? (-:
 
  • #8
loop quantum gravity said:
Which course gives you to work this hard? (-:

No, this is not for any course, it's just for fun. A friend of mine found this integral somewhere, he couldn't crack it at all, so he asked me if i could come up with something. So, this is how the story begins.

However, i wasn't that sure only when it came into using power series for some functions there, i hoped there would be some elementary and easier way to go about it, without using series, ( i was too lazy to invite them(series) into play) so that's why i posted the problem here. But, obviously using series seems to be inevitable.
 
  • #9
The replacement of the natural logarithm by its Taylor Series is incorrect, as the interval of integration is much larger than the radius of convergence for that series.
 
  • #10
There should be no closed form result for this problem, so if you expand your series enough, you can get a 2 page answer as well.The answer is 0.
 
  • #11
How can that be when the integrand is strictly positive over the interval of integration?
 
  • #12
Hmm did it with mathcad but yeah it does something weird, it shouldn't be zero.its something like 19.563.
 
  • #13
Gib Z said:
The replacement of the natural logarithm by its Taylor Series is incorrect, as the interval of integration is much larger than the radius of convergence for that series.
So, what do you suggest?

(P.S. If i was interested only in finding the indefinite integral of that, then the procedure would be correct, right?)
 
  • #14
Emreth said:
Hmm did it with mathcad but yeah it does something weird, it shouldn't be zero.its something like 19.563.

Well, it sounds illogical to me for the result to be zero, because like Gib Z mentioned, the integrand is strictly positive, and we are findint the area of a strictly positive function, so how can it be that we are not accumulating any area at all on the interval (0,infinity) ?
 
  • #15
I'll take a crack at the first one,
use integration by parts give:
[tex]-\int_0^\infty 2x\left[\ln\left(\frac{x^2}{x^2+3x+2}\right)\right] d\left[\ln\left(\frac{x^2}{x^2+3x+2}\right)\right][/tex]

u-substitution for the thing inside ln
[tex]-\int_0^1 2x(u) \ln u\frac{du}{u}[/tex]

where x(u) can be obtained solving
[tex]u=\frac{x^2}{x^2+3x+2}[/tex]

v-substitution for v=ln u
[tex]\int_{0}^\infty v x(e^{-v})dv[/tex]


use quadratic and stuff.. you'll get some nasty stuff of the form
[tex]\int_{0}^\infty \frac{v}{a+\sqrt{b+c e^v}}dv[/tex]
and... hmm, doesn't seem to work out quite right... so, let's see, pick a contour...
 
Last edited:
  • #16
tim_lou said:
[/tex]



[tex]\int_{0}^\infty \frac{v}{a+\sqrt{b+c e^v}}dv[/tex]
and... hmm, doesn't seem to work out quite right... so, let's see, pick a contour...


I am not familiar with contour integration at all.

But, what is wrong with what i did? Or better saying, how would one 'fix' the flaw that the series i have used is convergent on the interval |x|<1,(roughly speaking), while we are integrating on the interval 0 to infinity.?
 
  • #17
Well, the log expansion does not converge absolutely and so it is quite sketchy to exchange the order of integration and summation. I'm quite certain that these manipulations often yield wrong results.
 
  • #18
tim_lou said:
Well, the log expansion does not converge absolutely and so it is quite sketchy to exchange the order of integration and summation. I'm quite certain that these manipulations often yield wrong results.

I think all it matters is if the series is uniformly convergent on the interval of convergence, and i think that power series all converge uniformly on their interval of convergece, so i am supposing that the power series representation for these functions here also converges uniformly on their interval of convergece, so i think that we can swicht the sumation and integral sign, in other words we can integrate the series term by term. Or is my reasoning totally wrong?
 
  • #19
The problem with conditional convergence is that the order of summation matters. In principle I can order the different terms around and get any answer I want. Integration is pretty much another summation sign. when you switch the two, you are effectively changing the order of summations.

I'm not saying it absolutely doesn't work, but a justification is necessary, and I'm doubtful that it actually works. So if I were you i'll just try to change the integral around so that this problem doesn't arise.
 
Last edited:
  • #20
tim_lou said:
I'm not saying it absolutely doesn't work, but a justification is necessary, and I'm doubtful that it actually works. So if I were you i'll just try to change the integral around so that this problem doesn't arise.

Well it does turn out to work in the end, I did the integration using the series and got a final result which matched mathematica's. However, I am struggling to find a justification myself.

As GibZ pointed out, replacing the logs with their taylor series is questionable when those series don't converge on the interval we're interested in. In took a lot of reordering of terms in the final expression in order to remove all the infinities; and I can't think of a thorough justification for each step ATM.
 
  • #21
Mathematica's integrator will give back expressions valid only on a certain interval if it can not find a general expression. I'm going on my hunch that there is no such general expression.
 
  • #22
Gib Z said:
Mathematica's integrator will give back expressions valid only on a certain interval if it can not find a general expression. I'm going on my hunch that there is no such general expression.

Yes, but it also tells you any assumptions made about the interval. In this case there are none, and the closed form solution matches the numerical solution on the interval [itex](0,\infty)[/itex].

The end result is convergent on that entire interval; so I think all that is required is a justification of the use of the taylor series and term by term integration of them.
 
  • #23
What did u get for your final answer? I'm just trying to see whether it matches my answer, since i don't have mathematica to compare my result.

Thnx
 
  • #24
The polylogarithms may be defined solely in terms of integrals (for arbitrary z)

[tex]\operatorname{Li}_{s+1}(z) = \int_0^z dt~\frac{\operatorname{Li}_s(t)}{t}[/tex]

with the special case of s = 1 being [itex]\operatorname{Li}_1(z) = -\ln(1-z)[/itex].

Hence, [itex]\operatorname{Li}_2(z)[/itex]., which appears in Mathematica's solution to the integral, can be written

[tex]\operatorname{Li}_{2}(z) = -\int_0^zdt~ \frac{\ln(1-t)}{t}[/tex]

So, I would imagine that in the integration by parts one merely arrives at the integral expression for this polylogarithm, and one need not resort to a taylor series to obtain the result.
 
  • #25
Mute said:
So, I would imagine that in the integration by parts one merely arrives at the integral expression for this polylogarithm, and one need not resort to a taylor series to obtain the result.


Well, somewhere down the line we arrive at integrals like this:


[tex]\int \frac{ln(x+1)}{x}dx,\int \frac{ln(x+2)}{x+1}dx, etc[/tex]

So, if we were to integrate from 0 to infinity, then what would the value(numerical value) of these integrals be. (im not that familiar with polylogarithm function, if at all)?
 
  • #26
sutupidmath said:
What did u get for your final answer? I'm just trying to see whether it matches my answer, since i don't have mathematica to compare my result.

Thnx

After a fair bit of work, I got [tex]\frac{11\pi^2}{6}+2(\ln 2)^2 \approx 19.0552[/tex]
 
  • #27
Mute said:
The polylogarithms may be defined solely in terms of integrals (for arbitrary z)

[tex]\operatorname{Li}_{s+1}(z) = \int_0^z dt~\frac{\operatorname{Li}_s(t)}{t}[/tex]

with the special case of s = 1 being [itex]\operatorname{Li}_1(z) = -\ln(1-z)[/itex].

Hence, [itex]\operatorname{Li}_2(z)[/itex]., which appears in Mathematica's solution to the integral, can be written

[tex]\operatorname{Li}_{2}(z) = -\int_0^zdt~ \frac{\ln(1-t)}{t}[/tex]

So, I would imagine that in the integration by parts one merely arrives at the integral expression for this polylogarithm, and one need not resort to a taylor series to obtain the result.

Thanks mute, I think that does the trick since that is defined for arbitrary z.
 
  • #28
My results:


[tex]\int ln^2\left(\frac{x^2}{x^2+3x+2}\right) dx=2\int ln^2(x)dx-4\int ln(x)ln(x+1)dx-4\int ln(x)ln(x+2)dx+\int ln^2(x+1)dx+2\int ln(x+1)ln(x+2)dx+\int ln^2(x+2)dx[/tex]

From here i have evaluated each integral, and they are as follows:

[tex]\int ln^2(x)dx=x^2ln^2(x)-2xln(x)-2x+C[/tex] (since we will be taking into account the limit, i guess i can leave out the constant C)

[tex]\int ln(x)ln(x+1)dx=ln(x)[(x+1)ln(x+1)-x]+2x-(x+1)ln(x+1)-\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n^2}x^n[/tex]

[tex]\int ln(x)ln(x+2)dx=ln(x)[(x+2)ln(x+2)-x]-(x+2)ln(x+2)+2x-2\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n^2}x^n[/tex]

[tex]\int ln^2(x+1)dx=xln^2(x+1)-2xln(x+1)+ln^2(x+1)-2ln(x+1)+2x[/tex]


[tex]\int ln(x+1)ln(x+2)dx=ln(x+1)[(x+2)ln(x+2)-x]-(x+2)ln(x+2)+2x-\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n^2}(x+1)^n-ln(x+1)[/tex]


[tex]\int ln^2(x+2)dx=xln^2(x+2)-2xln(x+2)+ln^2(x+2)-2ln(x+2)+2x[/tex]

This is what i have got for the indefinite integrals.
 
Last edited:
  • #29
sutupidmath said:
My results:[tex]\int ln^2\left(\frac{x^2}{x^2+3x+2}\right) dx=2\int ln^2(x)dx-4\int ln(x)ln(x+1)dx-4\int ln(x)ln(x+2)dx[/tex]

[tex]+\int ln^2(x+1)dx+2\int ln(x+1)ln(x+2)dx+\int ln^2(x+2)dx[/tex]

The coefficient of your first term on RHS should be 4 not 2.

From here i have evaluated each integral, and they are as follows:

[tex]\int ln^2(x)dx=x^2ln^2(x)-2xln(x)-2x+C[/tex] (since we will be taking into account the limit, i guess i can leave out the constant C)

You have a sign error; it should be +2x not -2x.
[tex]\int ln(x)ln(x+1)dx=ln(x)[(x+1)ln(x+1)-x]+2x-(x+1)ln(x+1)-\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n^2}x^n[/tex]

Instead of using the series (which doesn't converge over the interval we are interested in, it is better to use the definition of PolyLogarithm Mute gave to show that

[tex]\int \frac{\ln(x+1)}{x}dx=-\operatorname{Li}_2(-x)[/tex]

And hence:

[tex]\int \ln(x)\ln(x+1)dx=\ln(x)[(x+1)\ln(x+1)-x]+2x-(x+1)\ln(x+1)+\operatorname{Li}_2(-x)[/tex]

[tex]\int ln(x)ln(x+2)dx=ln(x)[(x+2)ln(x+2)-x]-(x+2)ln(x+2)+2x-2\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n^2}x^n[/tex]

Again; avoid the divergent series by showing that

[tex]\int \frac{\ln(x+2)}{x}dx=\ln(2)\ln(x)-\operatorname{Li}_2(\frac{-x}{2})[/tex]

And Hence:

[tex]\int \ln(x)\ln(x+2)dx=\ln(x)[(x+2)\ln(x+2)-x]-(x+2)\ln(x+2)+2x-\ln(2)\ln(x)+\operatorname{Li}_2\left( \frac{-x}{2}\right)[/tex]

[tex]\int ln^2(x+1)dx=xln^2(x+1)-2xln(x+1)+ln^2(x+1)-2ln(x+1)+2x[/tex]

Good.

[tex]\int ln(x+1)ln(x+2)dx=ln(x+1)[(x+2)ln(x+2)-x]-(x+2)ln(x+2)+2x-\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n^2}(x+1)^n-ln(x+1)[/tex]

Again, avoid the series by showing

[tex]\int \frac{\ln(x+2)}{x+1}dx=-\operatorname{Li}_2(-(x+1))[/tex]

And Hence:

[tex]\int \ln(x+1)\ln(x+2)dx=\ln(x+1)[(x+2)\ln(x+2)-(x+1)]-(x+2)\ln(x+2)+2x+\operatorname{Li}_2(-(x+1))[/tex]

[tex]\int ln^2(x+2)dx=xln^2(x+2)-2xln(x+2)+ln^2(x+2)-2ln(x+2)+2x[/tex]

This is what i have got for the indefinite integrals.

There is a small error, you should get:

[tex]\int \ln^2(x+2)dx=(x+2)\ln^2(x+2)-2(x+2)\ln(x+2)+2x[/tex]

Fix those errors and then add up your terms and cancel as much as possible to show that

[tex]\int \ln^2\left(\frac{x^2}{x^2+3x+2}\right) dx=8\ln(2)\ln(x) + 4 x\ln^2(x)- 4 (x+1)\ln(x)\ln(x+1) + (x+1)\ln^2(x+1) - 4 (x+2)\ln(x)\ln(x+2)[/tex]

[tex]+2 (x+2)\ln(x+1)\ln(x+2)+ (x+2)\ln^2(x+2) + 2\operatorname{Li}_2(-(x+1))-4\operatorname{Li}_2(-x)-8\operatorname{Li}_2\left(-\frac {x} {2} \right)[/tex]

After you do that, I'll help you through incorporating the limits.
 
Last edited:
  • #30
Also, before we incorporate the limits, you'll want to read this wiki on the polylogarithm

Pay special attention to the 'limiting behaviour' and 'DiLogarithm' sections.
 
  • #31
gabbagabbahey said:
The coefficient of your first term on RHS should be 4 not 2.



You have a sign error; it should be +2x not -2x.




Instead of using the series (which doesn't converge over the interval we are interested in, it is better to use the definition of PolyLogarithm Mute gave to show that

[tex]\int \frac{\ln(x+1)}{x}dx=-\operatorname{Li}_2(-x)[/tex]

And hence:

[tex]\int \ln(x)\ln(x+1)dx=\ln(x)[(x+1)\ln(x+1)-x]+2x-(x+1)\ln(x+1)+\operatorname{Li}_2(-x)[/tex]



Again; avoid the divergent series by showing that

[tex]\int \frac{\ln(x+2)}{x}dx=\ln(2)\ln(x)-\operatorname{Li}_2(\frac{-x}{2})[/tex]

And Hence:

[tex]\int \ln(x)\ln(x+2)dx=\ln(x)[(x+2)\ln(x+2)-x]-(x+2)\ln(x+2)+2x-\ln(2)\ln(x)+\operatorname{Li}_2\left( \frac{-x}{2}\right)[/tex]



Good.



Again, avoid the series by showing

[tex]\int \frac{\ln(x+2)}{x+1}dx=-\operatorname{Li}_2(-(x+1))[/tex]

And Hence:

[tex]\int \ln(x+1)\ln(x+2)dx=\ln(x+1)[(x+2)\ln(x+2)-(x+1)]-(x+2)\ln(x+2)+2x+\operatorname{Li}_2(-(x+1))[/tex]



There is a small error, you should get:

[tex]\int \ln^2(x+2)dx=(x+2)\ln^2(x+2)-2(x+2)\ln(x+2)+2x[/tex]

Fix those errors and then add up your terms and cancel as much as possible to show that

[tex]\int \ln^2\left(\frac{x^2}{x^2+3x+2}\right) dx=8\ln(2)\ln(x) + 4 x\ln^2(x)- 4 (x+1)\ln(x)\ln(x+1) + (x+1)\ln^2(x+1) - 4 (x+2)\ln(x)\ln(x+2)[/tex]

[tex]+2 (x+2)\ln(x+1)\ln(x+2)+ (x+2)\ln^2(x+2) + 2\operatorname{Li}_2(-(x+1))-4\operatorname{Li}_2(-x)-8\operatorname{Li}_2\left(-\frac {x} {2} \right)[/tex]

After you do that, I'll help you through incorporating the limits.


I have few comments:

1. Shouldn't we on the last result have [tex]4x^2ln^2(x)[/tex] instead of plain x, without square?

2. also, here

[tex]\int \frac{ln(x+2)}{x}dx=\int \frac{ln[2(1-(-\frac{x}{2}))]}{x}dx=\int \frac{ln(2)}{x}+\int \frac{[1-(-\frac{x}{2})]}{-2*\frac{-x}{2}}=ln(2)ln(x)+\frac{1}{2}Li_2(\frac{-x}{2})[/tex]

If so then we would have a slight change on our final result: i.e.

we would have [tex]4ln(2)ln(x)+2Li(-\frac{x}{2})[/tex]

Or, am i missing something here?


Other than these, i managed to bring the expression to match that of yours.
 
Last edited:
  • #32
sutupidmath said:
I have few comments:

1. Shouldn't we on the last result have [tex]4x^2ln^2(x)[/tex] instead of plain x, without square?

Nope, I overlooked an error in your first integral; you should have

[tex]\int \ln^2(x)dx=x\ln^2(x)-2x\ln(x)+2x[/tex]

That gets rid of the x squared thing
2. also, here

[tex]\int \frac{ln(x+2)}{x}dx=\int \frac{ln[2(1-(-\frac{x}{2}))]}{x}dx=\int \frac{ln(2)}{x}+\int \frac{[1-(-\frac{x}{2})]}{-2*\frac{-x}{2}}=ln(2)ln(x)+\frac{1}{2}Li_2(\frac{-x}{2})[/tex]

Nope, you need to use

[tex]\operatorname{Li}_2\left( \frac{-x}{2}\right)=-\int \frac{\ln[1-(-\frac{x}{2})]}{\frac{-x}{2}} d\left( \frac{-x}{2} \right)\neq -\int \frac{\ln[1-(-\frac{x}{2})]}{\frac{-x}{2}} dx[/tex]

:wink:
 

Related to How to Solve Complex Logarithmic Integrals?

1. What is "Stuck with Integral: Seeking Help"?

"Stuck with Integral: Seeking Help" is a common phrase used to describe a situation where a person is struggling to solve a mathematical integral and is seeking assistance or guidance.

2. Why do people get stuck with integrals?

Integrals can be challenging because they require a deep understanding of mathematical concepts and techniques. They often involve multiple steps and require precision and attention to detail. Additionally, there are various methods for solving integrals, so it can be confusing to determine the best approach.

3. What are some strategies for getting unstuck with integrals?

One strategy is to review the fundamental concepts and techniques of integration, such as the power rule, substitution, and integration by parts. It can also be helpful to break the integral into smaller, more manageable parts or to try different methods of solving. Seeking help from a tutor or classmate can also provide valuable insights and assistance.

4. How can technology help with solving integrals?

There are various online tools and software programs that can help with solving integrals. These tools can provide step-by-step solutions, graphing capabilities, and even help with checking the final answer. However, it is important to use these tools as a supplement and not rely on them entirely for solving integrals.

5. What are some common mistakes to avoid when solving integrals?

Some common mistakes to avoid include forgetting to apply the correct rule or formula, making calculation errors, and not checking the final answer for correctness. It is also important to pay attention to the limits of integration and to use proper notation when writing out the solution.

Similar threads

Replies
8
Views
225
Replies
14
Views
1K
Replies
6
Views
892
Replies
3
Views
364
Replies
5
Views
1K
Replies
19
Views
3K
Replies
3
Views
1K
Replies
1
Views
976
Replies
4
Views
2K
Back
Top