# Tag Archives: lines

## 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.) 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. 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 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 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.

## Graphing Ratios and Proportions

Last week, some colleagues and I were pondering the difficulties many middle school students have solving ratio and proportion problems.  Here are a few thoughts we developed to address this and what we think might be an uncommon graphical extension (for most) as a different way to solve.

For context, consider the equation $\displaystyle \frac{x}{6} = \frac{3}{4}$.

(UNFORTUNATE) STANDARD METHOD:

The default procedure most textbooks and students employ is cross-multiplication.   Using this, a student would get $\displaystyle 4x=18 \longrightarrow x = \frac{18}{4} = \frac{9}{2}$

While this delivers a quick solution, we sadly noted that far too many students don’t really seem to know why the procedure works.  From my purist mathematical perspective, the cross-multiplication procedure may be an efficient algorithm, but cross-multiplication isn’t actually a mathematical function.  Cross-multiplication may be the result, but it isn’t what happens.

METHOD 2:

In every math class I teach at every grade level, my mantra is to memorize as little as possible and to use what you know as broadly as possible.  To avoid learning unnecessary, isolated procedures (like cross-multiplication), I propose “fraction-clearing”–multiplying both sides of an equation by common denominatoras a universal technique in any equation involving fractions.  As students’ mathematical and symbolic sophistication grows, fraction-clearing may occasionally yield to other techniques, but it is a solid, widely-applicable approach for developing algebraic thinking.

From the original equation, multiply both sides by common denominator, handle all of the divisions first, and clean up.  For our example, the common denominator 24 will do the trick. $\displaystyle 24 \cdot \frac{x}{6} = 24 \cdot \frac{3}{4}$ $4 \cdot x = 6 \cdot 3$ $\displaystyle x = \frac{9}{2}$

Notice that the middle line is precisely the result of cross-multiplication.  Fraction-clearing is the procedure behind cross-multiplication and explains exactly why it works:  You have an equation and apply the same operation (in our case, multiplying by 24) to both sides.

As an aside, I’d help students see that multiplying by any common denominator would do the trick (for our example, 12, 24, 36, 48, … all work), but the least common denominator (12) produces the smallest products in line 2, potentially simplifying any remaining algebra.  Since many approaches work, I believe students should be free to use ANY common denominator they want.   Eventually, they’ll convince themselves that the LCD is just more efficient, but there’s absolutely no need to demand that of students from the outset.

METHOD 3:

Remember that every equation compares two expressions that have the same measure, size, value, whatever.  But fractions with differing denominators (like our given equation) are difficult to compare.  Rewrite the expressions with the same “units” (denominators) to simplify comparisons.

Fourths and sixths can both be rewritten in twelfths.  Then, since the two different expressions of twelfths are equivalent, their numerators must be equivalent, leading to our results from above. $\displaystyle \frac{2}{2} \cdot \frac{x}{6} = \frac{3}{3} \cdot \frac{3}{4}$ $\displaystyle \frac{2x}{12} = \frac {9}{12}$ $2x=9$ $\displaystyle x = \frac{9}{2}$

I find this approach more appealing as the two fractions never actually interact.  Fewer moving pieces makes this approach feel much cleaner.

UNCOMMON(?) METHOD 4:  Graphing

A fundamental mathematics concept (for me) is the Rule of 4 from the calculus reform movement of the 1990s.  That is, mathematical ideas can be represented numerically, algebraically, graphically, and verbally.  [I’d extend this to a Rule of 5 to include computer/CAS representations, but that’s another post.]  If you have difficulty understanding an idea in one representation, try translating it into a different representation and you might gain additional insights, or even a solution.  At a minimum, the act of translating the idea deepens your understanding.

One problem many students have with ratios is that teachers almost exclusively teach them as an algebraic technique–just as I have done in the first three methods above.  In my conversation this week, I finally recognized this weakness and wondered how I could solve ratios using one of the missing Rules: graphically.  Since equivalent fractions could be seen as different representations of the slope of a line through the origin, I had my answer.

Students learning ratios and proportions may not seen slope yet and may or may not have seen an xy-coordinate grid, so I’d avoid initial use of any formal terminology.  I labeled my vertical axis “Top,” and the horizontal “Bottom”.  More formal names are fine, but unnecessary.  While I suspect most students might think “top” makes more sense for a vertical axis and “bottom” for the horizontal, it really doesn’t matter which axis receives which label.

In the purely numeric fraction in our given problem, $\displaystyle \frac{x}{6} = \frac{3}{4}$, “3” is on top, and “4” is on the bottom.  Put a point at the place where these two values meet.  Finally draw a line connecting your point and the origin. The other fraction has a “6” in the denominator.  Locate 6 on the “bottom axis”, trace to the line, and from there over to the “top axis” to find the top value of 4.5. Admittedly, the 4.5 solution would have been a rough guess without the earlier solutions, but the graphical method would have given me a spectacular estimate.  If the graph grid was scaled by 0.5s instead of by 1s and the line was drawn very carefully, this graph could have given an exact answer.  In general, solutions with integer-valued unknowns should solve exactly, but very solid approximations would always result.

CONCLUSION:

Even before algebraic representations of lines are introduced, students can leverage the essence of that concept to answer proportion problems.  Serendipitously, the graphical approach also sets the stage for later discussions of the coordinate plane, slope, and linear functions.  I could also see using this approach as the cornerstone of future class conversations and discoveries leading to those generalizations.

I suspect that students who struggle with mathematical notation might find greater understanding with the graphical/visual approach.  Eventually, symbolic manipulation skills will be required, but there is no need for any teacher to expect early algebra learners to be instant masters of abstract notation.

## 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. Assuming x = the number of Riders built and = the number of Rovers built,  inequalities for this problem are 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. 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. 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). — 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. 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. Unlike 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. 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.) 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. 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.

## Systems of lines

Here’s an interesting variation of a typical (MS) problem I found by following the Five Triangles ‘blog: http://fivetriangles.blogspot.com/2013/09/97-no-triangle.html . (Note:  If you sign up on this or other ‘blogs, you can get lots of problems emailed to you every time they are added.)

INITIAL SOLUTION

I know this question can absolutely be solved without using technology, but when a colleague asked if it was appropriate to use technology here (my school is one-to-one with tablet laptops), I thought it would be cool to share with her the ease and power of Desmos.  You can enter the equations from the problem exactly as given (no need to solve for y), or you can set up a graph in advance for your students and email them a direct link to an already-started problem.

If you follow this link, you can see how I used a slider (a crazy-simple addition on Desmos) to help students discover the missing value of a. FOLLOW-UP

I suggest in this case that playing with this problem graphically would grant insight for many students into the critical role (for this problem) of the intersection point of the two explicitly defined lines.  With or without technology support, you could then lead your students to determine the coordinates of that intersection point and thereby the value of a.

Keeping with my CAS theme, you could determine those coordinates using GeoGebra’s brand new CAS View: Substituting the now known values of x and y into the last equation in the problem gives the desired value of a.

NOTE:  I could have done the sliders in GeoGebra, too, but I wanted to show off the ease of my two favorite (and free!) online math tools.

CONCLUSION

Thoughts?  What other ideas or problems could be enhanced by a properly balanced use of technology?

As an extension to this particular problem, I’m now wondering about the area of triangle formed for any value of a.  I haven’t played with it yet, but it looks potentially interesting.  I see both tech and non-tech ways to approach it.