integration of floor (was Re: here is an example of periodic in use)



(%i1) load("abs_integrate.mac")$
(%i2) load("partition.mac")$

(%i3) intable[floor] : lambda([u], [-(floor(x)*(floor(x)-2*x+1))/2,diff
(u,%voi)]);
(%o3) lambda([u],[(-floor(x)*(floor(x)-2*x+1))/2,diff(u,%voi)])

(%i4) extra_integration_methods : cons('intfudu,
extra_integration_methods)$

(%i5) integrate(floor(x),x);
(%o5) -(floor(x)*(floor(x)-2*x+1))/2

(%i6) integrate(floor(5 * x - 7),x);
(%o6) -(floor(x)*(floor(x)-2*x+1))/10-7*x

(%i7) integrate(floor(x),x,0,4);
(%o7) 6

Barton