```Date: Mar 24, 2013 10:28 AM
Author: Richard Fateman
Subject: Re: Handling branch cuts in trig functions

They are all wrong.(and I guess you are wrong, also :)  )Choosing the sign of x  in sqrt( x^2 )  does not tell amathematician which branch of the sqrt to choose.Sqrt(4) has two values, -2 and 2.  Corresponding to theroots of  z^-4=0Knowing the history of that 4  --- whether it was originally createdby 2^2  or (-2)^2 -- does not tell you what branch of the square rootto take.Now some may say that the sqrt() notation applied to a positivereal number "means"  the positive real square root.  Well, who cantell what someone who writes that down, really means.  But if acomputer program produces sqrt as the result of some algebraiccomputation,  what does it mean then?And whatever decision you make should generalize to cube roots (etc),as well as complex numbers.|x| is just another, occasionally convenient butgenerally incorrect, hack for sqrt(x^2).   To show that it is wrong, just draw a graph and see itis not differentiable.  Or consider the meaning of sqrt  givenby a quadratic equation...(z^2-y)=0  has (two) solutions   z=sqrt(y)  and z=-sqrt(y).   Note thatEITHER sqrt(y) works because we carry both solutions along with theanswer.How about (z^2-x^2)=0 then?  z=|x|  and z=-|x| are not the samesolutions.Furthermore |x| violates some really fundamental algebra. Likewe all know that a*b=0 means either a=0 or b=0.  We use it forsolving equations.  What do we do if it is false, sometimes?Now draw a graph of y=x-|x|.  Is it zero?  No, because for negative x,y=-2x, although for x>=0, it looks like y=0.  Similarly, draw a drawof y=x+|x|.   It too is non-zero.  Yet   (x-|x|)*(x+|x|)  =  x^2 - |x|^2 = 0.(And no,that last statement is not flawed by branch cut interpretationsor anything else).   So we have   a*b=0 .Now it is possible to choose SOME root for radical expressions andtry to do it in a consistent manner, but that doesn't mean the answeris the desired one. RADCAN in Maxima does this.  Computations withRootOf( ) expressions can solve some problems, but clumsily.Using assumptions on the domain of the argument to determine abranch cut of the sqrt may sometimes be useful in "steering" thecourse of questionable transformations, but you should not beunder the illusion that it is mathematically complete or evengenerally correct.RJFOn 3/24/2013 4:39 AM, Nasser M. Abbasi wrote:> On 3/24/2013 5:26 AM, G. A. Edgar wrote:>> In article <kimdsn\$lj3\$1@speranza.aioe.org>, Nasser M. Abbasi>> <nma@12000.org> wrote:>>>>>>>>>> I think now that answer to sqrt(sec(x)^2) should be>>> |sec(x)| without need to give the branch.>>>> That answer is incorrect for complex x ... so to get that answer in>> Maple, you must assume x is real.>>>> simplify(%) assuming x::real;>>>> But I am using Maple 17?>> -----------------------------------> ans:=simplify(sqrt(sec(x)^2)) assuming x::positive;>>                                 1>                              -------->                              |cos(x)|>> simplify(abs(sec(x))- ans);>                                 0>> ------------------------------------->> Unless x::positive implies x::real (since positive does> not apply to complex numbers). Is this what you meant?> I get same result using x::positive or x::real.>> So Maxima was wrong then:>>   sqrt(sec(x)^2);>      |sec(x)|>> No assumptions!>> thanks,> --Nasser
```