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
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
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
2008/10/31 William Stein <wst...@gmail.com>:
Jim