Hands-on math!

Solving 2 Equations

Until now we have solved two equations by the guess-and-check method.
Take this problem for example:

A farmer keeps chickens (with 2 legs) and pigs (with 4 legs). There are a total of 55 chickens and pigs. There are a total of 178 legs amongst them all. How many pigs does the farmer have?

Eventually, you get to a guess which generates 55 heads and 178 legs which is 21 chickens and 34 pigs.
(Legs: 21x2 + 34x4 = 178)

What you are actually doing is solving two equations together by guessing the answers and plugging them back in. While this is simple and straight-forward, now that you know something about algebra, there is a way of solving a problem like this directly without all that guessing.

Solving the pigs and chickens problem with algebra
    Let C = the number of chickens
    Let P = the number of pigs
    Then the heads equation is:     C + P = 55     <= A total of 55 heads!
    The legs equation is:             2C + 4P = 178 <= A total of 178 legs (2 for chickens and 4 for pigs!)

The first equation is pretty obvious, but the second legs equation says that 2C (the number of chickens x 2) is the number of chicken legs and 4P (the number of pigs x 4) is the number of pig legs. The key is that both equations work together! Here's how you use algebra to solve these two equations:

1. Turn the first equation into an equation for C     C = 55 - P
2. Put this value for C into the legs equation   2(55 - P) + 4P = 178
3. Simplify    110 - 2P + 4P = 178
4. Combine the Ps and subtract 110 from both sides of the equation   2P = 178 - 110
5. Solve for P   P = 34
6. Plug this value for P into the first equation
to get the number of chickens
    C + 34 = 55
    C = 55 - 34
    C = 21

Any two equations that can be made about the same number of two things can be solved like this.
The key is to use the simpler equation (the heads equation in our example) to get an expression for one of the variables that can be substituted in the second (more complicated) equation and solved.

Here's another problem (from the 2017 Washington State Math Olympiad):

Parmveer has a bag with 54 coins. Altogether the coins are worth $4.75.
He only has nickels and dimes in the bag. How many dimes are in the bag?


Let N = the number of nickels and   D = the number of dimes.
The number of coins equation     N + D = 54
The total worth equation    5N + 10D = 475 cents
Turn the first equation around to make it an equation for N    N = 54 - D
Put this is the total worth equation    5(54 - D) + 10D = 475
Simplify and solve for D    270 - 5D + 10D = 475
    5D = 475 - 270
    D = 205/5 = 41 dimes.
Plug back into the first equation to get the number of nickels    N = 54 - D = 54 - 41 = 13 nickels.

OK, now here's a problem for you: (from the 2016 Olympiad):

Jill likes insects and wants to be an entomologist when she grows up.
For now, she keeps a collection of ants and spiders.
Ants have 6 legs and spiders have 8, and together there are 380 legs in her collection.
If she has 59 total ants and spiders, how many of each, ants and spiders, does she have?


Let A = the number of ants and S = the number of spiders.
The total insects equation:  
The total legs equation 
Turn first equation into an equation for ants 
Put this in the total legs equation 
Simplify and solve for S

 
Plug back into the first equation to get the number of ants