document.write( "Question 1066068: Justin sells brownies for$2 each and cupcakes for $3 each. Justin sells a total of 100 brownies and cupcakes for $240. Write and solve a system of linear equations to find the number of brownies and the number of cupcakes Justin sold. \n" ); document.write( "
Algebra.Com's Answer #681245 by jim_thompson5910(35256)\"\" \"About 
You can put this solution on YOUR website!
Let's set up the variables:
\n" ); document.write( "b = number of brownies sold
\n" ); document.write( "c = number of cupcakes sold\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Justin sold 100 items (brownies and cupcakes only) so the two variables must add to 100
\n" ); document.write( "\"b%2Bc+=+100\"
\n" ); document.write( "which we'll refer to as equation (1).\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "He sells brownies for $2 each. Which means that if he sells b brownies, then he collects 2*b dollars. In addition, he sells cupcakes for $3 each. Selling c cupcakes means he collects an additional 3*c dollars.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "So far, the total is 2b+3c. This total must be $240 because this is the given total he collects. The second equation, labeled equation (2), is therefore
\n" ); document.write( "\"2b%2B3c=240\"\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The system of equations is this
\n" ); document.write( "\"system%28b%2Bc+=+100%2C2b%2B3c=240%29\"\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "------------------------------------------------------------------------------------------------\r
\n" ); document.write( "\n" ); document.write( "Let's use that system to find the value of b and c.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Start with equation (1). Isolate b or c. Let's get b all by itself.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "\"b%2Bc+=+100\"
\n" ); document.write( "\"b%2Bc-c+=+100-c\"
\n" ); document.write( "\"b%2B0+=+100-c\"
\n" ); document.write( "\"b+=+100-c\" Call this equation (3)\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Notice how I just subtracted c from both sides.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Now move onto equation (2). Recall that equation is \"2b%2B3c=240\"\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "What we'll do from here is replace 'b' with '100-c'. This works because of equation (3) above.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "\"2b%2B3c=240\"
\n" ); document.write( "\"2%28b%29%2B3c=240\"
\n" ); document.write( "\"2%28100-c%29%2B3c=240\" Notice how b is now gone after the substitution\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Now solve for c\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "\"2%28100-c%29%2B3c=240\"
\n" ); document.write( "\"2%28100%29%2B2%28-c%29%2B3c=240\"
\n" ); document.write( "\"200-2c%2B3c=240\"
\n" ); document.write( "\"200%2B1c=240\"
\n" ); document.write( "\"200%2Bc=240\"
\n" ); document.write( "\"c%2B200=240\"
\n" ); document.write( "\"c%2B200-200=240-200\"
\n" ); document.write( "\"c%2B0=40\"
\n" ); document.write( "\"c=40\"
\n" ); document.write( "Which means that Justin sold 40 cupcakes\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Use the value of c to find b. We can use any equation with b & c in it. The easiest to use is equation (3).
\n" ); document.write( "\"b+=+100-c\"
\n" ); document.write( "\"b+=+100-40\" 'c' is replaced with 40 (since c = 40)
\n" ); document.write( "\"b+=+60\"
\n" ); document.write( "So 60 brownies were sold
\n" ); document.write( "
\n" );