Bill Page wrote:
> 
> 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

Well, our main integrator works for complex functions.  The
relation above is not valid in such case.

One problem is that integrating abs and signum essentially
forces us to work with real numbers and integration result
may be nonsense when viewed as complex function.

But even when we work with real functions there are
problem.  The integration method essentially is:

1) replace abs(x) by signum(x)*x
2) relace signum(x) by a constant, eiter 1 or -1 (we need
   to test for all combination of signs
3) integrate resulting functions
4) combine them into final result

Step 4 is easy to do if one allows big complicated
expressions as result.  But such expressions need
handling in definite integrator.

As an easy example, consifer 'abs(x)'.  We have 'abs(x) = signum(x)*x'
So we need to integrate 'x' getting 'x^2/2' and '-x' getting '-x^2/2'.
Then we need to combine results.  Naive way is
x^2/2 when signum(x) = 1, -x^2/2 when signum(x) = -1, which leads
to

(signum(x) + 1)/2*x^2/2 + (-(signum(x) + 1)/2*(-x^2/2)

Above I ignored case signum(x) = 0, which in general my introduce
some extra complications.  By happy accident function that
I obtained is continuous.   But since integral is determined
up to integration constant using naive procedure above we
may get antiderivative with jumps.  Befor using this antiderivative
for definite integral we need to take care of jumps...

Even without jumps in antiderivative we get expressions that
streche our limit code.

-- 
                              Waldek Hebisch
[email protected] 

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