# Nasty Integral!

1. Jan 9, 2009

### sutupidmath

Hi,

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

$$\int_{0}^{\infty}ln^2(\frac{x^2}{x^2+3x+2})dx$$

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:

$$\int ln(x)ln(x+1)dx, \int ln(x+1)ln(x+2)dx, \int ln(x)ln(x+2)dx$$

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.

2. Jan 10, 2009

### gabbagabbahey

You probably also got integrals like $\int (\ln(x))^2dx$, $\int (\ln(x+1))^2dx$ and $\int (\ln(x+2))^2dx$ 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 $\int \ln(x)\ln(x+1)dx$....

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

$$\int \frac{\ln(x+1)}{x}dx$$

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

$$-\sum_{k=1}^{\infty}\frac{(-x)^k}{k^2}$$

Which is otherwise known as the special function PolyLogarithm: $-Li_2(-x)$

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. Jan 10, 2009

### sutupidmath

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. Jan 10, 2009

### sutupidmath

Well, i'm back.

I'm having trouble at some stage integrating

$$\int ln(x+1)ln(x+2)dx$$

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:

$$\int \frac{ln(x+2)}{x+1}dx$$

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:

$$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$$

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

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

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

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

$$\int \frac{ln(t+1)}{t}dt$$

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

$$\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}$$

Is this correct?

Last edited: Jan 10, 2009
5. Jan 10, 2009

### gabbagabbahey

Looks fine to me, although you may as well integrate that series before you switch back from t to x+1.

6. Jan 10, 2009

### sutupidmath

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 gonna do it, wayyyy toooo much work.

7. Jan 10, 2009

### MathematicalPhysicist

Which course gives you to work this hard? (-:

8. Jan 10, 2009

### sutupidmath

No, this is not for any course, it's just for fun. A friend of mine found this integral somewhere, he couldnt 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. Jan 12, 2009

### Gib Z

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. Jan 12, 2009

### Emreth

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. Jan 12, 2009

### Gib Z

How can that be when the integrand is strictly positive over the interval of integration?

12. Jan 12, 2009

### Emreth

Hmm did it with mathcad but yeah it does something weird, it shouldnt be zero.its something like 19.563.

13. Jan 12, 2009

### sutupidmath

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. Jan 12, 2009

### sutupidmath

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. Jan 12, 2009

### tim_lou

I'll take a crack at the first one,
use integration by parts give:
$$-\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]$$

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

where x(u) can be obtained solving
$$u=\frac{x^2}{x^2+3x+2}$$

v-substitution for v=ln u
$$\int_{0}^\infty v x(e^{-v})dv$$

use quadratic and stuff.. you'll get some nasty stuff of the form
$$\int_{0}^\infty \frac{v}{a+\sqrt{b+c e^v}}dv$$
and.... hmm, doesn't seem to work out quite right... so, let's see, pick a contour...

Last edited: Jan 12, 2009
16. Jan 12, 2009

### sutupidmath

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. Jan 12, 2009

### tim_lou

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. Jan 12, 2009

### sutupidmath

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. Jan 12, 2009

### tim_lou

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: Jan 12, 2009
20. Jan 12, 2009

### gabbagabbahey

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 dont 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 cant think of a thorough justification for each step ATM.