(Originally posted 20140223.)
As you might know I like maths, particularly algebra. (If you’ve read Another Neat Piece Of Algebra – Series Summation and Hello, I’m Martin And I’m An Algebraic 🙂 you do.)
If there’s one thing I would be doing if I weren’t doing this[1] it might be teaching maths – but it would have to be at a level where algebra and calculus were substantial topics. But I don’t think I’ll really be doing that – at least not for the foreseeable future. [2]
So it occurred to me that I need not be alone in treating some algebraic techniques as puzzles[3] – and with automatic generation of problems people could really get quite good at it. That might be useful – though utility is not my prime motivator in liking algebra: I almost never get to use it.
I won’t claim I was looking for a programming project: The day job gives me enough of those and anyway I have other ideas for fun stuff to create.[4] But anyway, this weekend I created a basic polynomial factorisation page. It’s a single file, containing javascript, HTML and CSS – which makes it quite portable.
After a brief preamble about factorisation and some hints it presents you with a machinegenerated secondorder[5] polynomial in x to factorise. You type in the factors and press the “Check” button.
The code multiplies the factors together and tells you what the resulting polynomial is. It also compares it to the original and tells you if you’ve got it right.
There’s a “Try another” button or you can just manually reload the page.
Try the code in here. You’ll have to paste it into your own HTML file and pop it in your browser.
It’s a little rough and ready. In particular you have to be little careful in how you type the factors in.
I’ve thought of some ways I could improve it already:
 I can think of difficulty levels.
 I could extend it to third or fourthorder polynomials.
 I could extend it to polynomials in x and y.
 I could give tutorial hints.
 I could graph the resulting polynomial – probably on an HTML5 canvas.
 I could work on the text some more.
 I could use the HTML5 Offline Web Applications function to enable you to download it and run it on, let’s say, your smartphone.
But for now I’m enjoying testing it. And I hope you enjoy playing with it too.
And, in case you’re wondering, I have a memoryrelated “day job” post beginning to take shape in my brain.

The term “this” is, of course, loosely defined. Whether you think I’m a System z advocate, as Principal Systems Investigator (as I seem to be allowed to style myself) 🙂 or as Performance Guy is a matter of personal opinion. ↩

OK, how far can you foresee the future? Really, that far? 🙂 ↩

As indeed I confess to in Hello, I’m Martin And I’m An Algebraic 🙂 ↩

My creative metier is code. Oh, and true stories. ↩

A secondorder polynomial is one of the form ax^{2}+bx+c. ↩