## Making visible the abstraction in algebraic notation

To manipulate the demos below, you must have Wolfram CDF Player installed on your computer. It is available free from the Wolfram website.

### Algebraic notation

Algebraic notation contains a hidden abstract structure coded by apparently arbitrary conventions that many college calculus students don't understand completely. This very simple example shows one of the ways in which calc students may be confused:

1. $x+2y$
2. $(x+2)y$

Students often mean to express formula 2 when they write something like $x\!\!+\!\!2\,\,\,\,y$ (with a space).  This is a perfectly natural way to write it. But it is against the rules, I presume because in handwriting it is not clear when you mean a space and when you don't.

Formula 1 can also be written as $x+(2y)$, and if it were usually written that way students (I predict) would be less confused.   Always writing it this way would exacerbate the clutter of parentheses but would allow a simple rule:

Evaluate every expression inside parentheses first, starting with the innermost.

### Using trees for algebra

Writing algebraic expressions as a tree (as in computing science)

• makes it obvious what gets evaluated first
• uses no parentheses at all.

An example of using the tree of an expression to do calculations is available in Expressions.nb (requires Mathematica) and Expressions.cdf (requires CDF player only) on my Mathematica website.  I could imagine using tree expressions instead of standard notation as the normal way of doing things. That would require working on Ipads or some such and would take a big amount of investment in software making it intuitive and easy to use.  No, I am not going to embark on such an adventure, but I think it ought to be attempted.  (Brett Victor has many ideas like this.)

### Transforming algebraic notation into trees

The two manipulable diagrams below show the algebraic notation being transformed into tree form.  I expect that this will make the abstract structure more concrete for many students and I encourage others to show it to their students.  Note that the tree form makes everything explicit.  The code for these diagrams is in Handmade Exp Tree.nb

After I return from a ten-day trip I will explore the possibility of making the expression-to-tree transformer turn the expression into an evaluable tree as in Expressions.nb and Expressions.cdf.  In the I hope not to distant future students should have access to many transformers that morph expressions from one form into another.  Such transformers are much more politically correct than Optimus Prime.

Offloading chunking and Computable algebraic expressions in tree form are earlier posts related to this post.

## An Elaborate Riemann Sums Demo

#### Note

To manipulate the demo in this post, you must have Wolfram CDF Player installed on your computer. It is available free from the Wolfram website.

The demo currently shows a banner that says "This file contains potentially unsafe dynamic content".  You can view the diagram by clicking on the "Enable Dynamics" button.  If and when I figure out how to get rid of the banner, this paragraph will disappear from the post!

### Riemann Sums

The Riemann Sum is a complicated idea.  The integral $\int_a^b f(x)\,dx$ involves three parameters: two numbers $a$ and $b$ and the function $x\mapsto f(x)$.  These are not freely varying parameters: They are subject to the requirements

• The function $x\mapsto f(x)$  must be defined on the closed interval $[a,b]$ (let's pretend improper integrals don't exist).
• The function must be Riemann integrable (continuous will do).

A particular Riemann Sum for this integral looks like $\sum_{i=1}^n f(p_i)(x_i-x_{i-1})$

It has three more parameters, a number and two lists of numbers satisfying some complicated conditions:

• The number $n$ of subdivisions.
• The partition, which
• is a list of $n+1$ numbers $\{x_0,x_1,\ldots,x_n\}$
• satisfies the conditions
•  $x_0<x_1<\ldots<x_n$
• $x_0=a$
• $x_n=b$
• The list of evaluation points, which
• is a list of $n$ numbers $\{p_1,\ldots,p_n\}$
• satisfies the condition $x_{i-1}\leq p_i \leq x_i$ for $i=1,\ldots,n$.

A Riemann sum may or may not have various important properties.

• The partition can be
• uniform
• random
• chosen by a rule (increase the number of points as the derivative increases, for example)
• The evaluation points can be chosen
• randomly
• at the midpoint
• at the left end
• at the right end
• at the lowest point
• at the highest point.

So the concept is complex, with several constituents and interrelationships to hold in your head all at once.  Experienced math people learn concepts like this all the time.  Math students have a harder time.  Manipulable diagrams can help.  Here is an example:

### The Demo

In a class where students use computers with CDF Player installed, you could give them this demo along with instructions about how to use it and a list of questions that they must answer.

Examples of instructions

• Click on the big plus sign in the upper right corner for some options.
• Move the slide labeled $n$ to make more or fewer subdivisions.
• Click on the little plus sign besides the slide for some options such as allowing $n$ to increase automatically.
• The buttons allow you to choose the type of partition, the type of evaluation points, and five functions to play with.

Sample questions

1. Set $n=1$, uniform partition and midpoint and look at the results for each function.  Explain what you see.
2. Set $n=4$,  uniform partition and midpoint and look at the results for each function.  Explain each of the following by referring to the picture:
• For $x\mapsto x$, the estimate is exact.
• For $x\mapsto x^2$, the estimate is less than the value of the integral.
• For $x\mapsto x^5$, the error in the estimate is much worse than for $x^2$.
• For $x\mapsto \sqrt{1-x^2}$ , the estimate is greater than the value of the integral.
3. Go through the examples in 2. and check that when you make $n$ bigger the properties stated continue to be true.  Can you explain this?
4. Starting with $n=4$, uniform and midpoint and then using bigger values, note that the error for  $x\mapsto \sqrt{1-x^2}$ is always bigger than the error for  $x\mapsto \sin \pi x$.  Try to explain this.  (Don't ask the students to prove it in freshman calculus).
5. For $n=4$, uniform and midpoint (and then try bigger $n$), for $x\mapsto x^5$, the LeftSide error is always less than the RightSide error.  Explain using the picture.
6. For which curves is the LeftSide estimate always the Lower Sum?  Always the Upper Sum?  Neither?  Does using Random instead of Uniform change these answers?

There are many other questions like this you can ask. After answering some of them, I claim (without proof) that the students will have a much better understanding of Riemann sums.

Note that teachers can use this Demo without knowing anything at all about Mathematica.  There are hundreds of Demos available in the cloud that can be used in the same way; many of the best are on the Wolfram Demonstration Project.

If you can program some in Mathematica, you can take the source code for this demo and modify it, for example to use other functions, to provide functions with changeable parameters and to use partitions following dynamic rules.

You could also have this up on a screen in your classroom for class discussion.  But I doubt that is the best use.  For classroom demos you probably need simple on-off demos that you prepare ahead or even write on the spot.  An example of a simple demo is in the post Offloading Abstraction.  I will talk about simple demos more in a later post.

### Rant about why math teachers should use manipulable diagrams

A teacher in the past would draw an example of a RIemann sum on the blackboard and talk about a few features as they point at the board.  Nowadays, teachers have slides with accurately drawn Riemann sums and books have pictures of them.  This sort of thing gives the student a picture which (hopefully) stays in their head.  That picture is a kind of metaphor which enables you to think of the sum in terms of something that you are familiar with, just as you can think of a function as position and its derivative as velocity.  (Position and velocity are familiar from driving or any other kind of moving.  The picture of a Riemann sum is not something you knew before you studied them, but your brain has remarkable abilities to absorb a picture and the relations between parts of the picture, so once you have seen it you can call it up whenever you think of Riemann sums.)

But there are a lot of aspects of Riemann sums that cannot be demonstrated by a still picture.  When the mesh gets finer, the value of the sum tends to be closer to the exact value of the integral.  You can stare at the still picture and sort of visualize this.  Can you visualize a situation where changing to a finer mesh could make the error worse?  If someone suggests a high-frequency sine wave, can you visualize in your head why a finer mesh might make it worse?

An elaborate demo with lots of push buttons is something for students to play with on their own time and thereby gain a better understanding of the topic.  Before manipulable diagrams the only way you could do this was produce physical models.  I don't know of anyone who produced a physical model of a Riemann sum.  It is possible to do so with some parameters changeable but it would be difficult and not as flexible as the demo given here.

The world has more possibilities.  Use them.

Related posts

An elaborate Riemann Sum Demo (Mathematica notebook, source of the demo in this post)

Freezing a family of functions (previous post)

Images and Metaphors (in abstractmath.org)

## Case Study in Exposition: Secant

Note: To manipulate the diagrams in this post, you must have Wolfram CDF Player installed on your computer. It is available free from the Wolfram website. The Mathematica notebooks used here are listed in the references below.

### Pictures, metaphors and etymology

Math texts and too many math teachers do not provide enough pictures and metaphors to help students understand a concept.  I suspect that the etymology of the technical terms might also be useful. This post is an experimental exposition of the math concept of “secant” that use pictures, metaphors and etymology to describe the concept.

The exposition is interlarded with comments about what I am doing and why.  An exposition directly aimed at students would be slimmer — but some explanations of why you are doing such and such in an exposition are not necessarily out of place every time!

### Secant Line

The word “secant” is used in various related ways in math.  To start with, a secant line on a curve is the unique line determined by two distinct points on the curve, like this:

The word “secant” comes from the Latin word for “cut”, which came from the Indo-European root “sek”, meaning “cut”.  The IE root also came directly into English via various Germanic sound changes to give us “saw” and “sedge”.

The picture

Showing pictures of mathematical objects that the reader can fiddle with may make it much easier to understand a new concept.  The static picture you get above by keeping your mitts off the sliders requires imagining similar lines going through other pairs of points. When you wiggle the picture you see similar lines going through other pairs of points.  You also get a very strong understanding of how the secant line is a function of the two given points.  I don’t think that is obvious to someone without some experience with such things.

This belief contains the hidden claim that individuals vary a lot on how they can see the possibilities in a still picture that stands as an example of a lot of similar mathematical objects.  (Math books are full of such pictures.)  So people who have not had much practice learning about possible variation in abstract structures by looking at one motionless one will benefit from using movable parametrized pictures of various kinds.  This is the sort of claim that is amenable to field testing.

The metaphor

Most metaphors are based on a physical phenomenon.  The mathematical meanings of “secant” use the metaphor of cutting.  When the word “secant” was first introduced by a European writer (see its etymology) in the 16th century, the word really was a metaphor.   In those days essentially every European scholar read Latin. To them “secant” would transparently mean “cutting”.  This is not transparent to many of us these days, so the metaphor may be hidden.

If you examine the metaphor you realize that (like all metaphors) it involves making some remarkably subtle connections in your brain.

• The straight line does not really cut the curve.  Indeed, the curve itself is both an abstract object that is not physical, so can’t be cut, and also the picture you see on the screen, which is physical, but what would it mean to cut it?  Cut the screen?  The line can’t do that.
• You can make up a story that (for example) the use was suggested by the mental image of a mark made by a knife edge crossing the plane at points a and b that looks like it is severing the curve.
• The metaphor is restricted further by saying that it is determined by two points on the curve.   This restriction turns the general idea of secant line into a (not necessarily faithful!) two-parameter family of straight lines.  You could define such a family by using one point on the curve and a slope, for example.  This particular way of doing it with two points on the curve leads directly to the concept of tangent line as limit.

### Secant on circle

Another use of the word “secant” is the red line in this picture:

This is the secant line on the unit circle determined by the origin and one point on the circle, with one difference: The secant of the angle is the line segment between the origin and the point on the curve.  This means it corresponds to a number, and that number is what we mean by “secant” in trigonometry.

The Definition

The secant of an angle $latex \theta$ is usually defined as $latex \frac{1}{\cos\theta}$, which you can see by similar triangles is the length of the red line in the picture above.

This illustrates important facts about definitions:

• Different equivalent definitions all make the same theorems true.
• Different equivalent definitions can give you a very different understanding of the concept.

The red-line-segment-in-picture definition gives you a majorly important visual understanding of the concept of “secant”.  You can tell a lot from its behavior right off (it goes to infinity near $latex \pi/2$, for example).

The definition $latex \sec\theta=\frac{1}{\cos\theta}$ gives you a way of computing $latex \sec\theta$.  It also reduces the definition of $latex \sec\theta$ to a previously known concept.

It used to be common to give only the $latex \frac{1}{\cos\theta}$ definition of secant, with no mention of the geometric idea behind it.  That is a crime.  Yes, I know many students don’t want to “understand” stuff, they only want to know how to do the problems.  Teachers need to talk them out of that attitude.  One way to do that in this case is to test them on the geometric definition.

Etymology

This idea was known to the Arabs, and brought into European view in the 16th century by Danish mathematician Thomas Fincke in “Geometria Rotundi” (1583), where the first known use of the word “secant” occurs.  I have not checked, but I suspect from the title of the book that the geometric definition was the one he used in the book.

It wold be interesting to know the original Arabic name for secant, and what physical metaphor it is based on.  A cursory search of the internet gave me the current name in Arabic for secant but nothing else.

Graph of the secant function

The familiar graph of the secant function can be seen as generated by the angle sweeping around the curve, as in the picture below. The two red line segments always have the same length.

### References

Mathematica notebooks used in this post:

## Some demos of families of functions

I have posted on abstractmath.org a CDF file of families of functions whose parameters you can control interactively. It is fascinating to play with them and see phenomena you (or at least I) did not anticipate.  Some of them have questions of the sorts you might ask students to discuss or work out.  Working out explanations for many of the phenomena demand some algebra skills, and sometimes more than that.

The Mathematica command that sets up one of the families looks like this:

Manipulate[
Plot[{Sin[a x], a Cos[a x]}, {x, -2 Pi, 2 Pi},
PlotRange -> {{-4, 4}, {-4, 4}}, PlotStyle -> {Blue, Red},
AspectRatio -> 1], {{a, 1}, -4, 4, Appearance -> “Labeled”}]

It would be straightforward to make a command something like

PlotFamily[functionlist, domain, plotrange]

with various options for colors, aspect ratio and so on that would do these graphs.  But I found it much to easy to simply cut and paste and put in the new inputs and parameters as needed.

This sort of Mathematica programming is not hard if you have an example to copy, but you do need to get over the initial hump of learning the basic syntax.   I know of no other language where it would be as easy as the example above to produce an interactive plot of a family of functions.

But many people simply hate to learn a new language.  If this sort of interactive example turns out to be worthwhile, someone could design an interface that would allow you to fill in the blanks and have the command constructed for you.  (I could say the same about some of other cdf files I have posted on this blog recently.) But that someone won’t be me.  I have too much fun coming up with new ideas for math  exposition to have to spend time working out all the details.  And all my little experiments are available to use under the Creative Commons License.

I would appreciate comments and suggestions.

## Demonstrating the inverse image of an interval

To manipulate the graph below, you must have Wolfram CDF Player installed on your computer. It is available free from their website.

You may find abstract math difficult because the symbolism hides an elaborate algebraic structure which must be visualized mentally to understand the meaning.  Several recent posts here ([1], [2], [3],[4]) have described controllable, explicit visualizations of some part of this abstract structure using Wolfram CDF Player. Such visualizations should help understand the structures, so that the visualizations will come to mind when you work with them later. Not only that, but a more sophisticated packaging of this code might conceivably be worked with directly.  Jason Dyer’s blog has examples of how this might work. Maybe twenty years from now people using math would expect to work directly with an interactive visualization of (some of) the abstract structure.

The graph below allows you to visualize the inverse image of an interval under the function $latex f(x)=x^3-2x$.  Before now, a teacher may illustrate one instance of this picture by drawing it hastily on a whiteboard.  Now they can project it on a screen and point out various phenomena, for example noticing that the inverse image of different intervals may have one, two or three components.  Not only that, the student can access this picture at home and experiment with it.

### Notes

The second file contains explanations of why the code works as well as the code itself.

These files may be used and modified as you wish according to the Creative Commons rule listed under “Permissions” (at the top of the window).

## Picturing derivatives

This is my first experiment at posting an active Mathematica CDF document on my blog. To manipulate the graph below, you must have Wolfram CDF Player installed on your computer. It is available free from their website.

This is a new presentation of old work. It is a graph of a certain fifth degree polynomial and its first four derivatives.

The buttons allow you to choose how many derivatives to show and the slider allows you to show the graphs from $latex x=-4$ up to a certain point.

How graphs like this could be used for teaching purposes

You could show this in class, but the best way to learn from it would be to make it part of a discussion in which each student had access to a private copy of the graph.  (But you may have other ideas about how to use a graph like this.  Share them!)

Some possible discussion questions:

1. Click button 1. Now you see the function and the derivative. Move the slider all the way to the left and then slowly move it to the right.  When the function goes up the derivative is positive.  What other things do you notice when you do this?
2. If you were told only that one of the functions is the derivative of the other, how would you rule out the wrong possibility?
3. What can you tell about the zeroes of the function by looking at the derivative?
4. Look at the interval between $latex x=1.5$ and $latex x=1.75$.  Does the function have one or two zeroes in that interval?  On my screen it looks as if the curve just barely  gets above the $latex x$ axis in that interval.  What does that say about it having one or two zeroes?  How could you verify your answer?
5. Click button 2.  Now you have the function and first and second derivatives.  What can you say about maxima, minima and concavity of the function?
6. Find relationships between the first and second derivatives.
7. Now click button 4.  Evidently the 4th derivative is a straight line with positive slope.  Assume that it is.  What does that tell you about the graph of the third derivative?
8. What characteristics of the graph of the function can you tell from knowing that the fourth derivative is a straight line of positive slope?
9. What can you say about the formula for the function knowing that the fourth derivative is a straight line of positive slope?
10. Suppose you were given this graph and told that it was a graph of a function and its first four derivatives and nothing else.  Specifically, you do not know that the fourth derivative is a straight line.  Give a detailed explanation of how to tell which curve is the function and which curve is each specific derivative.

Making this manipulable graph

I posted this graph and a lot of others several years ago on abstractmath.org.  (It is the ninth graph down).  I fiddled with this polynomial until I got the function and all four derivatives to be separated from each other.  All the roots of the function and all its derivatives are real and all are shown.  Isn’t this gorgeous?

To get it to show up properly on the abmath site I had to thicken the graph line.  Otherwise it still showed up on the screen but when I printed it on my inkjet printer the curves disappeared. That seems to be unnecessary now.

Mathematica 8.0 has default colors for graphs, but I kept the old colors because they are easier to distinguish, for me anyway (and I am not color blind).

Inserting CDF documents into html

A Wolfram document explains how to do this.  I used the CDF plugin for WordPress.  WordPress requires that, to use the plugin, you operate your blog from your own server, not from WordPress.com.  That is the main reason for the recent change of site.

The Mathematica files are New5thDegreePolynomial.nb and New5thDegreePolynomial.cdf on my public folder of Mathematica files.  You may download the .cdf file directly and view it using CDF player if you have trouble with the embedded version. To see the code you need to download the .nb file and open all cells.

Here are some notes and questions on the process.  When I find learn more about any of these points I will post the information.

1. At the moment I don’t know how to get rid of the extra space at the top of the graph.
2. I was surprised that I could not click on the picture and shrink or expand it.
3. It might be annoying for a student to read the questions above and have to go up and down the screen to see the graph.  I had envisioned that the teacher would ask the questions and have the students play with the graph and erupt with questions and opinions.  But you could open two copies of the .cdf file (or this blog) and keep one window showing the graph while the other window showed the questions.
4. Which raises a question:  Could it be possible to program the graph with a button that when pushed would make the graph (only) appear in another window?

Other approaches

1. I have experimented with Khan Academy type videos using CDF files.  I made a screen shot and at a certain point I pressed a button and the graph appropriately changed.   I expect to produce an example video which I can make appear on this blog (which supposedly can show videos, but I haven’t tried that yet.)
2. It should be possible to have a CDF in which the student saw the graph with instructional text underneath it equipped with next and back buttons.  The next button would trigger changes in the picture and replace the text with another sentence or two.  This could be instead of spoken stuff or additional to it (which would be a lot of work).  Has anyone tried this?

Note

My reaction to Khan Academy was mostly positive.  One thing that struck me that no one seems to have commented on is that the lectures are short. They cover one aspect (one definition or one example or what one theorem says) in what felt to me like ten or fifteen minutes.  This means that you can watch it and easily go back and forth using the controls on the video display.  If it were a 50-minute lecture it would be much harder to find your way around.

I think most students are grasshoppers:  When reading text, they jump back and forth, getting the gist of some idea, looking ahead to see where it goes, looking back to read something again, and so on.  Short videos allow you to do this with spoken lectures. That seems to me remarkably useful.

## 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 $latex \int_0^2 \sqrt{4-x^2} dx$, the area of a quarter circle of radius 2, which is $latex \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 $latex \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 $latex \int_0^1 x^2 dx$.  There are red dots but they are kind of drowned out.

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

Posted in math, representations. Tags:. 3 Comments »