Sage Interact: Platonic Solids

In today's world, there's no reason to settle with looking at 3D objects on the printed page. Sage and other software gives you the power to create objects that look 3D and these objects can be manipulated in real time. This just wasn't possible in the classroom 20 years ago. That gives your class an opportunity to understand, say, the Platonic solids. Have you ever seen an icosahedron in real life? They aren't that easy to come by, but with Sage and a little Sage code a student can quickly explore an icosahedron: no imagination required. I've put together a simple Sage Interact manipulative to show off the 5 Platonic solids.

The code for the manipulative is posted on the Python/Sage page. The output above is posted on the Sage Output page as well.

Problems: Induction and Fibonacci numbers

Today's problem applies induction to Fibonacci numbers:

Let F_n denote the \mbox{n}^{\mbox{th}} Fibonacci number. Prove by induction that F_{n}=\dfrac {1} {\sqrt {5}}\left[ \left( \dfrac {1+\sqrt {5}} {2}\right) ^{n}-\left( \dfrac {1-\sqrt {5}} {2}\right)^n \right]

When students study the Fibonacci sequence it's in the context of a recursive sequence. This problem extends their earlier knowledge to show that there's also an algebraic formula for the Fibonacci sequence. The proof requires the student to demonstrate a good bit of algebraic manipulation making it appropriate for honors students. I've posted this problem on the Problems page.

Proof: sqrt(2) is irrational

There aren't many proofs that can be discussed in high school mathematics, but the proof that \sqrt{2} is irrational is just such a proof. The idea, that somehow the numbers we had been using (integers and ratios of integers) isn't complete, is a fundamental result. In addition to being a simple example of the power of proof, it also illustrates the idea of a proof by contradiction.

There are many proofs that the square root of 2 is irrational, I've written this one so it's just a sequence of IF - THEN statements. It's posted it on the Handouts page for resources, for lack of a better place to post it.

Calculators: The Ugly

In my opinion, technology should be used in math class. That said, it has to be used properly, otherwise it can and will do more damage than good. I feel that I have the mathematical foundation to use technology properly and to prevent my class from using it when they aren't prepared to. But that isn't true for most high school math teachers. On the whole, I think more damage is being done using technology because the decision to use calculators/technology is made by administrators who lack the expertise to know how to use it properly and then, to make things worse, it's often taught by math teachers who have no real math background. As a result, high school students are using technology when they don't have the mathematical maturity to use it properly. If you teach high school math it often shows up clearly with fractions: people taking calculus and precalculus struggle with fractions though it should have been mastered back in arithmetic.

The page Calculators: The Ugly is going to be a place to accumulate/document problems with calculators and mathematical technology in general. It will give teachers a collection of examples they can use to check the specific math technology they are using errors. I hope you agree: some of the problems are interesting and making students aware of these problems will make them more adept at using technology. They might even understand the  need to think first before going to there calculator. I used the problems with technology to put forth one of my teaching points: "Calculators are tools which require mathematical skill to use properly".

This page will, hopefully, grow over time. If you have any suggestions on other calculator problems, let me know.

Chess Basics: King and Queen vs. King

After you've learned the most basic rules of the chess then what do you do? Study and practice! The game of chess is divided into 3 phases: the opening, the middlegame, and the ending. Each phase has a different set of skills that must be mastered. For people just learning to study chess, the main focus should be on the middlegame and the endgame. With a small set of opening principles you will be able to get out of the opening phase and into the middlegame. The roadmap forward should be a lot of middlegame (70 percent), some endgames (25 percent) and little bit of the openings (5 percent). As you get better, you'll develop a style of play that will help you decide on the type of opening that complements your play. With essential background in the middlegame and endgame  you'll be able to understand the ideas behind the opening you're playing (as opposed to memorizing moves without understanding). You can then start spending more time on the openings and at the expense of the endgame.

Learning to play the endgame, the phase of chess characterized by having few pieces on the board, teaches you how to finish off a game. With just a few pieces, you learn to think in terms of concepts (such as the opposition, which we've yet to talk about) and you learn how to move your pieces effectively (eg King, bishop, knight versus king). The simplest endgame that needs to be mastered is king and queen versus king. I've posted a short piece on the Chess page.

Recaman Sequence

It's always nice to have a special example to get students interested in the material. If you're teaching sequences, the Recaman sequence is one of those examples that your students will remember long after they graduate. I first learned about it when I read the book "Here's Looking at Euclid" by Alex Bellos. Here's the beginning of the Recaman Sequence: 0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62, 42, 63, 41, 18, 42, 17, 43, 16, 44, 15, 45, 14, 46, 79, 113, 78, 114, 77, 39, 78, 38, 79, 37, 80, 36, 81, 35, 82, 34, 83, 33, 84, 32, 85, 31, 86, 30, 87, 29, 88, 28, 89, 27, 90, 26, 91, 157, 224, 156, 225, 155...

Do you see any pattern to this sequence? I sure didn't, but it's actually created by a simple rule: a_n=a_{n-1}-n if a_n>0 and has not appeared in the sequence yet and a_n=a_{n-1}+n otherwise. Start with a_0=0. Since a_1=a_0-1<0, the first term of the sequence is  a_1=a_0+1=1. To get the second term of the sequence, notice that a_1-2=1-2<0, so a_2=a_1+2=1+2=3. For the third term of the sequence,  a_2-3=3-3=0, which is in the sequence already, so a_3=a_2+3=3+3=6. Continuing the process results in the sequence above. So you have an orderly rule that gives rise to a sequence that doesn't look particularly orderly. If you graph the sequence, however, the order emerges in stunning fashion. Here's the output I got with the help of Sage:

That pattern can also be heard in the music created by the sequence: according to the Alex Bellos' book "Here's Looking at Euclid", the notes of the music are determined by the 88 keys of the piano where the first key of the piano matches up with the first term (1) of the sequence. The second term (3) would be the third key of the keyboard and so on until a term is bigger than 88, at which point you continue back at the bottom of the keys (the term 89 would be the first key of the piano). To hear the music of the sequence, go here. You can pick other features of the music and when you're read, press "PLAY". For me, nothing played; instead it downloaded a file to my computer which I had to open on my own. The result? Music that definitely had order to it, something you might never guess by looking at the sequence. And a musical aspect to sequences might just help motivate some of your students, too.

I've placed the Sage code to create a manipulative for graphing the Recaman sequence. You can find it on the Python/Sage page and the screenshot of the output is on the Sage Output page.

Student Expectations

When I was hired to teach in a public school, I had to come up with Student Expectations to post in the classroom. The idea is that if we want children to learn then we need an environment which is conducive to learning. Student expectations are supposed to help create that environment and mold student behavior. By making the expectations public, and then enforcing the standard, the teacher has set up clear boundaries that students know they need to respect.  I've posted my Student Expectations on the Procedural page.

Teaching Point: ... is ambiguous

A quick quiz: Which number is the next term of the sequence 2, 4, 6, 8, 10, . . .?
a) 12
b) \frac{11}{5}
c) -1
d) \pi
e) Any real number.

The correct answer is e), which surprises almost everyone I've ever talked to. Many math teachers teaching sequences are used to writing 2,4,6,8,.... using the ... to mean "continue following the same pattern". Some books do it, too, and it's just wrong.  The correct method is to list the sequence and then give some indication of how the sequence is generated, whether through a formula or a written explanation. So, for example, most people are thinking about the sequence 2,4,6,8,..., 2n,... where the 2n is describing the formula for the sequence: the nth term is equal to 2n.

The main reason why ... is ambiguous is due to Lagrangian Interpolation. It gives us a way to calculate a polynomial that will justify any answer. I've typed up the details for showing how each of the answers to the quick quiz above can be obtained through a formula. The files (.tex and PDF) are posted on the Teaching Points page. With a formula to show that each answer is possible, it's clear that ... is ambiguous.

SageTeX: Trig table

If you've managed to install SageTeX properly then you're ready to see the trig table example. The trig table started with my class studying trig ratios but not being allowed to use a calculator. They were studying ratios with respect to right triangles and the angle had to be in degrees and run from 1 to 89.

This is a natural job for SageTeX and a good illustration how you can use SageTeX to create tables quickly and easily. The key work is done in the sagesilent block:

\begin{sagesilent}
var('x')
f(x) = sin(x*pi/180.)
g(x) = cos(x*pi/180.)
h(x) = tan(x*pi/180.)

output = ""
output += r"\begin{tabular}{ccccccccc} "
output += r" degrees & sine & cosine & tangent & & degrees & sine & cosine & tangent \\ \hline "
for i in range(1, 45):
output += r"%d & %8.4f & %8.4f & %8.4f & & %d & %8.4f & % 8.4f & %12.4f \\ "%(i, f(i), g(i), h(i), i+45, f(i+45), g(i+45), h(i+45))
output += r"\end{tabular}"
\end{sagesilent}

First, the functions are created (sine, cosine, and tangent) and then a string to hold LaTeX code is created.  All the work to create that string is done in the loop

for i in range(1, 45):
output += r"%d & %8.4f & %8.4f & %8.4f & & %d & %8.4f & % 8.4f & %12.4f \\ "%(i, f(i),   g(i), h(i), i+45, f(i+45), g(i+45), h(i+45))

As the variable i takes on the value from 1 to 44, each line of the table is created. The formatting for integers is with %d and the formatting for floats is %8.4f [meaning 8 characters with 4 of them after the decimal]

After running LaTeX on the TrigTables.tex file, TrigTables.sage gets created. Running Sage on that file gives us the file TrigTables.sout, which is just LaTeX code for the table. Inside it looks like this: TrigTables. Processing the .tex file a final time allows \sagestr{output} to be printed in the final output:

Using SageTeX takes the tedium out of creating tables, though it takes a little time to get used to it. The code for the Trig Table (along with the PDF output) is on the Handouts page.

A word of advice for those working with SageTeX: if running sage on the .sage file gives you an error, take a look at the .sout file. In many cases, the error in the .sout file will help you find the error in the .sage file.

Sage and Graph Theory

I've already mentioned the beautiful work on graph theory here but I haven't mentioned Sage can help us produce graphs like that, too. You'll need to make sure you've got a copy of the style files (tkz-berge.sty and tkz-graph.sty) in the directory you're working in, though.

Sage gives you some predefined graphs to make creating graphs easier. This page has a lot of important information and I used it to create the graph shown on the Problems page. The graph has almost all its edges, so start by creating the complete graph on 5 vertices. The documentation at the Sage website I've already linked to  gives you the basic code. Just enter this into a Sage cell.

from sage.graphs.graph_latex import check_tkz_graph
check_tkz_graph() # random - depends on TeX installation
g = graphs.CompleteGraph(5)
opts = g.latex_options()
g.set_latex_options(tkz_style = 'Art')
print opts.tkz_picture()

The 'Art' style is responsible for making the graphs like at the Altermundus site. After you press Shift-Enter Sage returns the \LaTeX code for a K_5.

Remove an edge from the code by putting a % at the beginning of the line (which comments out the line). Then you'll need to create a (.tex) file with the correct information (like SageGraph) to run the tikz code and compile it. I've posted the Sage code on the Python/Sage page along with the final \LaTeX file. And now that you have a template, creating beautiful graphs is even quicker and easier.