On 21 July 2014 20:24, Waldek Hebisch <[email protected]> wrote:
> Bill Page wrote:
>>
>> On 19 July 2014 13:53, Waldek Hebisch <[email protected]> wrote:
>> >
>> > Well, our main integrator works for complex functions.  The
>> > relation above is not valid in such case.
>> >
>>
>> In this case
>>
>> (2) -> integrate(sqrt(x^2),x)
>>
>>          2
>>         x
>>    (2)  --
>>          2
>>                                          Type: Union(Expression(Integer),...)
>>
>> I would have expected
>>
>>    x*sqrt(x^2)/2
>
> Integrator assumes that there are no "useless" roots.  More
> precisely, integrator assumes that we work in a differential
> field.  If an equation has solution in a field. then we can
> use the solution instead of root symbol.  So roots
> of equations containing solutions inside field are
> considered useless.  From such point of view only roots
> of irreducible polynomials are useful.
>
> Trying to formally add "useless" root would introduce
> zero divisors, so break basic properties we need.
> So, given reducible polynomial integrator chooses
> just one factor.  Polynomial  X^2 - x^2 =(X + x)*(X - x)
> has two factors and integrator chooses the second factor.
>

Hmmm... so the context of a differential field makes sqrt(x^2) equivalent to x?

    D(integrate(sqrt(x^2),x),x) = x

and we have

  integrate(sqrt(x^2),x=-2..2,"noPole") = 0

The latter result looks especially strange.  Both Maple and
Mathematica return 4.  If we were being very pedantic we might admit
that there is some uncertainty in the sign.  It seems very unnatural
to choose one branch for the lower limit and a different branch for
the upper limit or to argue that such uncertainties somehow cancel
out.

> We could try to preserve uncertainity about choice of
> factor.  This requires essentially the same code as
> support for signum.
>

Yes, trying to preserve "uncertainty" seems like the right idea to me.
Perhaps a better word might be "ambiguity".  In that sense

      x*sqrt(x)/2

has the same ambiguity as integrate(sqrt(x^2),x).

It is not clear to me how this might amount to the same thing as
supporting signum.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to