document.write( "Question 1100352: An average bagel contains 30 mg of calcium and 2 mg of iron. One ounce of cream cheese contains 25 mg of calcium and 0.4 mg of iron. If Leyla wants to eat a combination of bagels and cream cheese that contains exactly 370 mg of calcium and 12 mg of​ iron, how much of each should she​ eat?\r
\n" ); document.write( "\n" ); document.write( "How many bagels does she need to eat?\r
\n" ); document.write( "\n" ); document.write( "How many ounces of cream cheese does she need?
\n" ); document.write( "

Algebra.Com's Answer #714816 by jim_thompson5910(35256)\"\" \"About 
You can put this solution on YOUR website!

\n" ); document.write( "Let,
\n" ); document.write( "x = number of bagels she needs to eat (this is a positive whole number)
\n" ); document.write( "y = amount, in ounces, of cream cheese she needs to eat (this is some positive number which could be a whole number or a decimal number)\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "\"An average bagel contains 30 mg of calcium\" and \"One ounce of cream cheese contains 25 mg of calcium\". So if Leyla eats x bagels and y ounces of cream cheese, then she'll consume 30x+25y mg of calcium in total. She needs 370 mg of calcium meaning that the first equation is 30x+25y = 370\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The second equation is 2x+0.4y = 12 because
\n" ); document.write( "she gets 2 mg of iron from each bagel, so 2*x mg of iron from all the bagels she eats
\n" ); document.write( "she also gets 0.4 mg of iron per ounce of cream cheese, giving another sub-total of 0.4*y mg of iron
\n" ); document.write( "Overall she consumes 2x+0.4y mg of iron. This amount must be equal to 12 as this is the target value for iron.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The two equations in this system are
\n" ); document.write( "30x+25y = 370
\n" ); document.write( "2x+0.4y = 12\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Let's solve the second equation for x
\n" ); document.write( "2x+0.4y = 12
\n" ); document.write( "2x+0.4y-0.4y = 12-0.4y subtract 0.4y from both sides
\n" ); document.write( "2x = 12-0.4y
\n" ); document.write( "2x/2 = (12-0.4y)/2 divide both sides by 2 to isolate x
\n" ); document.write( "x = (12/2)-(0.4y/2)
\n" ); document.write( "x = 6-0.2y\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Then plug this into the first equation
\n" ); document.write( "30x+25y = 370
\n" ); document.write( "30*(x)+25y = 370
\n" ); document.write( "30*(6-0.2y)+25y = 370 x has been replaced with 6-0.2y\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Next we isolate y
\n" ); document.write( "30*(6-0.2y)+25y = 370
\n" ); document.write( "30*(6)+30*(-0.2y)+25y = 370 distribute
\n" ); document.write( "180-6y+25y = 370
\n" ); document.write( "180+19y = 370
\n" ); document.write( "180+19y-180 = 370-180 subtract 180 from both sides
\n" ); document.write( "19y = 190
\n" ); document.write( "19y/19 = 190/19 divide both sides by 19 to get y all by itself
\n" ); document.write( "y = 10\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Use this value of y to find x
\n" ); document.write( "x = 6-0.2y
\n" ); document.write( "x = 6-0.2*10 replace y with 10
\n" ); document.write( "x = 6-2
\n" ); document.write( "x = 4\r
\n" ); document.write( "\n" ); document.write( "----------------------------------------------------
\n" ); document.write( "----------------------------------------------------\r
\n" ); document.write( "\n" ); document.write( "In summary we get
\n" ); document.write( "x = 4
\n" ); document.write( "y = 10\r
\n" ); document.write( "\n" ); document.write( "Recall that at the top of the problem, we let,
\n" ); document.write( "x = number of bagels she needs to eat
\n" ); document.write( "y = amount, in ounces, of cream cheese she needs to eat\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "So Leyla needs to eat 4 bagels and 10 ounces of cream cheese to reach her goal (of consuming exactly 370 mg of calcium and 12 mg of iron)
\n" ); document.write( "
\n" ); document.write( "
\n" );