 In the end of lecture 12, what I wanna do this time is do another mixture problem, but this time we're gonna have three variables and we wanna solve for them in that situation. So imagine a little Susie pulls out her piggy bank and inside of her piggy bank we got 14 coins and the total amount of the coins is $1.35. Her piggy bank consists of only nickels, dimes, and quarters. And so we wanna determine how many different nickels, dimes, and quarters are in her piggy bank there, right? So we might say something like, okay, N is gonna equal the number of nickels in little Susie's piggy bank. We're gonna have little D be the number of dimes. We're gonna have Q be the number of quarters in her piggy bank. Now, if you wanted to use variables like X, Y, or Z, that's perfectly fine. But it is sometimes useful to have a mnemonic device, so it's a little bit easier to keep track of later on. N was the number of nickels and things like that. And as this is a mixture problem, there are some things we'll be able to get really quickly. We know there are 14 coins in the piggy bank. So when we add everything together, N plus D plus Q, this will add up to be 14. This is the total amount. We also know that there is $1.35 total in the piggy bank. Nickels are worth five cents. So if we take 0.05 times N, this is a rate right here. Each nickel is worth five cents. They're in nickels, so the product will give us the money, the total amount from the nickels alone. Then we add that to 0.10 times D. So that would give us the amount of money that comes from the dimes. And then if we take 0.25 times Q, that will give us the amount we get from the quarters. And this should add up to $1.35. Now, this is how it worked when we did two by two systems. Now, since there's three variables, we need a third equation in order to solve this system of equations. Where's the third one come from? Well, you'll also notice here that we're told that the number of nickels is three times twice the number of dimes. And so let's try to unravel that a little bit. The number of nickels is, when you see the word is, that pretty much always means an equal sign of some kind. So we see that in, is, is what? So it's three less than, that means we're gonna subtract three from something. It's less than twice the number of dimes. Well, the number of dimes is a D, twice means multiply by two. So we're gonna get a two D. So N equals two D minus three. And so we wanna solve this system of equations, given the quantity. Well, the third equation is actually perfect for substitution, right? N equals two D minus three. So I'm gonna substitute out the N, by plugging in two D minus three. So for the first equation, N is a two D minus three. We have a D, we have a Q, this equals 14. Combining like terms, two D plus another D gives us three D. And then we're gonna add the three D other side. So we're gonna get three D plus Q equals 17. That's one of the equations. So for the next equation, this one right here, before we do the substitution, I'm gonna make some slight modifications to it first. So first of all, let's move the decimals over by two to make life a little bit easier. So we end up with five N plus 10 D plus 25 Q is equal to 135. We could have made the substitution here, but I also noticed that everything in this equation is divisible by five. So I'm gonna divide five out of everything. So you're gonna get an N plus a two D plus a five Q and then 135 divided by five is 27. And so we're gonna substitute this into N right here. And so when we do that, we end up with two D minus three plus two D plus five Q is equal to 27. So this time when you combine the D's together, we're going to get four D, then we get a five Q. And then again, we're gonna add three to the other side and we get a 30. And so we're gonna put these together to make our reduced system of equations. We have a three D plus Q is equal to 17 and we have a four D plus five Q is equal to 30. So now we wanna solve this system of equations. We can do this by substitution. Solving for Q would be a pretty good candidate. I'm gonna switch things up and we're gonna switch to elimination this time. So what I'm gonna do is I'm equation by negative one and I'm gonna multiply the top equation by five. And so we're gonna see what happens here. We're gonna end up with a 15 D plus five Q is equal to 17 times five, which is 85. Then we're gonna get minus four D, minus five Q and then minus 30. Add these together. So 15 D take away four D is that's gonna give us 11 D. The fives, the five Qs will cancel out. And then lastly, we get 85 take away 30, which is 55. And so we divide both sides by 11. We see that D is equal to five. So that means there are five dimes in the piggy bank. Now we have to go back and find out the other variables. Well, remember, so we know that D is now five. Now remember that we know the relationship between nickels and dimes, right? Nickels is two D minus three. So if D turned out to be five, we're gonna get two times five minus three, which is 10 minus three, which is seven. So there are seven nickels and five dimes. Then I would go back to the very original equation, which is probably the simplest one to do right here, because we end up with seven nickels. We have five dimes and add that with quarters, you're gonna get 14. So we're gonna subtract these from the other side, right? Q is gonna equal 14 minus seven minus five. 14 take away seven of course is seven. Take away five, we're left with two, it seems like. And so therefore that's how many nickels, dimes and quarters we have inside of the piggy bank. Let's record this down here. So Susie has five nickels, seven dimes and two quarters. In her piggy bank. That's what we found out right there. And so solving a mixture problem with three variables just comes up, comes down to finding three equations that relate the three variables together and then you solve the resulting system of linear equations. You can solve it using substitution, elimination, whichever you feel more comfortable with. Now in the next lecture, we're gonna introduce another way of solving systems of equations, because although elimination substitutions work, it turns out that the bigger, the more complicated the problems get, the longer it takes to solve using substitution or elimination. And it turns out there's a few inefficiencies inside of the elimination or substitution methods. So we want to basically optimize our solving technique with a technique which we'll call Gaussian elimination, which we'll introduce in the next lecture, number 13.