document.write( "Question 131973: A farmer has both pigs and chickens on his farm. There are 78 feet and 27 heads. How many pigs and how many chickens are there? \n" ); document.write( "
Algebra.Com's Answer #96410 by bucky(2189)\"\" \"About 
You can put this solution on YOUR website!
Let P represent the number of pigs and C represent the number of chickens.
\n" ); document.write( ".
\n" ); document.write( "Since each type of animal has 1 head and there are 27 heads, then the number of pigs plus the
\n" ); document.write( "number of chickens must total 27. In equation form this is:
\n" ); document.write( ".
\n" ); document.write( "P + C = 27
\n" ); document.write( ".
\n" ); document.write( "And since the number of pigs legs is 4 times the number of pigs (i.e., 4P) and the number of
\n" ); document.write( "chicken legs is 2 times the number of chickens (2C), then the total number of legs is 4P + 2C.
\n" ); document.write( "But you are told that this number is 78. So we can write the equation:
\n" ); document.write( ".
\n" ); document.write( "4P + 2C = 78
\n" ); document.write( ".
\n" ); document.write( "From the first equation for the number of heads, we can solve for P by subtracting C
\n" ); document.write( "from both sides to get:
\n" ); document.write( ".
\n" ); document.write( "P = 27 - C
\n" ); document.write( ".
\n" ); document.write( "Since P = 27 - C we can substitute 27 - C for P in the second equation ... the equation for
\n" ); document.write( "the number of legs. Replacing P by 27 - C in this equation results in:
\n" ); document.write( ".
\n" ); document.write( "4(27 - C) + 2C = 78
\n" ); document.write( ".
\n" ); document.write( "Multiply out the left side by multiplying 4 times each of the terms in the parentheses and
\n" ); document.write( "the equation becomes:
\n" ); document.write( ".
\n" ); document.write( "108 - 4C + 2C = 78
\n" ); document.write( ".
\n" ); document.write( "On the left side when we combine the two terms that contain C we get:
\n" ); document.write( ".
\n" ); document.write( "108 - 2C = 78
\n" ); document.write( ".
\n" ); document.write( "Get rid of the 108 on the left side by subtracting 108 from both sides and you get:
\n" ); document.write( ".
\n" ); document.write( "-2C = -30
\n" ); document.write( ".
\n" ); document.write( "Solve for C by dividing both sides by -2 and we get:
\n" ); document.write( ".
\n" ); document.write( "C = -30/-2 = 15
\n" ); document.write( ".
\n" ); document.write( "There are 15 chickens. Since there is a total of 27 heads, the number of pigs must be
\n" ); document.write( "27 minus 15 = 12 pigs.
\n" ); document.write( ".
\n" ); document.write( "Just as another check, the 12 pigs have a total of 4*12 = 48 legs and the 15 chickens have
\n" ); document.write( "a total of 15*2 = 30 legs. So the total number of legs is 48 + 30 = 78 ... just as the problem
\n" ); document.write( "says it should be. So our answers check ... there are 12 pigs and 15 chickens.
\n" ); document.write( ".
\n" ); document.write( "Hope this helps you to understand the problem and shows you a way of working it through to
\n" ); document.write( "an answer.
\n" ); document.write( ".
\n" ); document.write( "
\n" );