Hi,
consider a function that is x^2 between 0 and 1, and 2-x, between 1 and
2:
f(x) := ( x^2 + (2-x) + signum( x - 1 )*( (2-x) - x^2 ) )/2$
with abs_integrate we can compute the integral:
load("abs_integrate")$
integrate ( f(x), x, 0, 2); ---> 5/6
We now want to extend f to x from -2 to 0, as an even function:
g(x) := f( abs( x ) )$
Or to define a periodic function with period 2:
h(x) := f( mod( x, 2 ) )$
Since abs_integrate can integrate abs(x), I was expecting abs_integrate
to give 5/3 at least for the first of the two integrals:
integrate ( g(x), x, -2, 2);
integrate ( h(x), x, -2, 2);
but it fails to calculate any of those.
Regards,
Jaime