On 18 July 2014 12:39, Waldek Hebisch <[email protected]> wrote:
> ...
> However, I am affraid that this would lead to several
> wrong definite integrals.  To handle definite integrals
> correctly we would probably need stronger continuity test
> and extra code to choose antidervative which avoids
> branch cuts.
>

Now I think I understand your point about branch cuts.

The problem seems to occur very early than definite integrals.  For
example one might want

    abs(x) = sqrt(x^2)

Numerically this is the case

(1) -> draw(sqrt(x^2),x=-2..2)
   Compiling function %L with type DoubleFloat -> DoubleFloat
   Graph data being transmitted to the viewport manager...
   FriCAS2D data being transmitted to the viewport manager...

   (1)  TwoDimensionalViewport: "(x^2)^(1/2)"
                                                 Type: TwoDimensionalViewport

But integration make a different choice of branches

(2) -> integrate(sqrt(x^2),x)

         2
        x
   (2)  --
         2
                                         Type: Union(Expression(Integer),...)
(3) -> integrate(x,x)

        1  2
   (3)  - x
        2
                                          Type: Polynomial(Fraction(Integer))

(4) -> D(sqrt(x^2),x)

          x
   (4)  -----
         +--+
         | 2
        \|x
                                                    Type: Expression(Integer)
(5) -> integrate(%,x)

         +--+
         | 2
   (5)  \|x
                                         Type: Union(Expression(Integer),...)

Perhaps integration should return the following?

      x * sqrt(x^2)/2

but then

(6) -> D(x*sqrt(x^2)/2,x)

           2
          x
   (6)  -----
         +--+
         | 2
        \|x
                                                    Type: Expression(Integer)

(7) -> integrate(%,x)

         2
        x
   (7)  --
         2
                                         Type: Union(Expression(Integer),...)

Hmmm ....

-- 
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