Riemann sum graphics


Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/cherry/www/education/wp-content/plugins/latex/latex.php on line 47

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/cherry/www/education/wp-content/plugins/latex/latex.php on line 49

For practicing understanding the implications of lefthand vs. righthand (or lower bound vs. upper bound integrals), it's nice to be able to graph a function with a grid suited to the task. I plotted a portion of using Mathematica.


f[x_] := (x - 2)^2/2;
xMin = 2;
xMax = 6;
xGridStep = 1;
yMin = 0;
yMax = 8;
yGridStep = 1;
xGrid = Range[xMin, xMax, xGridStep];
yGrid = Range[yMin, yMax, yGridStep];
SetOptions[Plot, BaseStyle -> {FontFamily -> "Times", FontSize -> 14}];
Plot[f[x], {x, xMin, xMax}, LabelStyle -> Directive[16],
PlotStyle -> {Black, Thickness[0.005]}, GridLines -> {xGrid, yGrid},
GridLinesStyle -> Directive[Gray], AxesStyle -> Gray]

Comments are closed.