Wednesday, August 24, 2011

Are There Better Ways To Find GCF and LCM?

Some of you may have been exposed to this in school. Some of you, like me, were not directly taught this method. Just a heads up.

When I was in fourth or fifth grade, I learned the terms greatest common factor and least common multiple.

For those unfamiliar, the greatest common factor (GCF) refers to the largest number that will cleanly divide (leave no remainder) two or more specific numbers. For example, the biggest number that goes into 2 and 3 is 1, so 1 is the GCF of 2 and 3.

The least common multiple (LCM) refers to the smallest number that can be cleanly divided (leave no remainder) by two or more specific numbers. For example, the smallest number divisible by 2 and 3 is 6, so 6 is the LCM of 2 and 3.

The way I learned to find the GCF of two numbers is as follows.

First, take two numbers. Our numbers will be 8 and 10.
Next, list the factors of each number. For 8, we have factors 1 and 8 (1*8=8) and 2 and 4 (2*4=8). For 10, we have factors 1 and 10 (1*10=10) and 2 and 5 (2*5=10). For each number, we write the factors in increasing order.
Now we circle the factors that 8 and 10 have in common. We notice that there are two factors, 1 and 2, which are factors of both 8 and 10.
But only one can be the GCF. As you may have guessed, we want the greatest number, and that happens to be 2. This means that the GCF of 8 and 10 is 2.
What about the LCM? We start again by writing our numbers 8 and 10.
Since we're considering multiples instead of factors, we want to list the multiples of each number. For 8, we get 1*8=8, 2*8=16, 3*8=24, 4*8=32, 5*8=40, 6*8=48 and so on. For 10, we get 1*10=10, 2*10=20, 3*10=30, 4*10=40, 5*10=50 and so on.
Now if we look through the multiples, we find that they have 40 in common. In reality, the two numbers have infinitely many multiples in common, but 40 is the lowest in value, making it the least common multiple.
Those ways are effective, but once you get to large numbers, they become terribly inefficient. Is there a better way? Let's start with 8 and 10 and figure out the GCF a new way.
We need to factor each number into its primes. We can make 8 into 2*4, and 2 is prime. We can make 4 into 2*2, both of which are prime. So 8 is made of 2*2*2 or 2^3.
We can factor 10 into 2*5, both of which are prime.
Now we need to compare quantities of numbers. For 8 (2^3), we have three 2s. For 10 (2*5), we have one 2 and one 5.
What do both have in common? Each has a single 2. Even though 8 has two extra 2s and 10 has one extra 5, we don't include those. We only care about what they have in common.
Let's repeat for LCM. First, prime factorization.
Now we count quantities.
Now we have to compare those quantities.
We include one 2 (because both have one two). We include two extra 2s (because only the 8 had two extra 2s). We include one extra 5 (because only the 10 had one extra 5). This gives 2*4*5, or 40. Notice that if we had included the 2 they had in common twice (once for each), we'd have 80, or 8*10. Sometimes we can just multiply the two numbers and get the LCM, but that is only true if the two numbers are co-prime (sharing no factors).
Let's try two bigger numbers, say 48 and 64. As always, we complete a prime factorization.
Now we compare the quantities and take only what they have in common (four 2s). This gives us a GCF of 16.
We repeat for LCM.
Again, by comparing quantities, we get four 2s in common, one 3 specific to the first and two 2s specific to the second.
Multiplying these out, we get an LCM of 192.
These methods are perhaps most useful in algebra. When adding fractions, like 1/2 and 1/3, you must first find a common denominator (the least common denominator). In that case, we would get 6 to add 3/6 and 2/6. If you're looking at 1/x and 1/(x+1), the problem still remains. Let's look at two factored expressions below.
Now, like always, we count the factors.
Now we take what they have in common, what is specific to the first and what is specific to the second.
Multiplying them out, we get the factored expression below.
To finish the fraction addition, we would simply have to multiply the top of each fraction by what its denominator was missing from the least common denominator. For example, the first expression did not have an (x+3), so the numerator and denominator would be multiplied by (x+3). For 1/2, what is the bottom missing to get to 6? Since it is missing a 3, we multiply 1*3 and 2*3 to get 3 and 6 to give us 3/6, just as we would expect.

Anyway, I hope you got something out of this. If not, well, there's always next time.

If you have any questions, or if anything isn't clear, just let me know in the comments.
I don't exactly recall learning this explicitly. I saw the types of problems in Algebra I and Algebra II to an extent, but I more figured out the method than I was taught it.

The images used here were created by me using Noteshelf for iPad.

Monday, August 22, 2011

Can Algebra II Help Me With Finances?

If you have money in a savings account (or owe money on a loan or credit card), you're probably familiar with interest. Simple interest is calculated by multiplying the amount you have in the bank (principal) by the interest rate by the amount of time.

So if you have $100 in the bank at 5% interest per year, after one year you'll have $5 more. In banking, we don't usually worry about simple interest.

When we calculate interest, we need to take account of the interest your money has already earned. We also have to know how many times the interest is taken.

For example, suppose your principal, P, is still $100, and the interest rate, r, is still 5% per year. We refer to calculating interest as compounding interest. We let n equal the number of times interest is compounded in a year. If we compound interest once per year, then we have $105 after one year, like simple interest. But what if we compound twice? Then we would have $105.06 at the end of one year.

The formula (with the time in years equal to t) for compound interest is:
How does changing the number of times interest is compounded affect the amount of money we earn? To make things simple, we'll start with $1 and assume 100% interest per year. We'll look at the account for one year (t=1). This gives us a simple formula for A.
We'll consider compounding with the following frequency:
1) Yearly
2) Monthly
3) Daily
4) Hourly
5) Per Minute
6) Per Second
7) Per Tenth-of-Second
Though the amount we earn at the end of one year doesn't really change after compounding hourly $1, notice something about the numbers. They appear to be stabilizing. The larger number we use for n, the closer A appears to get to another number. What happens if we let n get really big? If we compound interest continuously (that is, we are ALWAYS calculating interest), then we can say that n goes to infinity. By taking a limit, we can see how A looks if we let n get really big.

The expression below is read as: the limit as n goes to infinity of the quantity one plus one over n quantity to the n power.
This is one of the original definitions for the constant e, which has a value of about 2.718. If we look at our table of values, we can see that as n gets bigger, A gets closer and closer to e.
What if the interest rate wasn't 100%? Would we still get e? As it turns out, we don't. We get something slightly different. If interest rate is a random number, a, then our limit doesn't yield e; it gives us e to the a, as seen below.
What happens if we continuously compound interest? We need to take the limit as n goes to infinity of the compound interest formula. Since P does not depend on n, we can bring it outside the limit.
Since t doesn't depend on n either, we can move the limit inside of the t-power. If we look at what we're taking the limit of now, it simplifies to e to the r, just like e to the a earlier. Using our rules for exponents, we know that raising an exponent to a power requires us to multiply the exponents, leaving us with e to the r t power, all multiplied by P.
So our formula for continuously compounded interest is:
This is a little surprising, as nothing about interest necessarily indicates the presence of e. The fact is, e has the habit of showing up whenever exponentials are involved, so keep an eye out for it.

Personally, I would never teach this in an Algebra II setting. I would teach the compound interest formula when learning exponential functions, but I would not delve into the e-problem. In my experience, Algebra II  students don't really care about interest, they don't know the definitions of e and they usually don't know limits.

That being said, this would be good enrichment for the advanced students in an Algebra II class, and this would be a valuable lesson for a Precalculus or Calculus class reviewing limits.

Anyway, I hope you got something out of this. If not, well, there's always next time.

If you have any questions, or if anything isn't clear, just let me know in the comments.
 
I first saw this definition for e from my Calculus Teacher Jan Haynes. I saw the table derivation for e in compound interest from my mentor teacher Jennifer Davis when I was completing my student teaching at Somerville High School and finished the rest of the derivation on my own.
The images used here were created by me using Noteshelf for iPad.

Friday, August 19, 2011

Are All Repeating Decimals Fractions? Or What Is One? (Baby, Don't Round Me)

In math, we often categorize numbers. All numbers fall under the term complex numbers, numbers which have both real and imaginary components (though at least one of which may be zero). The real numbers can be further divided into the irrational numbers and the rational numbers. The terms rational and irrational do not refer to how well the numbers can reason; rather, they come from the word ratio. Irrational numbers cannot be written as a ratio, while rational number can. In other words, rational numbers are numbers that can be rewritten as fractions.

What makes a number rational? To determine whether or not a number is rational, all we have to consider is the number after the decimal. If the decimal terminates (or repeats), then the number is rational. Other wise, it is irrational.

Which decimals terminate? One example is 4. Since there are no numbers after the decimal (other than zero), we can say it terminates. The number 1.2345 also terminates, but the number 1.243531723... does not terminate. Neither does 3.14159... or 2.71828... But what about a number like 3.333333.... or 0.123123123... or 2.45321321... or 7.9999....? They don't terminate, but they do repeat.

I could easily say 4/1 is the fraction of 4, or that 1 and 2345/10000 is fraction of 1.2345. Those repeating decimals are not so easy. We've already said that repeating decimals indicate that the number is rational, so there must be a way to convert a repeating decimal into a fraction. But how?

When I was in 7th grade, I had a two-page "cheat sheet" of mathematical formulas to memorize for my scholars' bowl team. Two of the formulas on there related to turning a repeating decimal into a fraction. When I was in 10th grade, though, my Algebra II/Trig and Math Team teacher, Suzanne Ingram, taught me a method for finding these fractions. The best part is that the method requires only Algebra I level skills.

Since most of you reading know that 0.333... is 1/3, we'll start with 3.33... so there's some familiarity to build upon. We start by setting our decimal, 3.33..., equal to x.
Now we want to multiply x by 10 enough times so that the number after the decimal doesn't change (but at least once). Here, we can multiply by 10 one time and the number after the decimal is the same.
Now we have two equations. We want to subtract the smaller from the larger.
This leaves us with 9x on the left and 30 on the right.
Since we have an equation, we just divide both sides by 9. This gives us x on the left and 30/9 on the right, which reduces to 10/3. If we work that out, we find that 10/3 does equal 3.333...
Let's try 0.123123... for x. How many 10s will it take? Since we have three numbers before the repeat, we will have to multiply by 10 three times, or 1,000.
Again, we subtract the smaller from the larger to get 999x on the left and 123 on the right.
Dividing by 999 gives us 123/999, which reduces to 41/333. If we were to work that out, we would find that it does equal 0.123123123...
In the next case, the decimal doesn't repeat right away. We have 2.45321321... Since this problem is different, we should treat it slightly different. The first step is to multiply by 10 enough times so that all of the decimal repeats. In other words, we need to get rid of that 45. To do so, we will multiply by 100 (10 two times). Now, we have to multiply by 10 enough times so that the number after the decimal doesn't change like we did before. Since there are three numbers, 3, 2 and 1, we will have to multiply by 1000 (10 three times). But we're not multiplying the original x; we're multiplying the new 100x to get 100000x.
We have to take the 100000x and subtract 100x. This will give us 99900x on the left and 245076 on the right.

Dividing both sides by 99900 gives us 245076/99900, which reduces to 20423/8325. If we work it out, we find that does equal 2.45321321...
What about 7.999...? This one looks simple like the first case, and it is. However, it is much more interesting. Again, we only have to multiply by 10 one time to maintain our repeating decimal.
Subtracting the two yields 9x on the left and 72 on the right.
Dividing both sides gives us 72/9, which reduces to 8.
Hold on, now. We just showed that 7.999.... = 8. If we subtract 7 from both sides, we are effectively saying: 0.9999.... = 1. Could that be true?

Let's walk through the divisions by nine to convince ourselves.

1/9 = 0.111....
2/9 = 0.222...
3/9 = 0.333... = 1/3
4/9 = 0.444...
5/9 = 0.555...
6/9 = 0.666... = 2/3
7/9 = 0.777...
8/9 = 0.888...

Even though we know that 9/9 is equal to 1, the pattern implies that 9/9 = 0.999... The existence of the pattern does not prove that 0.999... = 1. It does, however, provide us some insight as to whether or not the solution we came up with makes sense.

Some people prefer formulas; I'm okay with them, but I'd much rather see a process than memorize a formula.

Anyway, I hope you got something out of this. If not, well, there's always next time.

If you have any questions, or if anything isn't clear, just let me know in the comments.
I first saw this method from by Algebra II/Trig, Precalculus and Math Team teacher Suzanne Ingram. I first saw the 0.999... = 1 problem online my senior year of high school and asked my Calculus teacher Jan Haynes about it. 
The images here were produced by me using Noteshelf for iPad.

Wednesday, August 17, 2011

Are Soup And Cereal Companies Evil?

Unfortunately, exposing evil empires will require some knowledge of calculus. If you understand first derivatives, you should be fine. If you don't, I'll try my best to explain what you need to know, but it may prove to be difficult.

To preface, this is one of my favorite things to do in math, because it's a real world problem. Many, many students want to stick to equations and not bother with word problems. Unfortunately, you don't see many equations in real life; you have to make them yourself from information given. While you have all the information you need to solve these problems, they do present a way to apply mathematics to problems we face when grocery shopping.

There are two properties of a container that we care about for this exercise. The first is the container's volume. This is important because we want to know how much soup or cereal our container will hold. The second is the container's surface area. This is important because we want to know how much the container will cost to make, since that depends on how much material we need to make the container.

We'll start with soup companies, since the math is easier.

We know that soup comes in cylindrical cans. The volume of a cylinder is given by the formula pi times radius (r) squared times height (h) (the first formula below). The surface area is a little more complicated. That formula is two times pi times radius (r) squared plus two times pi times radius (r) times height (h) (the second formula below).

Now, we're going to assume that volume is constant. By using a constant volume, we can figure out what gives us the most volume for a given surface area. If it sounds backwards, don't worry. It'll work out, I promise. Now we can begin work.

Our first problem is that in the surface area formula, we have two variables, r and h. Since we said volume was constant, we can solve the volume formula for h. We find that h = V/pi r squared. We can then plug h into the area equation. So far, we've only used algebra to get our new formula for area.
Now for the calculus. We want to take the derivative of A (area) with respect to r (radius). If that sounds messy, here's what you need to know. We want to know how the area changes if the radius changes. You can imagine that if radius increases, area increases. The derivative just gives us a formula that tells us exactly how the radius affects the surface area. We write the derivative as dA/dr (area to radius). We usually use derivatives to find minimum and maximum values of functions. In our case, we want to find when the surface area is at a minimum. This happens whenever the derivative is zero (don't worry about why this is if you don't know for now; you can always look it up later). On the first line, I've found the derivative; on the last line, I set it equal to zero.
We can now solve for V in terms of r.
This means that when surface area is minimized, volume equals two times pi times radius cubed.

Using this and the original equation for volume, we can find out which value of h gives us the smallest surface area for a given volume.
This means that when the can is as wide (2r = diameter) as it is tall, we get the lowest surface area for a given volume. In other words, we get the most volume for a given surface area. Unfortunately, I haven't noticed a lot of cans this shape. Most of the cans I see are tall and skinny, even though that shape isn't optimized.

Let's try cereal boxes. This math will get a little heavier, but the idea is the same.

The volume of a box (any box) is given by length times width times height. The formula for surface area is a little more complicated. Just know that l is length, w is width and h is height, and the second formula below will give you surface area.

For volume, we have three variables, which is two too many. Again, let's let volume be constant and solve for l (this will eliminate one variable). We get that l = V/wh. Now we plug that into our area equation.
Again, we've done no calculus yet, but here it comes. We're going to take two different derivatives. Sounds messy, but I'll explain. First we want to find the derivative of surface area with respect to height (how does area change with height?) (dA/dh). Second, we want to find the derivative of surface area with respect to width (how does area change with width?) (dA/dw). You might notice the funny symbol I used for d. Don't worry too much; it just means I have more than one variable. Just like before, though, I want to set them equal to zero to find the minimum value for surface area.
 
If you know how to take derivatives, know that these are partial derivatives. And if you know how to take derivatives, then know in the first case, I assume w is constant, and in the second case, I assume h is constant.
When I set dA/dh equal to zero, I solve it and get that V = wh^2.
When I do the same for dA/dw, I get V = hw^2.
Since volume is constant, I can set them equal to each other. I find out that h = w, so I make them both equal to s, a new variable to represent either h or w.
With s, I get the two equations for volume and surface area below. Again, in surface I have two variables and want to get rid of l by solving my volume equation. This gives me l = V/s^2. If I plug this into the area equation, I get the result at the bottom.
I want to know how surface area changes with s, so I need to take the derivative (regular this time) to find dA/ds. Like always, I want to set that equal to 0.
When I work that out, I find that surface area is minimized for a given volume (or volume is maximized for a given surface area) when volume equals s-cubed, which means all three sides are the same length.
The shape that optimizes this problem, then, is a cube. Again, I don't see many cereal boxes this shape. Most I see are tall and skinny, just like the soup cans.

So what gives?

Which can did you think would hold more: tall/skinny or short/fat?
What about the box: cube or tall rectangle?

If you're the average person, you picked the tall one both times. It's a psychological thing that makes us think the taller container holds more; we completely ignore the other two dimensions!

Companies know this. That's why they don't bother optimizing their containers. They know they sell less in a box that costs the same to make while making you think it's more than it is.

So are soup and cereal companies evil? Not necessarily, but they do know how to play with your mind.

Anyway, I hope you got something out of this. If not, well, there's always next time.

If you have any questions, or if anything isn't clear, just let me know in the comments.
I first learned optimization problems from my high school Calculus teacher Jan Haynes. 
The images here were produced by me using Noteshelf for iPad.