# Mathematica Integrating

1. Jul 13, 2009

### ritwik06

1. The problem statement, all variables and given/known data

Integrate:
$$\frac{Log[1+x]}{1+x^{2}}$$

2. Relevant equations
Integration by parts.

3. The attempt at a solution

If the integration is easier than what I think. Please lemme know how to get started.
I used integration by parts to get uptil here:

I=ln(1+x)ArcTan(x)- $$\int\frac{ArcTan(x)}{1+x}$$

2. Jul 13, 2009

### maverick280857

Re: Integration

You haven't described your attempt at a solution. Anyway, here's some info on polylog: http://functions.wolfram.com/ZetaFunctionsandPolylogarithms/PolyLog/

A possible method for solving this problem did occur to me, but I'm trying to stitch together the details of the solution. (Simple integration by parts will yield nothing if you integrate the second integrand by parts once again.)

Consider

$$I(a) = \int \frac{log(1+ax)}{1+x^2}dx$$

Then your integral is just I(a=1).

Differentiate under the integral wrt a:

$$\frac{\partial I(a)}{\partial a} = \int \frac{1}{(1+x^2)(1+ax)}dx$$

Can you express the integrand in terms of partial fractions, and integrate term, thereby obtaining a function of x and a. Then you need to integrate it wrt a. Once again, this may be messy -- esp the integration wrt a...I am still figuring out the details. Offhand, one can express (x^2 + 1) = (x+i)(x-i) and do an expansion. (All this is assuming that you have to compute the indefinite integral.)

Let me see if it works...I'll think of some other way too. Meanwhile, post your solution...the one you must've tried on paper (before resorting to Mathematica.)

3. Jul 13, 2009

### ritwik06

Re: Integration

Thanks a lot, I have already read that from Mathematica. Its a series. I have never done anything with PolyLog b4.
Well, In all my possible attempts to solve the question, I was unsuccessful, therefore I didnt mention them. Here is a list of all the things i did:
1. Tried Integration by parts. I did what I had shown in my last post. If I again apply integration by parts on the ArcTan thing, I again get the same integral I started with. It was of no use.
2. I tried a lot many substitutions there. Here is a list:
1+x= Exp[t]
x=Tan[t]
Log[1+x]=t
etc.
But with either of them, I reached no fruitful result. Then I had no other option but to resort to Mathematica, and I was kinda shocked to see the results. Do you want me to show the substitutions. I think it would be a waste of time.
I have knowledge of partial derivatives but I was never taught that I could do that within integrals. But after seeing this method, I have figured out how it was done. It was simply fascinating. Thanks. But the problem persists.
Using partial fractions, and standard formulae for integrating the 1/ Linear and Linear /Quadratic forms, I arrived at :
$$\frac{2ArcTan[x]+2*a*ln(1+ax)-a*ln(1+x^2)}{2(1+a^{2})}$$

But If you please consider the second term there ->
$$\frac{a*ln(1+ax)}{(1+a^{2})}$$
Had I known how to integrate that wrt a, I would have done the original integral myself. I also got that term in one of my substitutions.
Yup! I have to compute the indefinite integral.
I have already told ya about hat all I did. If you still wish to see the calculations part, I will upload some pages from my notebook where I attempted the question.
Thanks for the help!
Ritwik

4. Jul 13, 2009

### ritwik06

Re: Integration

well, A, B and C do not come independent of a in there. For eg. B= 1/(2(i-a)) there.
But I can express $$\frac{1}{(x+i)(x-i)(1+ax)}$$ as $$\frac {-i}{(2 (1 + ax) (-i + x))} +\frac{i}{(2 (1 + ax) (i + x))}$$

5. Jul 13, 2009

### maverick280857

Re: Integration

Scratch that..its getting messy. I don't think it'll work because you can't write the last integral in closed form anyway.

But I get the feeling the original integral too can only be series-expanded. I am somewhat out of touch here, but I do remember having encountered this integral in school...and if I remember correctly, I had to series expand the logarithm function. Maybe I am confusing it with another similar looking integrand.

Where did you encounter this problem? Can you tell me the exact source?

6. Jul 13, 2009

### ritwik06

Re: Integration

Never mind. Take your time. I am in no hurry.
Well, I got this in my class for maths. And my teacher said it was a challenging problem. But I dont think this integral can be done while remaining within the limits of our course. as a matter of fact, we will be told about the solution tomorrow. If at all it makes sense to me, I will surely post it tomorrow.
regards,
Ritwik
PS. Thanks again for the help.

7. Jul 13, 2009

### maverick280857

Re: Integration

Well, I found closely related integrals in my tables which have only series expansions.

Maybe your instructor wants you to expand log(1+x) and integrate each term which is of the form

$$a_{n}\int \frac{x^n}{x^2 + 1} dx$$

(which is integrable by the way)

and write the result as an infinite series (where I've written $\log(1+x) = \sum_{n=0}^{\infty}a_{n}x^{n}$). The other way out could be to integrate by parts once and use a series expansion for $\tan^{-1}x$ to express the second integral,

$$\int \frac{\tan^{-1}x}{1+x}dx$$

as a power series in x.

Try the first route. All you need is the power series expansion for log(1+x). This is given here: http://en.wikipedia.org/wiki/Natural_logarithm#Derivative.2C_Taylor_series. Note that the power series converges for |x| < 1. (No need to worry about the technicalities for now, just keep in mind that the final "series" or "function" you get will be valid only for x lying in this interval.)