Question 1199471
<pre>
The drawer of a cash register contains 30 coins: pennies, nickels, dimes, and quarters. The total value of the coins $3.31. The total number of pennies and nickels combined is the same as the total number of dimes and quarters combined. The total value of the quarters is five times total value of the dimes. How many coins of each type are in the drawer ?

Let number of pennies, nickels, dimes and quarters be P, N, D, and Q, respectively
Then we get:                     P + N + D + Q = 30 ----- eq (i)
             P + N = D + Q ====< P + N - D - Q = 0 ------ eq (ii)
              .25Q = 5(.1D)___.25Q = .5D___.5Q = D ------ eq (iii)
                      .01P + .05N + .1D + .25Q = 3.31 --- eq (iv)
                                       2D + 2Q = 30 ----- Subtracting eq (ii) from eq (i)
                                         D + Q = 15 ----- eq (v)
                                       .5Q + Q = 15 ----- Substituting .5Q for D in eq (v)
                                          1.5Q = 15
                 <font color = blue><font size = 4><b>Number of quarters</font></font></b>, or {{{highlight_green(matrix(1,7, Q, "=", 15/1.5, "=", 150/15, "=", highlight(10)))}}}

                                        D + 10 = 15 ----- Substituting 10 for Q in eq (v)
                    <font color = blue><font size = 4><b>Number of dimes</font></font></b>, or {{{highlight_green(matrix(1,5, D, "=", 15 - 10, "=", highlight(5)))}}}

                 .01P + .05N + .1(5) + .25(10) = 3.31 ----- Substituting 5 for D, and 10 for Q in eq (iv)
                        .01P + .05N + .5 + 2.5 = 3.31
                                   .01P + .05N = 3.31 - 3
                                   .01P + .05N = .31 ---- eq (vi)

       P + N = D + Q, and D + Q = 15, so P + N = 15 ------- eq (vii) 
                                   .01P + .01N = .15 ------ Multiplying eq (vii) by .01 ---- eq (viii)
                                          .04N = .16 ------ Subtracting eq (viii) from eq (vi) 
                  <font color = blue><font size = 4><b>Number of nickels</font></font></b>, or {{{highlight_green(matrix(1,7, N, "=", .16/.04, "=", 16/4, "=", highlight(4)))}}}

                                         P + 4 = 15 ---- Substituting 4 for N in eq (vii)
                  <font color = blue><font size = 4><b>Number of pennies</font></font></b>, or {{{highlight_green(matrix(1,5, P, "=", 15 - 4, "=", highlight(11)))}}}</pre>