[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] wrong sign in limit?
From: |
Ralf Hemmecke |
Subject: |
Re: [Axiom-developer] wrong sign in limit? |
Date: |
Sun, 26 Sep 2010 22:51:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 |
I agree that the result is questionable, but what result do you expect?
This one is perhaps better
(0) -> limit(sqrt(a^2+x), x=0)
+--+
| 2
(0) \|a
Type:
Union(OrderedCompletion(Expression(Integer)),...)
As long as nothing is known about a, that expression cannot be
simplified further. In fact sqrt stands for *two* solutions.
Look into trigcat.spad.pamphlet.
RadicalCategory(): Category == with
sqrt : % -> %
++ sqrt(x) returns the square root of x. The branch cut lies
++ along the negative real axis, continuous with quadrant II.
Even if we agree on the common convention that the root symbol for
positive real arguments denotes a positive value, simplifying the above
to just a would be wrong, as then plugging in a=-1 would violate the
convention.
It's a quite subtle result. But it is wrong in the sense that the result
should be as AXIOM says below.
Maple and Mathematica seem to use similar algorithms as they come up
with the same questionable result. But look at what FullSimplify gives.
Mathematica is just not trying hard enough.
I guess, if AXIOM could simplify Z/N, then the result would be better.
Ralf
(1) -> W := sqrt(a^2+h^2)
+-------+
| 2 2
(1) \|h + a
Type: Expression(Integer)
(2) -> Z := W -a
+-------+
| 2 2
(2) \|h + a - a
Type: Expression(Integer)
(3) -> N := a*W -W^2
+-------+
| 2 2 2 2
(3) a\|h + a - h - a
Type: Expression(Integer)
(4) -> W*Z/N
(4) - 1
Type: Expression(Integer)
(5) -> Z/N + 1/W
(5) 0
Type: Expression(Integer)
(6) -> limit(-1/W, h=0)
1
(6) - -----
+--+
| 2
\|a
Type: Union(OrderedCompletion(Expression(Integer)),...)
==========================================================
BTW, why do you complain? ;-)
Mathematica 7.0 for Linux x86 (32-bit)
Copyright 1988-2008 Wolfram Research, Inc.
In[1]:= w = Sqrt[a^2+h^2]
2 2
Out[1]= Sqrt[a + h ]
In[2]:= z = w - a
2 2
Out[2]= -a + Sqrt[a + h ]
In[3]:= n = a*w-w^2
2 2 2 2
Out[3]= -a - h + a Sqrt[a + h ]
In[4]:= Limit[z/n,h->0]
1
Out[4]= -
a
In[5]:= Limit[-1/w,h->0]
2
Sqrt[a ]
Out[5]= -(--------)
2
a
In[6]:= Simplify[z/n]
2 2
a - Sqrt[a + h ]
Out[6]= -------------------------
2 2 2 2
a + h - a Sqrt[a + h ]
In[7]:= FullSimplify[z/n]
1
Out[7]= -(-------------)
2 2
Sqrt[a + h ]
==============================
|\^/| Maple 11 (IBM INTEL LINUX)
._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc.
2007
\ MAPLE / All rights reserved. Maple is a trademark of
<____ ____> Waterloo Maple Inc.
| Type ? for help.
> w := sqrt(a^2+h^2);
2 2 1/2
w := (a + h )
> z:=w-a;
2 2 1/2
z := (a + h ) - a
> n:=a*w-w^2;
2 2 1/2 2 2
n := a (a + h ) - a - h
> limit(z/n,h=0);
1/a
> limit(-1/w,h=0);
1
- -------
2 1/2
(a )