I suppose you could have some function like RPSqrt, for realpositivesqrt
  which maps from non-negative reals to non-negative reals.

It would be an error to type RPSqrt(x) unless x were guaranteed to be 
oretty much
explicitly in [0,oo].
Sqrt(x^2)  under some conditions might be considered RPSqrt(x) and then x.
Sqrt((-x)^2) would also be x.  I think abs(x) is a mistake, but people 
differ on this.

Alternatively, something like this (in Maxima)  rootsof(g^2-x^2, g).
This notation embodies the two roots g=x and g=-x.  Doing calculations
with this is generally not supported.. In Maxima, it comes up
only in the answers for integration if you first say integrate_use_rootsof: 
true.

A more general notation is available in other systems. For
example, you might want to give some index number to the particular
roots  so that you could say rootsof(g^2-x^2,g,1) * rootsof(g^2-x^2,g,2)  
=  -x^2.

rootsof(g^2-4,g)   is a way of notating  {-2,2} in effect, in systems that
support something like rootsof.  See how far you can push this. Can you
take log (  )?


RJF




On Wednesday, August 5, 2020 at 5:49:45 PM UTC-7, Samuel Lelievre wrote:
>
> 2020-08-05 18:59:01 UTC, rjf:
> >
> > There are two square roots.  In this (classic) integration
> > example/bug, a choice has to be made.  You know that 4 has
> > two square roots, -2 and 2.  The integrand, which also can
> > be rewritten as   sqrt ( 4-4*cos(x/2)^2) , has 2 square
> > roots. Therefore there are two potential different values
> > for the integral.  Any answer that supplies only one answer
> > is wrong.
>
>
> Would you agree that:
>
> - There is a map f from the real interval [0, +oo)
>   to itself, mapping each element to its square.
>
> - That map is a continuous increasing bijection.
>
> - It has a compositional inverse F which is also
>   a continuous increasing bijection
>   from the real interval [0, +oo) to itself.
>
> The map f is commonly called "square" and the map F
> is commonly called "square root". The notation
> $x \mapsto x^2$ is often used for f, while the
> "radical" notation $x \mapsto \sqrt{x}$ is often
> used for F. In computer algebra systems, the name
> `sqrt` is frequently used for F, while f rarely gets
> named at all, with `sq`, `sqr`, `square` possibly
> infrequently used.
>
> You seem to be objecting strongly (please confirm)
> about one or several of the following:
>
> - the naming "square" for f or "square root" for F
>
> - the "radical" notation $\sqrt$ for F
>
> - using `sqrt` for F in computer algebra systems
>
> If so, do you have any suggestion for
>
> - admissible ways to name them?
>
> - admissible mathematical notation?
>
> - admissible naming in computer algebra systems?
>
> These maps are sometimes useful to consider.
> Computing their integrals along some segments
> of the interval [0, +oo) is sometimes needed.
>
> Is it admissible to compute such integrals?
> How can we talk about these computations?
>
> For sure,
>
> - There is also a map g from the interval (-oo, +oo)
>   to the interval [0, +oo), mapping each element
>   to its square;
>   this map is surjective; under it, 0 has a single
>   preimage while all other real numbers have two;
>   it is therefore not bijective; the inverse relation
>   "sends" 0 to itself and any positive real y
>   to the two opposite reals whose square y is.
>
> - There is also a map h from the field of complex numbers
>   to itself, mapping each element to its square;
>   this map is surjective; under it, 0 has a single
>   preimage while all other complex numbers have two;
>   it is therefore not bijective; the inverse relation
>   "sends" 0 to itself and any nonzero complex number z
>   to the two opposite complex numbers whose square z is.
>
> I have observed that frequently, discussing the map F
> or the computation of its integral along a subinterval
> of [0, +oo) leads to lengthy discussions about the map g
> or the map h and their inverse relations.
>
> I am wondering about any appropriate vocabulary that can
> be used in order to discuss the maps f and F without having
> to discuss the maps g and h and their inverse relations.
>
> The maps g and h and their inverse relations are important.
> It is sometimes important not to forget that they are not
> bijective and that most elements in their range have two
> preimages under them. But sometimes that's not the topic,
> and people are just discussing the map F.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/7dc51e63-35b1-4435-90ac-288cf0d88197o%40googlegroups.com.

Reply via email to