plot Riemann sums



By this, I think you simply want to plot piecewise smooth functions.

I use simple functions (sums of constants times the characteristic
functions of intervals) as follows.

Define the UnitStep and Indicator functions as follows:


UnitStep(x):= (signum(x) + 1)/2;

Ind(a,b,x):= UnitStep(x-a) - UnitStep(x-b);

Suppose f(x) has the values
  1.7 in [0,1]
  -2.0 in [1,2]
  3.4 in [2,3]
  0   elsewhere

Just write

f(x):= 1.7*Ind(0,1,x) - 2.0*Ind(1,2,x) + 3.4*Ind(2,3,x);

plot2d(f(x),[x,-1,4]);

HTH,
  -sen


On Tue, 22 May 2007, Wolfgang Lindner wrote:

> dear group,
>
> AFAIK I have seen plots of Riemann sums using Maxima - but I don't know anymore  where it
> was. I seek in the help file and the tutorials too, in vain.
> Could anyone help me, please.
>
>

-- 
  ---------------------------------------------------------------------------
  | Sheldon E. Newhouse            |    e-mail: sen1 at math.msu.edu           |
  | Mathematics Department         |       				   |
  | Michigan State University      | telephone: 517-355-9684                |
  | E. Lansing, MI 48824-1027 USA  |       FAX: 517-432-1562                |
  ---------------------------------------------------------------------------