Tag Archives: algebra

FiveThirtyEight Riddler Express Solution

I’d not peeked at FiveThirtyEight’s The Riddler in a while when I saw Neema Salimi ‘s post about the June 22, 2018 Riddler Express   Neema argued his solution was accessible to Algebra 1 students–not always possible for FiveThirtyEight’s great logic puzzles–so I knew it was past time to return.

After my exploration, I’ve concluded this is DEFINITELY worth posing to any middle school learners (or others) in search of an interesting problem variation.

Following is my solution, three retrospective insights about the problem, a comparison to Neema’s solution, and a proposed alternative numeric approach I think many Algebra 1 students might actually attempt.

THE PROBLEM:

Here is a screenshot of the original problem posted on FiveThirtyEight (2nd item on this page).

If you’re familiar with rate problems from Algebra 1, this should strike you immediately as a “complexification” of D=R*T type problems.  (“Complexification” is what a former student from a couple years ago said happened to otherwise simple problems when I made them “more interesting.”)

MY SOLUTION:

My first thought simplified my later algebra and made for a much more dramatic ending!!  Since Michelle caught up with her boarding pass with 10 meters left on the walkway, I recognized those extra 10 meters as irrelevant, so I changed the initial problem to an equivalent question–from an initial 100 m to 90 m–having Michelle catch up with her boarding pass just as the belt was about to roll back under the floor!

Let W = the speed of the walkway in m/s.  Because Michelle’s boarding pass then traveled a distance of 90 m in W m/s, her boarding pass traveled a total \displaystyle \frac{90}{W} seconds.

If M = Michelle’s walking speed, then her total distance traveled is the initial 90 meters PLUS the distance she traveled in the additional 90 seconds after dropping her boarding pass.  Her speed at this time was (M-W)  m/s (subtracting W because she was moving against the walkway), so the additional distance she traveled was D = (M-W) \cdot 90, making her her total distance D_{Michelle} = 90 + 90(M-W).

Then Michelle realized she had dropped her boarding pass and turned to run back at (2M+W) m/s (adding to show moving with the walkway this time), and she had \displaystyle \frac{90}{W} - 90 seconds to catch it before it disappeared beneath the belt.  The subtraction is the time difference between losing the pass and realizing she lost it.  Substituting into D = R*T gives

\displaystyle 90 + 90(M-W)=(2M+W)* \left( \frac{90}{W} - 90 \right)

A little expansion and algebra cleanup …

\displaystyle 90 + 90M - 90W = 180 \frac{M}{W} - 180M + 90 - 90W

\displaystyle 90M = 180 \frac{M}{W} - 180M

\displaystyle 270M = 180 \frac{M}{W}

And multiplying by \displaystyle \frac{W}{270M} solves the problem:

\displaystyle W = \frac{2}{3}

INSIGHTS:

Insight #1:  Solving a problem is always nice, but I was thinking all along that I pulled off my solution because I’m very comfortable with algebraic notation.  This is certainly NOT true of most Algebra 1 students.

Insight #2:  This made me wonder about the viability of a numeric solution to the problem–an approach many first-year algebra students attempt when frutstrated.

Insight #3:  In the very last solution step, Michelle’s rate, M, completely dropped out of the problem.  That means the solution to this problem is independent of Michelle’s walking speed.

Wondering if other terms might be superfluous, too, I generalized my initial algebraic solution further with A = the initial distance before Michelle dropped her boarding pass and B = the additional time Michelle walked before realizing she had dropped the pass.

\displaystyle A + B(M-W)=(2M+W)* \left( \frac{A}{W} - B \right)

And solving for gives \displaystyle W = \frac{2A}{3B}.

So, the solution does depend on the initial distance traveled and the time before Michelle turns around, and it was simplified in the initial statement with A=B=90.  That all made sense after a few quick thought experiments.  With one more variation you can show that the scale factor between her walking and jogging speed is relevant, but not her walking speed.  But now it was clear that in all cases, Michelle’s walking speed is irrelevant!

COMPARING TO NEEMA:

My initial conclusion matched Neema’s solution, but I really liked my separate discovery that the answer was completely independent of Michelle’s walking speed.  In my opinion, those cool insights are not at all intuitive.

AN ALTERNATIVE NUMERIC APPROACH:

While this approach is just a series of special cases of the generic approach, I suspect many Algebra 1 students would likely get frustrated quickly by the multiple variable and attempt

Ignoring everything above, but using the same variables for simplicity, perhaps the easiest start is to assume the walkway moves at W=1 m/s and Michelle’s walking speed is M=2 m/s.  That means her outward speed against the walkway is (2-1) = 1 m/s.  She drops the pass at 90 meters after 90 seconds.  So the pass will be back at the start after 90 seconds, the additional time that Michelle walks before realizing her loss.

I could imagine many students I’ve taught working from this through some sort of intelligent numeric guess-and-check, adjusting the values of M and W until landing at \displaystyle W=\frac{2}{3}.  The fractional value of W would slow them down, but many would get it this way.

CONCLUSION:

I’m definitely pitching this question to my students in just a few weeks.  (Where did summer go?)  I’m deeply curious about how they’ll approach their solutions.  I”m convinced many will attempt–at least initially–playing with more comprehensible numbers.  Such approaches often give young learners the insights they need to handle algebra’s generalizations.

Powers of i

I was discussing integer powers of i in my summer Algebra 2 last month and started with the “standard” modulus-4 pattern I learned as a student and have always taught.  While not particularly insightful, my students and I considered another approach that might prove simpler for some.

TRADITIONAL APPROACH:

I began with the obvious i^0 and i^1 before invoking the definition of i to get i^2.  From these three you can see every time the power of i increases by 1, you multiply the result by i and simplify the result if possible using these first 3 terms.  The result of i^3 is simple,  taking the known results to

i_1

But i^4=-i^2=-(-1)=1, cycling back to the value initially found with i^0.  Continuing this procedure creates a modulus-4 pattern:

i_2

They noticed that to any multiple of 4 was 1, and other powers were i, -1, or –i, depending on how far removed they were from a multiple of 4.  For an algorithm to compute a simplified form of to an integer power, divide the power by 4, and raise i to the remainder (0, 1, 2, or 3) from that division.

They got the pattern and were ready to move on when one student who had glimpsed this in a math competition at some point noted he could “do it”, but it seemed to him that memorizing the list of 4 base powers was a necessary requirement to invoking the pattern.

Then recalled a comment I made on the first day of class.  I value memorizing as little mathematics as possible and using the mathematics we do know as widely as possible.  His challenge was clear:  Wasn’t asking students to use this 4-cycle approach just a memorization task in disguise?  If I believed in my non-memorization claim, shouldn’t there be another way to achieve our results using nothing more the definition of i?

A POTENTIAL IMPROVEMENT:

By definition, i = \sqrt{-1}, so it’s a very small logical stretch with inverse operations to claim i^2=-1.

Even Powers:  After trying some different examples, one student had an easy way to handle even powers.  For example, if n=148, she invoked an exponent rule “in reverse” to extract an i^2 term which she turned into a -1.  Because -1 to any integer power is either 1 or -1, she used the properties of negative numbers to odd and even powers to determine the sign of her answer.

i_3

Because any even power can always be written as the product of 2 and another number, this gave an easy way to handle half of all cases using nothing more than the definition of i and exponents of -1.

A third student pointed out another efficiency.  Because the final result depended only on whether the integer multiplied by 2 was even or odd, only the last two digits of n were even relevant.  That pattern also exists in the 4-cycle approach, but it felt more natural here.

Odd Powers:  Even powers were so simple, they were initially frustrated that odd powers didn’t seem to be, too.  Then the student who’d issued the memorization challenge said that any odd power of i was just the product of i and an even power of i.  Invoking the efficiency in the last paragraph for n=567, he found

i_4

CONCLUSION:

In the end, powers of i had become nothing more complicated than exponent properties and powers of -1.  The students seemed to have greater comfort with finding powers of complex numbers, but I have begun to question why algebra courses have placed so much emphasis on powers of i.

From one perspective, a surprising property of complex numbers for many students is that any operation on complex numbers creates another complex number.  While they are told that complex numbers are a closed set, to see complex numbers simplify so conveniently surprises many.

Another cool aspect of complex number operations is the stretch-and-rotate graphical property of complex number multiplication.   This is the basis of DeMoivre’s Theorem and explains why there are exactly 4 results when you repeatedly multiply any complex number by i–equivalent to stretching by a factor of 1 and rotating \frac{\pi}{2}.  Multiplying by 1 doesn’t change the magnitude of a number, and after 4 rotations of \frac{\pi}{2}, you are back at the original number.

So, depending on the future goals or needs of your students, there is certainly a reason to explore the 4-cycle nature of repeated multiplication by i.  If the point is just to compute a result, perhaps the 4-cycle approach is unnecessarily “complex”, and the odd/even powers of -1 is less computationally intense.  In the end, maybe it’s all about number sense.

My students discovered a more basic algorithm, but I’m more uncomfortable.  Just because we can ask our students a question doesn’t mean we should.  I can see connections from my longer studies, but do they see or care?  In this case, should they?

From Coins to Magic

Here’s a great problem or trick for a class exploration … or magic for parties.

DO THIS YOURSELF.

Grab a small handful of coins (it doesn’t matter how many), randomly flip them onto a flat surface, and count the number of tails.

Randomly pull off from the group into a separate pile the number of coins equal to the number of tails you just counted.  Turn over every coin in this new pile.

Count the number of tails in each pile.

You got the same number both times!

Why?

 

Marilyn Vos Savant posed a similar problem:

Say that a hundred pennies are on a table. Ninety of them are heads. With your eyes closed, can you separate all the coins into two groups so that each group has the same number of tails?

Savant’s solution is to pull any random 10 coins from the 100 and make a second pile.  Turn all the coins in the new pile over, et voila!  Both piles have an equal number of tails.

While Savant’s approach is much more prescriptive than mine, both solutions work.  Every time.  WHY?

THIS IS STRANGE:

You have no idea the state (heads or tails) of any of the coins you pull into the second pile.  It’s counterintuitive that the two piles could ever contain the same number of tails.

Also, flipping the coins in the new pile seems completely arbitrary, and yet after any random pull & flip, the two resulting piles always hold the same number of tails.

Enter the power (and for young people, the mystery) of algebra to generalize a problem, supporting an argument that holds for all possibilities simultaneously.

HOW IT WORKS:

The first clue to this is the misdirection in Savant’s question.  Told that there are 90 heads, you are asked to make the number of tails equivalent.  In both versions, the number of TAILS in the original pile is the number of coins pulled into the second pile.  This isn’t a coincidence; it’s the key to the solution.

In any pile of randomly flipped coins (they needn’t be all or even part pennies), let N be the number tails.  Create your second pile by pulling a random coins from the initial pile.  Because the coins are randomly selected, you don’t know how many tails are in the new pile, so let that unknown number of coins be X .  That means 0 \le X \le N, leaving N-X tails in the first pile, and N-X heads in the new pile.  (Make sure you understand that last bit!)  That means if you flip all the coins in the second pile, those heads will become tails, and you are guaranteed exactly N-X tails in both piles.

Cool facts:

  • You can’t say with certainty how many tails will be in both piles, but you know they will be the same.
  • The total number of coins you start with is completely irrelevant.
  • While the given two versions of the problem make piles with equal numbers of heads, this “trick” can balance heads or tails.  To balance heads instead, pull from the initial coins into a second pile the number of heads.  When you flip all the coins in the second pile, both piles will now contain the same number of heads.

A PARTY WONDER or SOLID PROBLEM FOR AN ALGEBRA CLASS:

If you work on your showmanship, you can baffle others with this.  For my middle school daughter, I counted off the “leave alone” pile and then flipped the second pile.  I also let her flip the initial set of coins and tell me each time whether she wanted me to get equal numbers of heads or tails.  I looked away as she shuffled the coins and pulled off the requisite number of coins without looking.

She’s figured out HOW I do it, but as she is just starting algebra, she doesn’t have the abstractness yet to fully generalize the big solution.  She’ll get there.

I could see this becoming a fun data-gathering project for an algebra class.  It would be cool to see how someone approaches this with a group of students.

 

Party Ratios

I find LOTS of great middle school problems from @Five_Triangles on Twitter.  Their post two days ago was no exception.

The problem requires a little stamina, but can be approached many ways–two excellent criteria for worthy student explorations.  That it has some solid extensions makes it even better.  Following are a few different solution approaches some colleagues and I created.

INITIAL THOUGHTS, VISUAL ORGANIZATION, & A SOLUTION

The most challenging part of this problem is data organization.  My first thoughts were for a 2-circle Venn Diagram–one for gender and one for age.  And these types of Venn Diagrams are often more easily understood, in my experience, in 2×2 Table form with extra spaces for totals.  Here’s what I set up initially.

ratio2

The ratio of Women:Girls was 11:4, so the 24 girls meant each “unit” in this ratio accounted for 24/4=6 people.  That gave 11*6=66 women and 66+24=90 females.

ratio3

At this point, my experience working with algebraic problems tempted me to overthink the situation.  I was tempted to let B represent the unknown number of boys and set up some equations to solve.  Knowing that most 6th graders would not think about variables, I held back that instinct in an attempt to discover what a less-experienced mind might try. I present my initial algebra solution below.

The 5:3 Male:Female ratio told me that each “gender unit” represented 90/3=30 people.  That meant there were 5*30=150 men and 240 total people at the party.

ratio4

Then, the 4:1 Adult:Children ratio showed how to age-divide every group of 5 partygoers.  With 240/5=48 such groups, there were 48 children and 4*48=192 adults.  Subtracting the already known 66 women gave the requested answer:  192-66=126 men.

ratio5

While this Venn Diagram/Table approach made sense to me, I was concerned that it was a moderately sophisticated and not quite intuitive problem-solving technique for younger middle school students.

WHAT WOULD A MIDDLE SCHOOLER THINK?

A middle school teaching colleague, Becky, offered a different solution I could see students creating.

Completely independently, she solved the problem in exactly the same order I did using ratio tables to manage the scaling at each step instead of my “unit ratios”.  I liked her visual representation of the 4:1 Adults:Children ratio to find the number of adults, which gave the requested number of men.  I suspect many more students would implicitly or explicitly use some chunking strategies like the visual representation to work the ratios.

Ratio1

 

WHY HAVE JUST ONE SOLUTION?

Math problems involving ratios can usually be opened up to allow multiple, or even an infinite number of solutions.  This leads to some interesting problem extensions if you eliminate the “24 girls” restriction.  Here are a few examples and sample solutions.

What is the least number of partygoers?

For this problem, notice from the table above that all of the values have a common factor of 6.  Dividing the total partygoers by this reveals that 240/6=40 is the least number.  Any multiple of this number is also a legitimate solution.

Interestingly, the 11:4 Women:Girls ratio becomes explicitly obvious when you scale the table down to its least common value.

ratio6My former student and now colleague, Teddy, arrived at this value another way.  Paraphrasing, he noted that the 5:3 Male:Female ratio meant any valid total had to be a multiple of 5+3=8.  Likewise, the 4:1 Adult:Child ratio requires totals to be multiples of 4+1=5.  And the LCM of 8 & 5 is 40, the same value found in the preceding paragraph.

What do all total partygoer numbers have in common?

As explained above, any multiple of 40 is a legitimate number of partygoers.

If the venue could support no more than 500 attendees, what is the maximum number of women attending?

12*40=480 is the greatest multiple of 40 below 500.  Because 480 is double the initial problem’s total, 66*2=132 is the maximum number of women.

Note that this can be rephrased to accommodate any other gender/age/total target.

Under the given conditions, will the number of boys and girls at the party ever be identical?

As with all ratio problems, larger values are always multiples of the least common solution.  That means the number of boys and girls will always be identical or always be different.  From above, you can deduce that the numbers of boys and girls at the party under the given conditions will both be multiples of 4.

What variations can you and/or your students create?

RESOLVING THE INITIAL ALGEBRA

Now to the solution variation I was initially inclined to produce.  After initially determining 66 women from the given 24 girls, let B be the unknown number of boys.  That gives B+24 children.  It was given that adults are 4 times as numerous as children making the number of adults 4(B+24)=4B+96.  Subtracting the known 66 women leaves 4B+30 men.  Compiling all of this gives

ratio7

The 5:3 Male:Female ratio means \displaystyle \frac{5}{3} = \frac{5B+30}{90} \longrightarrow B=24, the same result as earlier.

 

ALGEBRA OVERKILL

Winding through all of that algebra ultimately isn’t that computationally difficult, but it certainly is more than typical 6th graders could handle.

But the problem could be generalized even further, as Teddy shared with me.  If the entire table were written in variables with W=number of women, M=men, G=girls, and B=boys, the given ratios in the problem would lead to a reasonably straightforward 4×4 system of equations.  If you understand enough to write all of those equations, I’m certain you could solve them, so I’d feel confident allowing a CAS to do that for me.  My TI-Nspire gives this.

ratio8

And that certainly isn’t work you’d expect from any 6th grader.

CONCLUSION

Given that the 11:4 Women:Girls ratio was the only “internal” ratio, it was apparent in retrospect that all solutions except the 4×4 system approach had to find the female values first.  There are still several ways to resolve the problem, but I found it interesting that while there was no “direct route”, every reasonable solution started with the same steps.

Thanks to colleagues Teddy S & Becky M for sharing their solution proposals.

Best Algebra 2 Lab Ever

This post shares what I think is one of the best, inclusive, data-oriented labs for a second year algebra class.  This single experiment produces linear, quadratic, and exponential (and logarithmic) data from a lab my Algebra 2 students completed this past summer.  In that class, I assigned frequent labs where students gathered real data, determined models to fit that data, and analyzed goodness of the models’ fit to the data.   I believe in the importance of doing so much more than just writing an equation and moving on.

For kicks, I’ll derive an approximation for the coefficient of gravity at the end.

THE LAB:

On the way to school one morning last summer, I grabbed one of my daughters’ “almost fully inflated” kickballs and attached a TI CBR2 to my laptop and gathered (distance, time) data from bouncing the ball under the Motion Sensor.  NOTE:  TI’s CBR2 can connect directly to their Nspire and TI84 families of graphing calculators.  I typically use computer-based Nspire CAS software, so I connected the CBR via my laptop’s USB port.  It’s crazy easy to use.

One student held the CBR2 about 1.5-2 meters above the ground while another held the ball steady about 20 cm below the CBR2 sensor.  When the second student released the ball, a third clicked a button on my laptop to gather the data:  time every 0.05 seconds and height from the ground.  The graphed data is shown below.  In case you don’t have access to a CBR or other data gathering devices, I’ve uploaded my students’ data in this Excel file.

Bounce1

Remember, this is data was collected under far-from-ideal conditions.  I picked up a kickball my kids left outside on my way to class.  The sensor was handheld and likely wobbled some, and the ball was dropped on the well-worn carpet of our classroom floor.  It is also likely the ball did not remain perfectly under the sensor the entire time.  Even so, my students created a very pretty graph on their first try.

For further context, we did this lab in the middle of our quadratics unit that was preceded by a unit on linear functions and another on exponential and logarithmic functions.  So what can we learn from the bouncing ball data?

LINEAR 1:  

While it is very unlikely that any of the recorded data points were precisely at maximums, they are close enough to create a nice linear pattern.

As the height of a ball above the ground helps determine the height of its next bounce (height before –> energy on impact –> height after), the eight ordered pairs (max height #n, max height #(n+1) ) from my students’ data are shown below

bounce2

This looks very linear.  Fitting a linear regression and analyzing the residuals gives the following.

bounce3

The data seems to be close to the line, and the residuals are relatively small, about evenly distributed above and below the line, and there is no apparent pattern to their distribution.  This confirms that the regression equation, y=0.673x+0.000233, is a good fit for the = height before bounce and = height after bounce data.

NOTE:  You could reasonably easily gather this data sans any technology.  Have teams of students release a ball from different measured heights while others carefully identify the rebound heights.

The coefficients also have meaning.  The 0.673 suggests that after each bounce, the ball rebounded to 67.3%, or 2/3, of its previous height–not bad for a ball plucked from a driveway that morning.  Also, the y-intercept, 0.000233, is essentially zero, suggesting that a ball released 0 meters from the ground would rebound to basically 0 meters above the ground.  That this isn’t exactly zero is a small measure of error in the experiment.

EXPONENTIAL:

Using the same idea, consider data of the form (x,y) = (bounce number, bounce height). the graph of the nine points from my students’ data is:

bounce4

This could be power or exponential data–something you should confirm for yourself–but an exponential regression and its residuals show

bounce5

While something of a pattern seems to exist, the other residual criteria are met, making the exponential regression a reasonably good model: y = 0.972 \cdot (0.676)^x.  That means bounce number 0, the initial release height from which the downward movement on the far left of the initial scatterplot can be seen, is 0.972 meters, and the constant multiplier is about 0.676.  This second number represents the percentage of height maintained from each previous bounce, and is therefore the percentage rebound.  Also note that this is essentially the same value as the slope from the previous linear example, confirming that the ball we used basically maintained slightly more than 2/3 of its height from one bounce to the next.

And you can get logarithms from these data if you use the equation to determine, for example, which bounces exceed 0.2 meters.

bounce12

So, bounces 1-4 satisfy the requirement for exceeding 0.20 meters, as confirmed by the data.

A second way to invoke logarithms is to reverse the data.  Graphing x=height and y=bounce number will also produce the desired effect.

QUADRATIC:

Each individual bounce looks like an inverted parabola.  If you remember a little physics, the moment after the ball leaves the ground after each bounce, it is essentially in free-fall, a situation defined by quadratic movement if you ignore air resistance–something we can safely assume given the very short duration of each bounce.

I had eight complete bounces I could use, but chose the first to have as many data points as possible to model.  As it was impossible to know whether the lowest point on each end of any data set came from the ball moving up or down, I omitted the first and last point in each set.  Using (x,y) = (time, height of first bounce) data, my students got:

bounce6

What a pretty parabola.  Fitting a quadratic regression (or manually fitting one, if that’s more appropriate for your classes), I get:

bounce7

Again, there’s maybe a slight pattern, but all but two points are will withing  0.1 of 1% of the model and are 1/2 above and 1/2 below.  The model, y=-4.84x^2+4.60x-4.24, could be interpreted in terms of the physics formula for an object in free fall, but I’ll postpone that for a moment.

LINEAR 2:

If your second year algebra class has explored common differences, your students could explore second common differences to confirm the quadratic nature of the data.  Other than the first two differences (far right column below), the second common difference of all data points is roughly 0.024.  This raises suspicions that my student’s hand holding the CBR2 may have wiggled during the data collection.

bounce8

Since the second common differences are roughly constant, the original data must have been quadratic, and the first common differences linear. As a small variation for each consecutive pair of (time, height) points, I had my students graph (x,y) = (x midpoint, slope between two points):

bounce10

If you get the common difference discussion, the linearity of this graph is not surprising.  Despite those conversations, most of my students seem completely surprised by this pattern emerging from the quadratic data.  I guess they didn’t really “get” what common differences–or the closely related slope–meant until this point.

bounce11

Other than the first three points, the model seems very strong.  The coefficients tell an even more interesting story.

GRAVITY:

The equation from the last linear regression is y=4.55-9.61x.  Since the data came from slope, the y-intercept, 4.55, is measured in m/sec.  That makes it the velocity of the ball at the moment (t=0) the ball left the ground.  Nice.

The slope of this line is -9.61.  As this is a slope, its units are the y-units over the x-units, or (m/sec)/(sec).  That is, meters per squared second.  And those are the units for gravity!  That means my students measured, hidden within their data, an approximation for coefficient of gravity by bouncing an outdoor ball on a well-worn carpet with a mildly wobbly hand holding a CBR2.  The gravitational constant at sea-level on Earth is about -9.807 m/sec^2.  That means, my students measurement error was about \frac{9.807-9.610}{9.807}=2.801%.  And 2.8% is not a bad measurement for a very unscientific setting!

CONCLUSION:

Whenever I teach second year algebra classes, I find it extremely valuable to have students gather real data whenever possible and with every new function, determine models to fit their data, and analyze the goodness of the model’s fit to the data.  In addition to these activities just being good mathematics explorations, I believe they do an excellent job exposing students to a few topics often underrepresented in many secondary math classes:  numerical representations and methods, experimentation, and introduction to statistics.  Hopefully some of the ideas shared here will inspire you to help your students experience more.

Chemistry, CAS, and Balancing Equations

Here’ s a cool application of linear equations I first encountered about 20 years ago working with chemistry colleague Penney Sconzo at my former school in Atlanta, GA.  Many students struggle early in their first chemistry classes with balancing equations.  Thinking about these as generalized systems of linear equations gives a universal approach to balancing chemical equations, including ionic equations.

This idea makes a brilliant connection if you teach algebra 2 students concurrently enrolled in chemistry, or vice versa.

FROM CHEMISTRY TO ALGEBRA

Consider burning ethanol.  The chemical combination of ethanol and oxygen, creating carbon dioxide and water:

C_2H_6O+3O_2 \longrightarrow 2CO_2+3H_2O     (1)

But what if you didn’t know that 1 molecule of ethanol combined with 3 molecules of oxygen gas to create 2 molecules of carbon dioxide and 3 molecules of water?  This specific set coefficients (or multiples of the set) exist for this reaction because of the Law of Conservation of Matter.  While elements may rearrange in a chemical reaction, they do not become something else.  So how do you determine the unknown coefficients of a generic chemical reaction?

Using the ethanol example, assume you started with

wC_2H_6O+xO_2 \longrightarrow yCO_2+zH_2O     (2)

for some unknown values of w, x, y, and z.  Conservation of Matter guarantees that the amount of carbon, hydrogen, and oxygen are the same before and after the reaction.  Tallying the amount of each element on each side of the equation gives three linear equations:

Carbon:  2w=y
Hydrogen:  6w=2z
Oxygen:  w+2x=2y+z

where the coefficients come from the subscripts within the compound notations.  As one example, the carbon subscript in ethanol ( C_2H_6O ) is 2, indicating two carbon atoms in each ethanol molecule.  There must have been 2w carbon atoms in the w ethanol molecules.

This system of 3 equations in 4 variables won’t have a unique solution, but let’s see what my Nspire CAS says.  (NOTE:  On the TI-Nspire, you can solve for any one of the four variables.  Because the presence of more variables than equations makes the solution non-unique, some results may appear cleaner than others.  For me, w was more complicated than z, so I chose to use the z solution.)

chem1

All three equations have y in the numerator and denominators of 2.  The presence of the y indicates the expected non-unique solution.  But it also gives me the freedom to select any convenient value of y I want to use.  I’ll pick y=2 to simplify the fractions.  Plugging in gives me values for the other coefficients.

chem2

Substituting these into (2) above gives the original equation (1).

VARIABILITY EXISTS

Traditionally, chemists write these equations with the lowest possible natural number coefficients, but thinking of them as systems of linear equations makes another reality obvious.  If 1 molecule of ethanol combines with 3 molecules of hydrogen gas to make 2 molecules of carbon dioxide and 3 molecules of water, surely 10 molecule of ethanol combines with 30 molecules of hydrogen gas to make 20 molecules of carbon dioxide and 30 molecules of water (the result of substituting y=20 instead of the y=2 used above).

You could even let y=1 to get z=\frac{3}{2}, w=\frac{1}{2}, and x=\frac{3}{2}.  Shifting units, this could mean a half-mole of ethanol and 1.5 moles of hydrogen make a mole of carbon dioxide and 1.5 moles of water.  The point is, the ratios are constant.  A good lesson.

ANOTHER QUICK EXAMPLE:

Now let’s try a harder one to balance:  Reacting carbon monoxide and hydrogen gas to create octane and water.

wCO + xH_2 \longrightarrow y C_8 H_{18} + z H_2 O

Setting up equations for each element gives

Carbon:  w=8y
Oxygen:  w=z
Hydrogen:  2x=18y+2z

I could simplify the hydrogen equation, but that’s not required.  Solving this system of equations gives

chem3

Nice.  No fractions this time.  Using y=1 gives w=8, x=17, and z=8, or

8CO + 17H_2 \longrightarrow C_8 H_{18} + 8H_2 O

Simple.

EXTENSIONS TO IONIC EQUATIONS:

Now let’s balance an ionic equation with unknown coefficients a, b, c, d, e, and f:

a Ba^{2+} + b OH^- + c H^- + d PO_4^{3-} \longrightarrow eH_2O + fBa_3(PO_4)_2

In addition to writing equations for barium, oxygen, hydrogen, and phosphorus, Conservation of Charge allows me to write one more equation to reflect the balancing of charge in the reaction.

Barium:  a = 3f
Oxygen:  b +4d = e+8f
Hydrogen:  b+c=2e
Phosphorus:  d=2f
CHARGE (+/-):  2a-b-c-3d=0

Solving the system gives

chem4

Now that’s a curious result.  I’ll deal with the zeros in a moment.  Letting d=2 gives f=1 and a=3, indicating that 3 molecules of ionic barium combine with 2 molecules of ionic phosphate to create a single uncharged molecule of barium phosphate precipitate.

The zeros here indicate the presence of “spectator ions”.  Basically, the hydroxide and hydrogen ions on the left are in equal measure to the liquid water molecule on the right.  Since they are in equal measure, one solution is

3Ba^{2+}+6OH^- +6H^-+2PO_4^{3-} \longrightarrow 6H_2O + Ba_3(PO_4)_2

CONCLUSION:

You still need to understand chemistry and algebra to interpret the results, but combining algebra (and especially a CAS) makes it much easier to balance chemical equations and ionic chemical equations, particularly those with non-trivial solutions not easily found by inspection.

The minor connection between science (chemistry) and math (algebra) is nice.

As many others have noted, CAS enables you to keep your mind on the problem while avoiding getting lost in the algebra.

Circle and Square

Here’s another great geometry + algebra problem, posed by Megan Schmidt and pitched by Justin Aion to some students in his Geometry class.

Following is the problem as Justin posed it yesterday.

circle1

Justin described the efforts of three of his students’ on his his ‘blog.  Following is my more generalized approach.  Don’t read further if you want to solve this problem for yourself!

SOLUTION ALERT!!!

My first instinct in any case like this is build it in a dynamic geometry package and play.  Using my TI-Nspire, without loss of generality, I graphed a circle centered at the origin, constructed a tangent segment at the bottom of the circle centered on the y-axis, and then used that segment to construct a square.  I recognized that the locus of the upper right corners of all such squares would form a line.

circle2

That made it clear to me that for any circle, there was a unique square that intersected the circle three times as Megan had posed.

Seeing this and revealing its algebraic bias, my mind conceived an algebraic solution.  Assuming the radius of the circle is R, the equation of my circle is x^2+y^2=R^2 making the lower y-intercept of the circle (0,-R).  That made y=2x-R the locus line containing the upper right corner of the square.

circle6

To find generic coordinates of the upper right corner of the square in terms of R, I just needed to solve the system of equations containing the circle and the line.  That’s easy enough to compute by hand if you can handle quadratic algebra.  That manipulation is not relevant right now, so my Nspire CAS’s version is:

circle4

The output confirms the two intersections are (0,-R) and the unknown at \displaystyle \left( \frac{4R}{5} , \frac{3R}{5} \right).

Because of the horizontal symmetry of the square with respect to the y-axis, the system solution shows that the generic length of the side of the square is \displaystyle 2\left( \frac{4R}{5} \right) = \frac{8R}{5} .  The circle’s y-intercept at (0,-R) means the generic diameter of the circle is 2R.

Therefore, the generic ratio of the circle’s diameter to the square’s side length is

\displaystyle \frac{diameter}{side} = \frac{2R}{(8R)/5} = \frac{5}{4}.

And this is independent of the circle’s radius!  The diameter of the circle is always \frac{5}{4} of the square’s side.

CONCLUSION:

For Megan’s particular case with a side length of 20, that gives a circle diameter of 25, confirming Justin’s students’ solution.

Does anyone have a different approach?  I’m happy to compile and share all I get.

AN ASIDE:

While not necessary for the generalized solution, it was fun to see a 3-4-5 right triangle randomly appear in Quadrant 1.

circle5

Powers of 2

Yesterday, James Tanton posted a fun little problem on Twitter:

2powersSo, 2 is one more than 1=2^0, and 8 is one less than 9=2^3$, and Dr. Tanton wants to know if there are any other powers of two that are within one unit of a perfect square.

While this problem may not have any “real-life relevance”, it demonstrates what I describe as the power and creativity of mathematics.  Among the infinite number of powers of two, how can someone know for certain if any others are or are not within one unit of a perfect square?  No one will ever be able to see every number in the list of powers of two, but variables and mathematics give you the tools to deal with all possibilities at once.

For this problem, let D and N be positive integers.  Translated into mathematical language, Dr. Tanton’s problem is equivalent to asking if there are values of D and N for which 2^D=N^2 \pm 1.  With a single equation in two unknowns, this is where observation and creativity come into play.  I suspect there may be more than one way to approach this, but my solution follows.  Don’t read any further if you want to solve this for yourself.

WARNING:  SOLUTION ALERT!

Because D and N are positive integers, the left side of 2^D=N^2 \pm 1,  is always even.   That means N^2, and therefore N must be odd.

Because N is odd, I know N=2k+1 for some whole number k.  Rewriting our equation gives 2^D=(2k+1)^2 \pm 1, and the right side equals either 4k^2+4k or 4k^2+4k+2.

Factoring the first expression gives 2^D=4k^2+4K=4k(k+1).   Notice that this is the product of two consecutive integers, k and k+1, and therefore one of these factors (even though I don’t know which one) must be an odd number.  The only odd number that is a factor of a power of two is 1, so either k=1 or k+1=1 \rightarrow k=0.  Now, k=1 \longrightarrow N=3 \longrightarrow D=3 and k=0 \longrightarrow N=1 \longrightarrow D=0, the two solutions Dr. Tanton gave.  No other possibilities are possible from this expression, no matter how far down the list of powers of two you want to go.

But what about the other expression?  Factoring again gives 2^D=4k^2+4k+2=2 \cdot \left( 2k^2+2k+1 \right) .  The expression in parentheses must be odd because its first two terms are both multiplied by 2 (making them even) and then one is added (making the overall sum odd).  Again, 1 is the only odd factor of a power of two, and this happens in this case only when k=0 \longrightarrow N=1 \longrightarrow D=0, repeating a solution from above.

Because no other algebraic solutions are possible, the two solutions Dr. Tanton gave in the problem statement are the only two times in the entire universe of perfect squares and powers of two where elements of those two lists are within a single unit of each other.

Math is sweet.

Dynamic Linear Programming

My department is exploring the pros and cons of different technologies for use in teaching our classes. Two teachers shared ways to use Desmos and GeoGebra in lessons using inequalities on one day; we explored the same situation using the TI-Nspire in the following week’s meeting.  For this post, I’m assuming you are familiar with solving linear programming problems.  Some very nice technology-assisted exploration ideas are developed in the latter half of this post.

My goal is to show some cool ways we discovered to use technology to evaluate these types of problems and enhance student exploration.  Our insights follow the section considering two different approaches to graphing the feasible region.  For context, we used a dirt-biker linear programming problem from NCTM’s Illuminations Web Pages.

DirtBikes

Assuming x = the number of Riders built and = the number of Rovers built,  inequalities for this problem are

linear1

We also learn on page 7 of the Illuminations activity that Apu makes a $15 profit on each Rider and $30 per Rover.  That means an Optimization Equation for the problem is Profit=15x+30y.

GRAPHING THE FEASIBLE REGION:

Graphing all of the inequalities simultaneously determines the feasible region for the problem.  This can be done easily with all three technologies, but the Nspire requires solving the inequalities for y first.  Therefore, the remainder of this post compares the Desmos and GeoGebra solutions.  Because the Desmos solutions are easily accessible as Web pages and not separate files, further images will be from Desmos until the point where GeoGebra operates differently.

Both Desmos and GeoGebra can graph these inequalities from natural inputs–inputing math sentences as you would write them from the problem information:  without solving for a specific variable.  As with many more complicated linear programming problems, graphing all the constraints at once sometimes makes a visually complicated feasible region graph.

linear2

So, we decided to reverse all of our inequalities, effectively  shading the non-feasible region instead.  Any points that emerged unshaded were possible solutions to the Dirt Bike problem (image below, file here).  All three softwares shift properly between solid and dashed lines to show respective included and excluded boundaries.

linear3

Traditional Approach – I (as well as almost all teachers, I suspect) have traditionally done some hand-waving at this point to convince (or tell) students that while any ordered pair in the unshaded region or on its boundary (all are dashed) is a potential solution, any optimal solution occurs on the boundary of the feasible region.  Hopefully teachers ask students to plug ordered pairs from the feasible region into the Optimization Equation to show that the profit does vary depending on what is built (duh), and we hope they eventually discover (or memorize) that the maximum or minimum profit occurs on the edges–usually at a corner for the rigged setups of most linear programming problems in textbooks.  Thinking about this led to several lovely technology enhancements.

INSIGHT 1:  Vary a point.

During our first department meeting, I was suddenly dissatisfied with how I’d always introduced this idea to my classes.  That unease and our play with the Desmos’ simplicity of adding sliders led me to try graphing a random ordered pair.  I typed (a,b) on an input line, and Desmos asked if I wanted sliders for both variables.  Sure, I thought (image below, file here).

linear7

— See my ASIDE note below for a philosophical point on the creation of (a,b).
— GeoGebra and the Nspire require one additional step to create/insert sliders, but GeoGebra’s naming conventions led to a smoother presentation–see below.

BIG ADVANTAGE:  While the Illuminations problem we were using had convenient vertices, we realized that students could now drag (a,b) anywhere on the graph (especially along the boundaries and to vertices of the feasible region) to determine coordinates.  Establishing exact coordinates of those points still required plugging into equations and possibly solving systems of equations (a possible entry for CAS!).  However discovered, critical coordinates were suddenly much easier to identify in any linear programming question.

HUGE ADVANTAGE:  Now that the point was variably defined, the Optimization Equation could be, too!  Rewriting and entering the Optimation Equation as an expression in terms of a and b, I took advantage of Desmos being a calculator, not just a grapher.  Notice the profit value on the left of the image.

linear6

With this, users can drag (a,b) and see not only the coordinates of the point, but also the value of the profit at the point’s current location!  Check out the live version here to see how easily Desmos updates this value as you drag the point.

From this dynamic setup, I believe students now can learn several powerful ideas through experimentation that traditionally would have been told/memorized.

STUDENT DISCOVERIES:

  1. Drag (a,b) anywhere in the feasible region.  Not surprisingly, the profit’s value varies with (a,b)‘s location.
  2. The profit appears to be be constant along the edges.  Confirm this by dragging (a,b) steadily along any edge of the feasible region.
  3. While there are many values the profit could assume in the feasible region, some quick experimentation suggests that the largest and smallest profit values occur at the vertices of the feasible region.
  4. DEEPER:  While point 3 is true, many teachers and textbooks mistakenly proclaim that solutions occur only at vertices.  In fact, it is technically possible for a problem to have an infinite number optimal solutions.  This realization is discussed further in the CONCLUSION.

ASIDE:  I was initially surprised that the variable point on the Desmos graph was directly draggable.  From a purist’s perspective, this troubled me because the location of the point depends on the values of the sliders.  That said, I shouldn’t be able to move the point and change the values of its defining sliders.  Still, the simplicity of what I was able to do with the problem as a result of this quickly led me to forgive the two-way dependency relationships between Desmos’ sliders and the objects they define.

GEOGEBRA’S VERSION:

In some ways, this result was even easier to create on GeoGebra.  After graphing the feasible region, I selected the Point tool and clicked once on the graph.  Voila!  The variable point was fully defined.  This avoids the purist issue I raised in the ASIDE above.  As a bonus, the point was also named.

linear4Unlike Desmos, GeoGebra permits multi-character function names.  Defining Profit(x,y)=15x+30y and entering Profit(A) allowed me to see the profit value change as I dragged point A as I did in the Desmos solution. The Profit(A) value was dynamically computed in GeoGebra as a number value in its Algebra screen.  A live version of this construction is on GeoGebraTube here.

linear5

At first, I wasn’t sure if the last command–entering a single term into a multivariable term–would work, but since A was a multivariable point, GeoGebra nicely handled the transition.  Dragging A around the feasible region updated the current profit value just as easily as Desmos did.

INSIGHT 2:  Slide a line.

OK, this last point is really an adaptation of a technique I learned from some of my mentors when I started teaching years ago, but how I will use it in the future is much cleaner and more expedient.  I thought line slides were a commonly known technique for solving linear programming problems, but conversations with some of my colleagues have convinced me that not everyone knows the approach.

Recall that each point in the feasible region has its own profit value.  Instead of sliding a point to determine a profit, why not pick a particular profit and determine all points with that profit?  As an example, if you wanted to see all points that had a profit of $100, the Optimization Equation becomes Profit=100=15x+30y.  A graph of this line (in solid purple below) passes through the feasible region.  All points on this line within the feasible region are the values where Apu could build dirt bikes and get a profit of $100.  (Of course, only integer ordered pairs are realistic.)

linear8

You could replace the 100 in the equation with different values and repeat the investigation.  But if you’re thinking already about the dynamic power of the software, I hope you will have realized that you could define profit as a slider to scan through lots of different solutions with ease after you reset the slider’s bounds.  One instance is shown below; a live Desmos version is here.

linear9

Geogebra and the Nspire set up the same way except you must define their slider before you define the line.  Both allow you to define the slider as “profit” instead of just “p”.

CONCLUSIONS:

From here, hopefully it is easy to extend Student Discovery 3 from above.  By changing the P slider, you see a series of parallel lines (prove this!).  As the value of P grows, the line goes up in this Illuminations problem.  Through a little experimentation, it should be obvious that as P rises , the last time the profit line touches the feasible region will be at a vertex.  Experiment with the P slider here to convince yourself that the maximum profit for this problem is $165 at the point (x,y)=(3,4).  Apu should make 3 Riders and 4 Rovers to maximize profit.  Similarly (and obviously), Apu’s minimum profit is $0 at (x,y)=(0,0) by making no dirt bikes.

While not applicable in this particular problem, I hope you can see that if an edge of the feasible region for some linear programming problem was parallel to the line defined by the corresponding Optimization Equation, then all points along that edge potentially would be optimal solutions with the same Optimization Equation output.  This is the point I was trying to make in Student Discovery 4.

In the end, Desmos, GeoGebra, and the TI-Nspire all have the ability to create dynamic learning environments in which students can explore linear programming situations and their optimization solutions, albeit with slightly different syntax.  In the end, I believe these any of these approaches can make learning linear programming much more experimental and meaningful.

Old school integral

This isn’t going to be one of my typical posts, but I just cracked a challenging indefinite integral and wanted to share.

I made a mistake solving a calculus problem a few weeks ago and ended up at an integral that looked pretty simple.  I tried several approaches and found many dead ends before finally getting a breakthrough.  Rather than just giving a proof, I thought I’d share my thought process in hopes that some students just learning integration techniques might see some different ways to attack a problem and learn to persevere through difficult times.

In my opinion, most students taking a calculus class would never encounter this problem.  The work that follows is clear evidence why everyone doing math should have access to CAS (or tables of integrals when CAS aren’t available).

Here’s the problem:

Integrate \int \left( x^2 \cdot \sqrt{1+x^2} \right) dx.

For convenience, I’m going to ignore in this post the random constant that appears with indefinite integrals.

While there’s no single algebraic technique that will work for all integrals, sometimes there are clues to suggest productive approaches.  In this case, the square root of a binomial involving a constant and a squared variable term suggests a trig substitution.

From trig identities, I knew tan^2 \theta + 1 = sec^2 \theta, so my first attempt was to let x=tan \theta, which gives dx=sec^2 \theta d\theta.  Substituting these leads to

Integral1

(tan \theta)'=sec^2 \theta, claiming two secants for the differential in a reversed chain rule, but left a single secant in the expression, so I couldn’t make the trig identities work because odd numbers of trigs don’t convert easily using Pythagorean identities.  Then I tried using (sec \theta)'=sec \theta \cdot tan \theta, leaving a single tangent after accounting for the potential differential–the same problem as before.  A straightforward trig identity wasn’t going to do the trick.

Then I recognized that the derivative of the root’s interior is 2x.  It was not the exterior x^2, but perhaps integration by parts would work.  I tried u=x \longrightarrow u'=dx and v'=x\sqrt{1+x^2} dx \longrightarrow v=\frac{1}{2} \left( 1+x^2 \right)^{3/2} \cdot \frac{2}{3}.  Rewriting the original integral gave

Integral2

The remaining integral still suggested a trig substitution, so I again tried x =tan \theta to get

Integral3

but the odd number of secants led me to the same dead end from trigonometric identities that stopped my original attempt.  I tried a few other variations on these themes, but nothing seemed to work.  That’s when I wondered if the integral even had a closed form solution.  Lots of simple looking integrals don’t work out nicely; perhaps this was one of them.  Plugging the integral into my Nspire CAS gave the following.

Integral4

OK, now I was frustrated.  The solution wasn’t particularly pretty, but a closed form definitely existed.  The logarithm was curious, but I was heartened by the middle term I had seen with a different coefficient in my integration by parts approach.  I had other things to do, so I employed another good problem solving strategy:  I quit working on it for a while.  Sometimes you need to allow your sub-conscious to chew on an idea for a spell.  I made a note about the integral on my To Do list and walked away.

As often happens to me on more challenging problems, I woke this morning with a new idea.  I was still convinced that trig substitutions should work in some way, but my years of teaching AP Calculus and its curricular restrictions had blinded me to other possibilities.  Why not try a hyperbolic trig substitution? In many ways, hyperbolic trig is easier to manipulate than circular trig.  I knew

\frac{d}{dt}cosh(t)=sinh(t) and \frac{d}{dt}sinh(t)=cosh(t),

and the hyperbolic identity

cosh^2t - sinh^2t=1 \longrightarrow cosh^2t=1+sinh^2t.

(In case you haven’t worked with hyperbolic trig functions before, you can prove these for yourself using the definitions of hyperbolic sine and cosine:  cosh(x)=\frac{1}{2}\left( e^x + e^{-x} \right) and sinh(x)=\frac{1}{2}\left( e^x - e^{-x} \right).)

So, x=sinh(A) \longrightarrow dx=cosh(A) dA, and substitution gives

Integral5

Jackpot!  I was down to an even number of (hyperbolic) trig functions, so Pythagorean identities should help me revise my latest expression into some workable form.

To accomplish this, I employed a few more hyperbolic trig identities:

  1. sinh(2A)=2sinh(A)cosh(A)
  2. cosh(2A)=cosh^2(A)+sinh^2(A)
  3. cosh^2(A) = \frac{1}{2}(cosh(2A)+1)
  4. sinh^2(A) = \frac{1}{2}(cosh(2A)-1)

(All of these can be proven using the definitions of sinh and cosh above.  I encourage you to do so if you haven’t worked much with hyperbolic trig before.  I’ve always liked the close parallels between the forms of circular and hyperbolic trig relationships and identities.)

If you want to evaluate \int x^2 \sqrt{x^2+1} dx yourself, do so before reading any further.

Using equations 3 & 4, expanding, and then equation 3 again turns the integral into something that can be integrated directly.

Integral6

The integral was finally solved!  I then used equations 1 & 2 to rewrite the expression back into hyperbolic functions of A only.

Integral7

The integral was solved using the substitution x=sinhA \longrightarrow A=sinh^{-1}x and (using cosh^2A-sinh^2A=1), coshA=\sqrt{x^2+1}.  Substituting back gave:

Integral8

but that didn’t match what my CAS had given.  I could have walked away, but I had to know if I had made an error someplace or just had found a different expression for the same quantity.  I knew the inverse sinh could be replaced with a logarithm via a quadratic expression in e^x.

Integral9

Integral10

Well, that explained the presence of the logarithm in the CAS solution, but I was still worried by the cubic in my second term and the fact that my first two terms were a sum whereas the CAS’s solution’s comparable terms were a difference.  But as a former student once said, “If you take care of the math, the math will take care of you.”  These expressions had to be the same, so I needed to complete one more identity–algebraic this time.  Factoring, rewriting, and re-expanding did the trick.

Integral11

What a fun problem (for me) this turned out to be.  It’s absolutely not worth the effort to do this every time when a CAS or integral table can drop the solution so much more quickly, but it’s also deeply satisfying to me to know why the form of the solution is what it is.  It’s also nice to know that I found not one, but three different forms of the solution.

Integral12

Morals:  Never give up.  Trust your instincts. Never give up. Try lots of variations on your instincts. And never give up!