Date: Mar 24, 2013 11:06 AM
Author: Axel Vogt
Subject: Re: Handling branch cuts in trig functions

Using Maple 17 for sqrt(sec(x)^2); simplify(%); gives csgn(1/cos(x))/cos(x).

Better use t instead of sec(x) = 1/cos(x) to see what is meant, cf the help:

1) sqrt(x) represents the "principal square root", defined by the formula
sqrt(x) = exp(1/2 * ln(x)) [they mean: using the pricipal branch of log]

2) Without the symbolic option, Maple computes simplify((x^2)^(1/2)) as csgn(x)*x.

3) The csgn function is used to determine in which half-plane ("left" or "right")
the complex-valued expression or number x lies. It is defined by

csgn(x) = piecewise(`or`(0 < Re(x), `and`(Re(x) = 0, 0 < Im(x))), 1,
`or`(Re(x) < 0, `and`(Re(x) = 0, Im(x) < 0)), -1)

4) The value of csgn(0) is controlled by the environment variable _Envsignum0.

Note that Maple extends *into* the (usual) branch cut counterclockwise,
i.e. as limit from the upper left halfplane into the negative axis.