Confused by Maxima 5.9.0



> integrate(sqrt(1-cos(x)),x) returns a result which is valid on
> [0,%pi] but not on (%pi, 2*%pi]

Isn't this a special case of a more general problem, the representation
and manipulation of multivalued functions?

The integral of sqrt(1-cos(x)) is -2*sqrt(cos(x)+1).  Let's look at the
function f(x)=sqrt(1+cos(x)).  The standard convention for square roots
makes it non-negative everywhere.  But this makes it non-differentiable
at odd multiples of %pi.  Wouldn't it be nice if we could talk about the
analytical continuation of its value at 0 instead, so that f'(%pi)=-1,
f(0)=f(4*%pi)=sqrt(2) and f(2*%pi)=f(6*%pi)=-sqrt(2)?

But there is no reasonable way to say that in Maxima.  Do other CASs
have ways of saying it?

      -s