Programming with Geogebra

This post is about some of the virtues of programming computers in math class.  I include a long anecdote and a quick geogebra tutorial.  The punchline: teaching kids to program introduces them to an environment that gives instantaneous, continuous, 100% correct, 0% helpful feedback without judgement.  The computer doesn’t say, “you’ve made a mistake here,” it just shows you a result, and it’s up to you to interpret it, decide if it’s a correct result, and find the problem if it’s not.

In my calculus class we’re looking for a way to guess how long it will take a glass of cold water to rise to within a few degrees of room temperature.  We’ve taken a lot of data, and discovered that ${dT}/{dt}=0.01(70-T)$1.  However, no one in class could find a $T$ that satisfied the equation (not even $T=70$).  So I broke it down a little:

If the water is 40 degrees right now, what do you think its temperature will be in 1 minute?

You can imagine where it went from here – lots of guesses, including some really good ones and pretty bad ones.  Instead of helping them write it in math (I didn’t even tell them that this is, like, a method), I took a little time to teach them some geogebra 2 programming techniques so they could flesh out the ideas themselves.

We started with a blank file and created a point, A.  I showed them how they could make a point that was 1 unit right of and 1 unit above A.  Type ( x(A)+1, y(A) + 1) into the input field below to get a taste of this.

Sorry, the GeoGebra Applet could not be started. If you're using a reader, try visiting the post directly.

They liked this; I’m always surprised by how much students like stuff like this.  So this alone has them interested in learning geogebra.  Then I lay the geogebra Tool Manager on them.

In the applet below, open the “Tools” menu and choose “Create New Tool…” and choose B as an output object.  You’ll notice that A has been chosen automatically as an input object.  Choose the name and icon you like from the third tab.

Sorry, the GeoGebra Applet could not be started. Please make sure that Java 1.4.2 (or later) is installed and active in your browser (Click here to install Java now)

What follows is a picture to help you – it’s not an actual geogebra applet!  Don’t try to click on it!

After you’ve gone through all the tabs and clicked “Finish,” your new tool will appear in the toolbar, all the way to the right.  Now you have a tool that accepts a point as input and creates a point 1 to the right of it and 1 above it, automatically!  Try clicking around with your tool.  You can even click on the output of the tool to feed it back into the tool, creating a long line.

Well, at this point my students were ready to get back to the temperature thing (we’ve been working on it for maybe 3 hours at this point, over several classes).  With a little nudging from me they make a tool that does Euler’s method (fixed width of 1) on a point, by choosing B = (x(A)+1, y(A)+0.01(70-y(A))) and using the tool repeatedly.  Check this out – try dragging the point A up and down to different temperatures!

Sorry, the GeoGebra Applet could not be started. Please make sure that Java 1.4.2 (or later) is installed and active in your browser (Click here to install Java now)

Note that now I can ask them questions like “how do you make the curve flat?” and “why does the curve change direction?”

With a few simple commands the students have created a complex piece of software, and they can be proud of it.  It has a pleasing organic flow that they like intrinsically.  But the best reason to teach them to program geogebra is that geogebra programs only work if they are mathematically sound.  I can see in an instant whether a student has created the program correctly or not.  When they go on to create other geogebra programs, I can assess whether they understand the concept or not, and more importantly, they can assess their own knowledge.  Geogebra will show students if they understand or not, but won’t give suggestions or hints.  It also doesn’t mind if they are wrong 400 times in a row.

I start teaching geogebra commands to kids right away, in the first month of school.  My algebra 2 kids can transform an arbitrary function, calculate a line or other curve through 2 points, and animate sliders.  The ones that get really interested learn more on their own (one student has all but mastered latex).  The kinds of assignments I can give and the kinds of exploration they can do now are really something else.  Please teach your students to use computer technology well.  It’s not enough that they can use the built in functionality – they have to be able to make their own.

1. The kids came up with many ideas about temperature change and I directed them towards this equation
2. If you’re a math teacher and you don’t know how to program geogebra, I recommend looking into it – it’s fun and extremely helpful for creating interactive diagrams.

4 thoughts on “Programming with Geogebra”

1. Thanks for posting this. I’ve been trying to figure out what the tool creation was about for a while. I like the idea of having students define their algorithms using the sliders as variables, but this seems to be even more powerful. If you have any more examples of how you’ve used this tool in class, I’d like to see them. Do you define the function transformation as: a*f(x+b)+c?

1. As we have explored “graphing forms” of equations, like a(x-h)^2+k, a*1/(x-h) + k, a*abs(x-h)+k, etc, some of the students found a*f(x-h)+k in geogebra, while others typed separate transforming equations for each parent equation.

I imagine the tool creation being especially powerful in a construction unit of geometry. Since the idea of a tool is very abstract, I would not expect all students to be successful with tools quickly, but with the more-concrete concepts in geometry it might be better. I’ll post some ideas this week with more emphasis on geogebra tutorial.

2. Nice!

You can use the spreadsheet to make this slightly easier eg
A2=Tool[A1]
and then copy cell A2 down

or if you want to avoid using Tools:
A2 = (x(A1)+1, y(A1)+0.01(70-y(A1)))

3. I agree with Riley wholeheartedly and have noticed the same things with my students; I especially like the fact that the learning is almost entirely dependent on the effort that students put forth, and that one item learned inevitably leads to another, and another, . . .
Thanks, Riley, for calling attention to this great aspect of GeoGebra.
http://www.mrlsmath.com/programming-geogebra/