# Riemann clouds improved

In my post Playing with Riemann Sums I showed a couple of clouds of points, each representing a particular Riemann sum for a particular function.   I have extended the code in a couple of ways.

The new code is in the Mathematica notebook and CDF file called MoreRiemann in the Mathematica section of abstractmath.   The .nb form is a Mathematica Notebook, which requires Mathematica to run and allows you to manipulate the objects and change the code in the notebook as you wish.  In particular, you can rerun the commands generating the clouds to get a new random result.  The .cdf file contains the same material and can be viewed using Mathematica CDF Player, which is available free here.  Both files have several other examples besides the ones shown below.

As always, my code is one-time code to show the ideas, but it is available freely via the Creative Commons Attribution – ShareAlike 3.0 License. I hope people will feel free to develop it further for use in teaching or for their own purposes.

Below is a cloud for $\int_0^2 \sqrt{4-x^2} dx$, the area of a quarter circle of radius 2, which is $\pi$.  The blue dots are arbitrary random Riemann sums with mesh shown on the horizontal axis and value on the vertical axis.  The partitions and the point in each subinterval are both random.  The red dots are arbitrary Riemann sums with random partitions but using the midpoint for value.

The next cloud shows random blue dots with the same meaning as above.  The red dots are Riemann sums with uniform subintervals evaluated at midpoints.  Possible discussion question for both of the clouds above:

• Why do the red dots trend upward?

The following cloud is like the cloud above  with the addition of green dots representing uniform partitions evaluated at the left endpoint or right endpoint. (But the mesh scale is extended, giving different proportions to the picture.)

Of course the left endpoint gives the upper sums and the right endpoint gives the lower sums.

• Explain the slight downward curvature of both green streaks.
• Explain the big gap between the blue dots and the green dots.  (Requires some machinations with probability.)
• Would there be blue dots a lot nearer the green dots if I ran the command asking for many more blue dots?

(These are idle questions I haven't thought about myself, but I'll bet they could be turned into good projects in analysis classes.)

Here is a cloud for $\int_0^{\pi}\sin x dc$ with everything random for the blue dots and random partitions but midpoints for the red dots.

• Why do these red dots trend upward?

The cloud below is for the same integral but uses uniform subintervals for the midpoint and adds green points for both the left endpoint and the right endpoint of uniform subinterval.

• Why on earth do all the green dots trend downward???

This is a similar picture for $\int_0^1 x^2 dx$.  There are red dots but they are kind of drowned out.

And finally, here is $\int_{\frac{1}{2}}^2 \frac{1}{x} dx$:

Send to Kindle

## 6 thoughts on “Riemann clouds improved”

1. (Commenting on my own blog) I just noticed that I used the phrase “trend upward” (or “downward”) in a confusing way. As I used them the phrase refers to moving along the mesh axis from left to right. But to perceive the definite integral as the limit of the Riemann sums you have to perceive them as going right to left, with the y-axis showing the limit.

I suspect I should change the language rather than reversing the graph. Any suggestions?

Charles Wells

2. spencer says:

I’m having some display issues. Not sure if they’re on my end or yours:

(i) In place of latex math output, I just see a yellow bar reading “latex path not specified.” Some googling seems to indicate that this is a wordpress message.

(ii) In the navigations bars (right and left) everything except the headers are rendered as white text on white background, hence invisible.

1. SixWingedSeraph says:

I was using custom colors that worked correctly on the old site but not here. I have reverted to the default colors, pale and wimpy though they are. But you can read everything now. (If you can’t, let me know).