Skip to content

failing calculation of an integral #11233

@sagetrac-casamayou

Description

@sagetrac-casamayou

In the following calculation, Sage4.6.2 returns the opposite of the right result :

sage: var('a t')
(a, t)
sage: assume(a>0)
sage: assume(x>0)
sage: f = integrate(log(1+a/(x * t)^2), t, 1, oo)
sage: f
(sqrt(a)*x*log((x^2 + a)/x^2) - 2*a*arctan(sqrt(a)/x))/(sqrt(a)*x)
sage: f.subs(x=1, a=7).n()
-4.32025625668262

For information, Sage 4.6 gives the right result :

sage: var('a t')
(a, t)
sage: assume(a>0)
sage: assume(x>0)
sage: f = integrate(log(1+a/(x * t)^2), t, 1, oo)
sage: f
pi*sqrt(a)/x - (x*log((x2 + a)/x2) + 2*sqrt(a)*arctan(x/sqrt(a)))/x
sage: f.subs(x=1, a=7).n()
4.32025625668262

For information, Maple9 gives this :

> assume(a>0): assume(x>0):
> f := int(ln(1+a/(x * t)^2), t=1..infinity):
> lprint(f);
(2*ln(x)*x-2*a^(1/2)*arctan(x/a^(1/2))-ln(x^2+a)*x+a^(1/2)*Pi)/x
> evalf(subs(x=1, a=7, f));
bytes used=4000512, alloc=3341724, time=0.13
                                4.320256257

Upstream: Fixed upstream, in a later stable release.

CC: @zimmermann6

Component: calculus

Keywords: integrate

Author: Michael Orlitzky

Reviewer: Paul Zimmermann

Merged: sage-5.1.beta0

Issue created by migration from https://trac.sagemath.org/ticket/11233

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions