Question about abs_integrate



Jamie,

"Or to define a periodic function with period 2:
   h(x) := f( mod( x, 2 ) )$"

You can do that with the periodic() function and integrate it with intperiodic().

h(x):= ''(periodic(f(x), x, 0, 2));
H(x):=''(intperiodic(f(x),x,0,2));

The function H is the indefinite integral of h.

Rich


--------------------------------------------------
From: "Jaime Villate" <villate at fe.up.pt>
Sent: Friday, April 16, 2010 4:03 PM
To: "Maxima" <maxima at math.utexas.edu>
Subject: Question about abs_integrate

> 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
> 
> 
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>