On 11/1/2010 3:21 PM, Edwin Woollett wrote:
> On Oct. 31, 2010, Dieter Kaiser wrote:
> --------------------------------------------------------
>> I have three questions about the square root function:
>> 1. Is it the desired behavior of Maxima to return the principal
>> square root
>> for numbers?
>> sqrt(4) -> 2
>> sqrt(-4) -> 2*%i
>> This is the implementation we have for real and complex numbers.
> --------------------------------------
> I would like principal value definitions to be returned for
> multiple-valued functions (as in Mathematica and
> Macsyma), so that the Log principal value def.
>
> Log(zz) := log (abs(zz)) + %i*carg (zz)$
>
This seems to require that you be able to compute abs(zz) and carg(zz),
which is
as much an issue as log(zz), when zz is not something obvious, like a
positive
integer. Consider the expression zz= x^y.
There have been papers written e.g. by Corless, on "unwinding numbers"
and other
attempts to get branches straight.
I also wrote a paper
*Why computer algebra systems sometimes can't solve simple equations*
*Full text*
<http://portal.acm.org/ft_gateway.cfm?id=235701&type=pdf&coll=GUIDE&dl=GUIDE&CFID=108147106&CFTOKEN=96297585>
*Source* ACM SIGSAM Bulletin archive
<http://portal.acm.org/toc.cfm?id=J707&type=periodical&coll=GUIDE&dl=GUIDE&CFID=108147106&CFTOKEN=96297585>
Volume 30 , Issue 2 (June 1996)
Pages: 8 - 11
Year of Publication: 1996
ISSN:0163-5824
whose abstract says...
Among the basic equations one might wish a computer to solve
symbolically is the inverse of the power function, solving /y/ = /z^w /
for /z./ (Note: /z^w / == exp(/w/ ln /z/)). While many special cases,
easily solved, abound, the general question is fraught with
implications: if this is so hard, how can we expect success in other
ventures? Having solved this, we can naturally use it in a "composition"
of solution methods for expressions of the form /y/ = /f/(/z/)/^w
/.Can't we already do this? Is it not the case that the solution of /y/
= /z^a+bi / is trivially /z/ = /y/^1/(/a+bi/)) ?Not so. if this were the
case, then a plot of the function /t/(/y/) := /y/ - (/y/^1/(1+/i/))
)^1+/i/ would be indistinguishable from /t/(/y/) == 0. For many values,
/t/(/y/) is (allowing for round-off error), zero. But if your computer
system correctly computes with values in the complex plane, then, (to
pick two complex points from a region described later), /t/(-10000 +
4000/i/) is not zero, but about -9981 + 3993/i/ and /t/(-0.01 +
0.002/i/) is about 5.34 - 1.06/i./ These strange numbers are not the
consequence of round-off error or some other numerical phenomena. The
alleged solution is just not mathematically correct.
RJF