Ask Your Question
1

improper integral error?

asked 2015-03-11 14:33:19 +0100

rafarob gravatar image

Is there an alternative way to calculate this improper integral?

integral(log(x)/(x^2 - 1),x,0,infinity)

the integral is convergent to pi^2/4 but Sage says divergent.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2015-03-11 15:16:02 +0100

rws gravatar image

Always try the other available "algorithms":

sage: integral(log(x)/(x^2 - 1),x,0,infinity, algorithm='mathematica_free')
-1/2*log(x + 1)*log(x) - 1/2*polylog(2, -x) - 1/2*polylog(2, -x + 1)

See http://sagemath.org/doc/reference/cal...

edit flag offensive delete link more

Comments

Though this algorithm requires the internet. Interestingly, using algorithm='sympy' gives AttributeError: 'NonElementaryIntegral' object has no attribute '_sage_'.

kcrisman gravatar imagekcrisman ( 2015-03-11 16:06:55 +0100 )edit

Unfortunately, the mathematica_free algorithm will not work from within Sage Math Cloud with current connection settings.

calc314 gravatar imagecalc314 ( 2015-03-11 16:10:25 +0100 )edit

But the correct answer is a numerical value or exact expression pi^2/4. So, algorithm = 'mathematica_free' doesn't work.

rafarob gravatar imagerafarob ( 2015-03-11 17:39:28 +0100 )edit
1

answered 2015-03-12 15:44:13 +0100

calc314 gravatar image

With the algorithm set to mathematica_free, Sage is returning the antiderivative even though you are asking for the improper integral. You can get the improper integral by doing the following:

f=integral(log(x)/(x^2 - 1),x,algorithm='mathematica_free')
limit(f,x=oo)-limit(f,x=0)

This returns pi^2/4.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-03-11 14:33:19 +0100

Seen: 1,354 times

Last updated: Mar 11 '15