arcsinh(1) == ln(1+sqrt(2)) ?

849 views
Skip to first unread message

Jim Clark

unread,
Oct 31, 2008, 3:57:48 PM10/31/08
to sage-s...@googlegroups.com
Hello sage gurus,

Using sage to check a manually calculated integral :

sage: var('r,h')
(r, h)
sage: integrate(r/sqrt(r^2 - sqrt(2)*h*r + h^2), r, 0, sqrt(2)
*h).factor()
sqrt(2)*arcsinh(1)*h

My manual result (using an old table of integrals) was sqrt(2)*ln(sqrt
(2)+1)*h

So, wondering whether arcsinh(1) = ln(sqrt(2)+1), I asked:

sage: bool(arcsinh(1) == ln(1+sqrt(2)))
False

but then,

sage: arcsinh(1).n()
0.881373587019543
sage: ln(1+sqrt(2)).n()
0.881373587019543

They look equal to my eyes...

Also,
sage: bool(arcsinh(1).n() == ln(1+sqrt(2)).n())
False

What am I missing here?

Thanks,
Jim Clark

William Stein

unread,
Oct 31, 2008, 4:37:07 PM10/31/08
to sage-s...@googlegroups.com

If expr is a symbolic expression in Sage, then

bool(expr)

evaluates to True only if expr can be proved to be True.
Otherwise it always evaluates to False.

The actual code that decides this is currently in Maxima.

-- William

Jason Grout

unread,
Oct 31, 2008, 4:51:24 PM10/31/08
to sage-s...@googlegroups.com


In this case:

sage: arcsinh(1).n() - ln(1+sqrt(2)).n()
1.11022302462516e-16

So the computer doesn't quite think that they are equal.

Jason

John Cremona

unread,
Oct 31, 2008, 4:51:53 PM10/31/08
to sage-s...@googlegroups.com
arcsinh(x) = log(1+sqrt(1+x^2)), I seem to remember. [Proof: exercise]

John Cremona

2008/10/31 William Stein <wst...@gmail.com>:

Jim Clark

unread,
Oct 31, 2008, 5:07:10 PM10/31/08
to sage-s...@googlegroups.com
Thanks to all. Your responses have been helpful.

Jim

Robert Dodier

unread,
Nov 3, 2008, 10:07:05 PM11/3/08
to sage-support
William Stein wrote:

> If expr is a symbolic expression in Sage, then
>
> bool(expr)
>
> evaluates to True only if expr can be proved to be True.
> Otherwise it always evaluates to False.
>
> The actual code that decides this is currently in Maxima.

Actually Maxima is equipped to return unknown as well as
true or false, but in this case it is jumping to a conclusion.
Maxima attempts to determine the sign of asinh(1) - log(1 + sqrt(2))
via numerical evaluation, which yields a small positive residual,
and therefore the spurious result; this is a bug.

The undocumented flag signbfloat governs the numerical test:

is (equal (asinh(1), log(1 + sqrt(2)))), signbfloat=false;
=> unknown

I know this is little consolation, but I';ll forward a bug report to
the Maxima mailing list to see what we can do.

FWIW

Robert Dodier
Reply all
Reply to author
Forward
0 new messages