Cool Wolfram Alpha Tricks I

Oy, always with the Wolfram Alpha! Yeah, it’s a neat toy. Anyway, let’s see what cool/interesting/useful stuff we can do with it.

So this trick is kind of mathy but I’ll explain as I go and we’ll let Wolfram Alpha do all of the heavy lifting.

Let’s assume I’m trying to put together a diet plan. I like bananas and greek-style yogurt so I want to have a diet consisting of just those foods. However, I’m not dumb so I’ll want to make sure I get enough nutrients from my diet plan so I don’t, you know, die of malnutrition or some such junk.

So what nutrients am I worried about? I’m mainly concerned about getting enough calcium and iron. (For the rest I’ll just take supplements or something.)

But how much should I get each day of each? Let’s ask Wolfram Alpha:

rdi calcium;rdi iron

NOTE: you can combine queries by using a semi-colon. Very handy. Also, RDI is Recommended Daily Intake.

The answer?

So how what’s in a banana?

Query:

one banana

Answer?:

All right, how many micrograms is a milligram, Wolfram Alpha?

micrograms in a milligram?

(Quiet, you. I used to know this.) Looks like there are 1000 micrograms in a milligram so a banana has .307 mg of iron. (I want everything in milligrams to make the math easier.)

How about greek-style yogurt? The individual servings are five ounces, so:

five ounces plain greek yogurt

Answer:

So I need 1000 milligrams of calcium and 18 milligrams of iron per day. How much yogurt and bananas do I have to eat to get my recommended allowance?  Fortunately, Wolfram Alpha will tell me (once I frame the question properly, of course).

If I get 188 mg of calcium from five ounces of greek yogurt and 5.9 mg from a banana and I need 1000 mg per day, the equation is:

188X + 5.9Y = 1000

where X is the number of five ounce containers of yogurt and Y is the number of bananas. Let’s do something similar for iron:

.225X + .307Y = 18

Now there are all sorts of values you can plug into each individual equation but I want the values that work for both equations. So let’s ask:

188X + 5.9Y = 1000;.225X + .307Y = 18

The solution?:

I will need to eat about three and one-half containers of plain greek-style yogurt and fifty-six bananas per day to meet my requirements for calcium and iron. (In case, I’m dubious about this solution, Wolfram Alpha even offers to take me through the steps it used.)

So it looks like this nutrition thing is more complicated than I thought.

Advertisements

Why We Hate Math II

I know that there are people who do not love their fellow man, and I hate people like that!
Tom Lehrer (1928 – )

This is the second in a planned ongoing series of posts where I try to figure out what problem(s) people have with math.
Today I’d like to talk about an essay in Harper’s by Nicholson Baker called “Wrong Answer: The Case Against Algebra 2”. Baker is an award-winning writer of both fiction and non-fiction whose most recent work is the novel “The Traveling Sprinkler”.
Just to digress a bit, I would note that he’s not making the case against math instruction altogether but for some reason is focused on Algebra 2. Just so we’re clear, Algebra 1 is basic algebra and covers topics that include (but are not limited to) inequalities, factoring polynomials, exponents and logarithms. Algebra 2 (sometimes known as Advanced Algebra) includes (but is not limited to) functions, quadratic equations, geometric equations and some trigonometry.

So let’s look at the arguments.

Baker begins by reminiscing about the good old days (you know, the 1500’s) when textbooks were written in Latin with notations that were made up out of whole cloth by their authors. He notes that we’re still teaching the same set of rules even today.
I’m not sure if he thinks this is a good thing or a bad thing. It’s not as if math techniques go out of style. If a rule doesn’t work, we fix it or discard it. (We’ll talk more about this in a bit.)
Then he gets quite poetic:

That’s what’s so amazing and mysterious about the mathematical universe. It doesn’t go out of date. It’s bigger than history. It offers seemingly superhuman powers of interlinkage. It’s true.

Okay, two paragraphs in and he’s gone off the rails. Math is possibly the most pragmatic skill set that a human being can possess. When humans wanted to stop living in caves and instead build houses and cities, they needed to have math to make sure their homes wouldn’t fall down and kill them. When you have cities, you have lots of people working together and that takes organizing, which needs math to assess wealth, track profits and loss and yes, to collect taxes.

You know who doesn’t need math? Australian aborigines. Their language has a word for ‘one’ and that’s about it. If you ask a man with four children how many he has, he’ll say, “Many.” There’s no talk about distances between places. Instead they map out their world with songs. There’s nothing wrong with this. It works for them. Humans are very pragmatic, when it comes right down to the day-to-day business of getting on with things.

I have a serious problem right off the bat with Baker presenting math as this mystical, seemingly otherworldly, mysterious thing that is beyond the human experience. Nothing could be further from the truth. Math exists because some human somewhere had a job to do (build a house, run a business, run a government) and needed an intellectual toolkit in order to do it.

All right, two paragraphs into a seven page article and I’m already annoyed. But let’s be fair and let Baker state his case. Moving on…..
For Exhibit A, Baker cites a poll taken on a Web site where 86% of respondents report hating math in general and algebra in particular. Other opinions on that same site:

Wow. Just….wow.
Out of respect for Mr. Baker, I will refrain from making snarky comments about the use of public Internet polls in scholarly argument. In addition, I’ll assume that he’s just warming up at this point and has not yet presented his case.
On the next page Baker approaches the vicinity of a point. He describes a math textbook:

The textbook’s cover is black, with a nice illustration of a looming robotic gecko. The gecko robot has green compound eyes and is held together with shiny chrome screws. It has a gold jaw and splayed gold toenails. Perhaps you like the idea of robotic geckos, and you might expect, reasonably, that there would be something about the mathematics either of geckos or robots somewhere in this book. There isn’t.

Zing! Take that, math lovers! No robot geckos for you! (Seriously, this sounds like a very cool book cover.) Just for sake of comparison, I looked up Baker’s “The Travelling Sprinkler” on Amazon.com and not only does the book cover NOT have a picture of sprinkler on it but the book itself isn’t about sprinklers! Oh, the cruel bait-and-switch scams inflicted on the reading public by the publishing industry!

Fine, I’m being childish. I mean, if you want to have the discussion about how messed up our public K-12 education system is and how California and Texas unduly influence our national textbook purchasing system, fine, we can have that discussion. But that’s beside the current point.
Baker continues:

So no lizards, no geckos, no robots. Here’s what you actually learn about rational functions in Chapter 8 of Pearson’s Algebra 2 Common Core:

“A rational function is a function that you can write in the form f(x)=P(x)/Q(x) where P(x) and Q(x) are polynomial functions. The domain of f(x) is all real numbers except those for which Q(x)=0.”

So now we begin to approach agreement. Assuming Baker is being honest in presenting this quote out of context, I agree that many math textbooks are poorly written for their target audience. Let’s also ignore the fact that if you got through Algebra I, then you already know what real numbers are and what a polynomial function is.
I’m not a professional author/writer/novelist like Mr. Baker but I did publish a textbook back in the day. Since it was my first book, I made the classic rookie mistake of letting my students (the intended audience) give me feedback on the book content. As a result, one of the things I did was, whenever I hit a spot where I thought things had gotten a bit complex, I paused and spent a few sentences explaining in clear language what had just happened. For the example given above, I might have added something like the following:

Remember, P(x) and Q(x) are just numbers. Since real numbers are simply those numbers that we can represent with a fraction, it makes sense the P(x)/Q(x) can represent all real numbers. The only exception is when Q(x) is zero, since dividing by zero is undefined.

I have no problem with complexity, as long as the author takes a moment to make sure everyone is on the same page. The more advanced students can ignore the aside and move ahead while everyone else can take a moment to let their brains cool. Like any area of study, math has a specialized vocabulary. Using the formal terminology lets students get used to the jargon.

Baker continues his dissection of the textbook:

“If a is a real number for which the denominator of a rational function f(x) is zero, then a is not in the domain of f(x). The graph of f(x) is not continuous at x=a and the function has a point of discontinuity.”

See how my little added explanatory text becomes useful? A function f(x) is continuous if, for every x, there is a result that we can put onto a graph. We therefore can draw an unbroken line through those points on the graph. However, since dividing by zero is undefined, if some x causes us to divide by zero, then we can’t plot that point and our line is broken, or discontinuous.
Baker goes on to cite a story problem about calculating free throw percentages in basketball. He’s doing well until this:

How very odd, you think: I don’t have to know any algebra at all in order to figure out that the answer to this free-throw question is 6. All I need is arithmetic and a little trial and error. But that’s not what the textbook wants. [emphasis mine]

What?!? The textbook doesn’t want you to just guess, it would actually prefer that you apply what you just learned to work out the answer in a precise, provable and most importantly, repeatable way?

If you were having an appendectomy, which technique would you prefer your surgeon use?

Just because the example problem is trivial, it doesn’t mean that the solution methodology is unimportant. Also, while I’ll agree that many story problems in math textbooks are typically awful, I’ve at least had some experience trying to come up with back-of-the-chapter exercises to let students apply what they’ve learned. It’s hard and a typical math textbook requires many hundreds more of these than my own book did.

Besides, this gets to the whole point of math. There are numbers all around us, every day — time, temperature, wind speed, velocity, mass, acceleration, force, luminance, what have you. Math gives us the tools to put these numbers in context and thus gain a better understanding of how the world around us works.
You may argue that not everyone has to have a deep understanding of math and with that I’ll agree. However, if nothing else, it’s extremely useful to know enough math to know when someone is lying to you.

This is my fundamental problem with the whole ‘math is icky’ crowd. By deliberately avoiding an entire field of knowledge, they leave themselves vulnerable to hucksters and charlatans. Look at a typical daily newspaper (for those of you born after 1980, go to a typical news Web site). How many of the stories (including the editorials) involve numbers? How many of them are using your fear of math against you in order to push a political or ideological agenda? If someone tries to sell me on their philosophy using numbers that are meaningless without proper context, they are knowingly committing fraud. But if you’re the type of person whose eyes glaze over when anything numerical comes up in the conversation, you’re the perfect mark for these con-men. This isn’t even a new thing. Darrel Huff’s seminal (and very readable) book “How to Lie With Statistics” was first published in 1954.

I’m not even going to go into the Stanford University study showing that the very act of learning math improves brain function.

Moving on….

After speaking with educators (and pausing to lambaste the Common Core educational standards as “micro-managerial, misbegotten” and “joy-stunting”) Baker proposes a new approach to math instruction:

We should, I think, create a new, one-year teaser course for ninth graders, which would briefly cover a few techniques of algebraic manipulation, some mind-stretching geometric proofs, some nifty things about parabolas and conic sections, and even perhaps a soft-core hint of the infinitesimal, change-explaining powers of calculus. Throw in some scatter plots and data analysis, a touch of mathematical logic, and several representative topics in math history and math appreciation.

As long as we have public schools that rely on local property values for their funding, this will never happen. Oh, perhaps in those special ‘charter schools’ where the administration can pick and choose what students are enrolled and they have additional corporate funding and sponsorship as well as an actively engaged group of parents, but otherwise, no. Plus, this entire essay so far was arguing against the forcible teaching of advanced algebra and now he proposes the forcible teaching of a melange of algebra, geometry, trigonometry, calculus, statistics and probability? Seriously?!?
Well, I’m exhausted. I’m just going to sum up the rest at this point. Baker does a decent job of putting education reform into an historical perspective except for this one sneaky sentence:

By 1950, at a time when only a quarter of American high school students were taking algebra, the nation’s technological prowess was the envy of the planet.

I call this sneaky because he completely buries the lede by not pointing out what else was happening in America during that time:

  • The top marginal income tax rate was 90%
  • Organized labor membership was at its peak
  • There was a thriving middle class
  • We had a strong manufacturing base, which along with a strong labor movement, meant that you could get a job with decent pay and benefits and support a family without a college degree.
  • The rest of the world was still rebuilding their infrastructure from the damage of the second World War.

Compare that to our situation today. It’s okay, I’ll be here when you get back.

Listen, nobody is denying that primary education is important and that it has problems. But there is no one thing you can point to and say, “If was just fix this, we’re good”. Yes, math is not taught consistently well, math textbooks aren’t consistently well-written and more math instruction is not the silver bullet that will fix our education system. It has ugly, messy, multifaceted problems that will most likely require ugly, messy, multi-faceted solutions.
I’d like to believe that Mr. Baker is making an honest effort to suggest improvements because that would make his arguments simply wrongheaded, rather than disingenuous. I could publish a similar essay arguing against forcing students to write research papers and that advanced writing classes are the reason that American students are dropping out of school. I would be no less wrong.