# A Sample Proof Using Mathematical Induction (playing with LaTeX)

It’s been a long time since I used LaTeX regularly, and I discovered that I don’t have any leftover files from my days as a math student in Waterloo. After looking at LaTeX in the context of D2L today, I dug out a unit plan I had written for MGA4U (extinct) in 2003 using the Ontario Curriculum Unit Planner (also extinct).

First it’s worth noting that I had no idea what good assessment looked like. It’s almost 11 years ago, but it feels like a lifetime when I look at the awful way I was planning to assess students. This was a unit I developed while practice teaching. I’m really, really glad my practice doesn’t look like that now.

Anyway, I found a page (“S2 Teacher Resource 1.pdf”) which I had typeset using LaTeX. I thought I’d try to reproduce the mathematical proof on the page to see if I could remember how. Here’s a picture of the page:

I left off the trimmings and tried to write the middle. I can’t remember how to indent things the way I did before, so I’m settling for something different (feel free to educate me, though).

I used the JaxEdit LaTeX Editor at http://jaxedit.com/note/ to create the document:

\documentclass[letterpaper]{article}
\newtheorem{thm}{Theorem}
\newproof{proof}{Proof}
\begin{document}
\title{Sample Proof Using Mathematical Induction}
\author{Brandon Grasley}
\date{2014-01-21}

\titlepage
\begin{thm}
\\For any $n \in \mathbb{N}$,
$\sum_{i=1}^{n}i=\frac{n\left ( n+1 \right )}{2}$
\end{thm}
\begin{proof}
\\Base case $n=1$: If $n=1$, the left side is 1 and the right side is $\frac{1\left ( 2\right )}{2}=1$.
So, the theorem holds when $n=1$.
Inductive hypothesis: Suppose the theorem holds for all values of $n$ up to some $k$, $k \geq 1$.
Inductive step: Let $n=k+1$. Then our left side is
\begin{align}
$\sum_{i=1}^{k+1}i&=\left (k+1\right )+\sum_{i=1}^{k}i\\ &=\left (k+1\right )+\frac{k\left ( k+1 \right )}{2}$\text{, by our inductive hypothesis}\\
$&=\frac{2\left (k+1 \right )}{2}+\frac{k\left (k+1 \right )}{2}\\ &=\frac{2\left (k+1 \right )+k\left (k+1 \right )}{2}\\ &=\frac{\left (k+1 \right )\left (k+2\right )}{2}$
\end{align}
which is our right side. So, the theorem holds for $n=k+1$.
By the principle of mathematical induction, the theorem holds for all $n \in \mathbb{N}$.
\end{proof}

\end{document}

This generated a page like this:

I’m definitely surprised at how hard it is to find free, online LaTeX renderers. I ended up taking screen shots of that output in order to post it here. The others I found either require sign up or didn’t successfully render all of the math components.

Well, something to keep exploring. I wonder if I’ll start working in HTML with MathJax instead, using D2L as the authoring platform. We’ll see.

## 8 thoughts on “A Sample Proof Using Mathematical Induction (playing with LaTeX)”

1. Love how you are using LaTeX. As a recent grad of uWaterloo we were required to use LaTeX to create all of our assignments for our History of Math course. In reference to your other posts, I am glad this program will also work in our eLearbing environments. Funny how programs you think you will never use again come back up!!

I understood that UW uses Desire2Learn for its online courses (and online presence in face-to-face courses). Did you use it as part of your History of Math course?

2. Brandon!
You have to look into taking the MMT (Master of Mathematics for Teachers) through Waterloo. We learn LaTeX as part of the program and are then encouraged to use it for the remainder of the courses. (Plus it’s been really reinvigorating learning math again – I’ll be finishing up this April). In the meantime, I find myself referring to this online guide for assignments: http://cemclinux1.math.uwaterloo.ca/~math600/wp/ And then you too could take the History of Math, among other courses – it was very interesting!
sharelatex.com is the way to go for a free online LaTeX compiler – it has been handy for all sorts of assignments. It did require a sign up but I don’t get spammed by them.
Waterloo does use D2L for their online learning environment – it has been really neat to see/use if from both ends now in my role as an eLO teacher at my school/board and in my role as student at UW.
I’m loving your blog and find myself clicking on loads of your links – it’s a great time suck for a Friday night!
Catherine (UW ’02, UNip ’03 – green malibu + pinstripe!)

• Catherine!
I just started to play with sharelatex.com this evening as I’m going to be teaching MCF3M online next semester. I’m trying to figure out the best workflow for myself (and maybe for my students)… I want to maintain a good handle on student progress without overwhelming myself with marking. I’m willing to put some frontend time in to make it smooth for the students as well.
Any suggestions for a tool to draw diagrams like these?
And yes, I remember the car! We’ve been through a couple more since then :)
Brandon (UW ’02, UNip ’03 – green malibu – pinstripe!)

• You would have a few options for for drawing… Frankly for a “simple” one like that, I’d create it in paint or word and save it as a .jpg or .pdf and use the graphicx (yes that’s an x) package in LaTeX to display it… Details: http://cemclinux1.math.uwaterloo.ca/~math600/wp/2-4/
and it talks about creating graphics at the bottom, including Inkscape and IPE which sound promising for you.

There are other programs that you can use that are talked about here: http://cemclinux1.math.uwaterloo.ca/~math600/wp/3-5/
(pstricks sounds promising, but I’m not sure about labelling the sides of your triangle)

Good luck with the MCF3M! What else do you have this semester? It was fun following your adventures with MDM4U last semester as I had a section of that via eLO for my board as well – students from 8 different high schools were in my class. This semester, I have a section of Student Success (new for me), and an MFM1P, and an MPM1D (both grade 9 classes will be interesting as they are one-to-one iPads this year, so I’m looking forward to seeing how that takes shape)!