2012-04-11

Visualizing the Power Function

After some recent discussion on the power function, it occurred to me that if I tried to visualize the function b^a, I really didn't know what it would look like. Here it is below:



As shown here, the base b is along the x-axis, and the power a is on the y-axis. The range displayed is between +/-2 on both axes, with the origin (0, 0) in the center. Positive values are shown in red, negative values in blue; intensity is scaled to the highest value in the top-right corner (i.e., 2^2 = 4). Black pixels represent either very small values (on the right half, for b>0) or else undefined values (on the left half, for b<0).

So a few things are apparent. In the 1st quadrant, going towards the top-right, you get larger positive values (when b>0 and a>0); near the y-axis in that quadrant you get diminishing values, namely 0 when b=0. But in the 4th quadrant the situation is reversed: you get diminishing values towards the bottom-right and arbitrarily large value near the y-axis (hence the intense bright region on the bottom, with vanishing b and negative a, generating values much larger than what you get in the top-right). On the left-hand side (b<0), the graph is mostly black, with only narrow bands of value where the power a is an integer (alternating red and blue, as the powers alternate positive or negative values).

One discovery regarding that left side: I didn't realize how contentious it was to possibly define rational exponents for a negative base! Apparently some textbooks go either way with that. For example, the textbooks at my school permit it, but they have to institute a clunky "assume root exists and exponent on b^(m/n) is reduced to lowest terms" definition, so as to avoid a contradiction like -2 = (-8)^(1/3) = (-8)^(2/6) = ((-8)^2)^(1/6) = (64)^(1/6) = +2. On the other hand, you have academic papers such as from Tirosh/Even, "To Define or Not to Define: The Case of (-8)^1/3" (Educational Studies in Mathematics, Vol. 33 No. 3, Sep. 1997) which point out this problem and others, and recommend leaving them undefined. I think I'm personally convinced by that. Hopefully we all agree that irrational exponents to negative bases are undefined, so the left-hand side of the graph above really does need to be black almost everywhere.

And then of course you've got the case of 0^0, which I'm likewise convinced (again contrary to the books at my school) should be defined to be 1. On the one hand, the horizontal axis a=0 will definitely have a value of 1 for all b with that possible single exception. While on the other hand, the vertical axis has a value of 0 coming down from the top, but you're going to have a discontinuity at the origin no matter what; either a value of 1 when a=0, or, failing that, an undefined value as soon as you take an arbitrarily small step below the origin (since given negative power -a, 0^(-a) = 1/(0^a) = 1/0 which is undefined). So I figure you might as well define 0^0 = 1 and the loss in continuity on the vertical axis is immeasurably small.

In summary: Certainly not a picture I could have intuited, and one with unexpectedly complicated structure and more regions of controversy regarding definitions than I expected (granted such a fundamental function as b^a).

Possibly there's some additional use in seeing a spreadsheet of numerical values from the same region, below:


Download if you want:
- Java source code (JAVA) to generate the image
- Open Document Spreadsheet (ODS) for the numbers
- Wikipedia 3D graph of similar region (positive base only)

2012-03-31

Say What?

In a story on the giant Mega Millions lottery this weekend:
Accountant Ray Lousteau, who bought 55 Mega Millions tickets Friday in New Orleans, knows buying that many tickets doesn't mathematically increase his odds, and that his $55 could have gone elsewhere. He spent it anyway.

"Mathematically, it doesn't make a difference, and intellectually we know that. But for some reason buying more tickets makes you feel more lucky," Lousteau said. "Even people who know better are apt to feel that way."

Um... having more tickets in a lottery doesn't increase your chance of winning? How the hell does that work? And how did this get by both an accountant and the journalist writing the story?

2012-03-09

Google Divide by Zero

You know that Google automatically acts as a calculator, right? Type in any kind of math expression, and it automatically simplifies it in response -- including unit conversions of all sorts (very useful for that latter part, in my experience).

But here's something I discovered the other day: The calculator won't respond at all to any kind of division by zero. It won't say there's an error; it won't say it's undefined or not-a-number (NAN); it just won't trigger the calculator facility at all. It goes straight to a regular web search like it wasn't math at all. (I realized this after my first basic math class; carefully defined division and considered divide-by-zero, compared to a calculator error response, and then I asserted the same would happen in Google. Turns out that's not quite correct.)

This is true even if you try to hide the division-by-zero in some kind of very complicated expression (that's otherwise obviously math). Consider these:

And then contrast with the following:

I'm not sure if this is an oversight, or some tremendously subtle winking in-joke by our friends from Menlo Park. (Like: The calculator has to get triggered, do quite a bit of work before determing there's a divide-by-zero, and then decide to run away and hide itself from appearing.) Can you make Google Calculator admit to a divide-by-zero in any way?

2012-03-07

Going Commando

Yay, got my Commando-brand chalk holder with anodized aluminum barrel/handle in the mail. Hopefully this keeps me from shattering the chalk in my clenched fist every day from my math rage-outs. If this doesn't work, then I'll need to step up to some kind of military-grade titanium or somesuch...

2012-03-05

Times Tables

So first the first time this semester, the community college where I work gave me a class in remedial prealgebra (fundamental operations on integers, fractions, decimals, percent, etc.) to teach. Thinking that the class would be largely review, and not knowing where a good starting point would be (you can't always tell if a textbook starting location is good or not for the students in your program), I decided on the first day of class to give a sample pretest of 20 questions to see what stuff was generally easy for the class, and what stuff hard. That turned out to be an excellent idea, and I got some good data I can use to structure the class going forward.

Here's one thing I noticed as the class took the pretest: At least one girl was doing counting on her fingers: like a lot of it, and pretty rapidly, too. So I started wondering about that, because while they were certainly add/subtract problems, that was maybe less than half the test, and I was a bit puzzled at what she could be doing with all that counting.

So later, I asked a more senior adjunct lecturer about it, and here was his claim: A lot of schools now don't bother to teach "times tables" anymore. I guess this would be in the context of the corrosive "concepts vs. operations" argument in basic arithmetic: someone decided that it's most important to know that multiplication is the same as repeated addition, and so the only way students from a program like that know how to simplify 7×3 is to perform 7+7+7 (or worse, 3+3+3+3+3+3+3). And I suppose that would also be consistent with only understanding addition as repeated counting (i.e., perhaps not even memorizing addition tables). So possibly that would explain in this case why so much finger-based adding/counting was going on.

True or False?

2012-02-26

More Anti-Factoring Trees

Follow-up: Consider the article by McNeil, et. al. in COGNITION AND INSTRUCTION, 24(3), 367–385 (2006), on "Middle-School Students’ Understanding of the Equal Sign: The Books They Read Can’t Help" (link). In the conclusion they write:
In this study, the operations on both sides context was most effective in eliciting a relational understanding of the equal sign... Although the jury is still out, we argue that middle-school students would benefit from seeing more equal signs in an operations on both sides context.
Consider: Factoring seems like a golden opportunity to practice writing and reading operations on the right-hand side of the equals sign (i.e., use for anything other than simplifying/evaluating). And for that reason, using factoring trees instead of standard equation-writing is even more of a huge lost opportunity than I first thought.

2012-02-19

Words Matter!

Here's a thing that irritates me more and more over time: When a math problem doesn't have any words in yet. Most specifically: when it lacks an action verb on what you're supposed to do with it. For example, here's a problem that comes from a textbook I use (and similar stuff even pops up from time to time on our department-wide final exams):

For all x, 30x5 + 32x4 + 8x3 = ?

Well... it's equal to all kinds of friggin' stuff. Like: 30x5 + 32x4 + 8x3 + 1 - 1 and an infinite number of other things. Now, in this particular case, if it's a multiple-choice problem, then you can look at the proposed answers and infer that what's being requested is for the expression to be factored. Although you can still get in trouble if one of the options is only partly factored, but it's still technically equal to the original expression. Stuff like that. But this sample problem is definitely not a fair question, because you could not tell what action to take if it were posed completely alone, outside the context of a multiple-choice test (plus: many of our students' abilities to look at multiple-choice responses and back-infer intent will be shaky at best).

I think that this is a major symptom of a scurrilous disease that lets students get away with the false impression that for any given algebraic expression, there's some implied thing that you always "do" to it -- when that's absolutely, totally not the case. Different use-cases will require different actions to be taken (e.g.: sometimes to factor, and sometimes to simplify, which are opposites).

So once again: It really all comes down to a matter of reading. If students think they can "do" math through rote mechanical processes without reading the words -- at least a requested action to take, a single verb at minimum -- then they are tremendously, grievously in error. The #1 skill that I tell my algebra students they're expected to master is learning new vocabulary, so that we can have an intelligent discussion about math, and so they can follow the instructions on a test from me or anyone else (and more generally: make use of that learn-new-vocabulary skill elsewhere in their lives). Failing to phrase our math questions with clear, well-defined action requests in words is simply an atrocious example to set.

One last example: Take the expression 4(x2-9). There's all kinds of things we might have to do with this at different times, including but not limited to any the following (so: get in the habit of reading & writing the words carefully for any of these):
  • Simplify. (Answer: 4x2-36).
  • Factor. (Answer: 4(x+3)(x-3)).
  • Identify the Degree. (Answer: 2nd).
  • Determine the Roots. (Answer: +3 and -3).