document.write( "Question 1105451: A farmer bought a number of pigs for $234. However, 8 of them died before he could sell the rest at a profit of 7 per pig. His total profit was $54. How many pigs did he originally buy?\r
\n" ); document.write( "\n" ); document.write( "He originally bought pigs.
\n" ); document.write( "

Algebra.Com's Answer #720280 by ikleyn(52835)\"\" \"About 
You can put this solution on YOUR website!
.
\n" ); document.write( "A farmer bought a number of pigs for $234. However, 8 of them died before he could sell the rest at a profit of 7 per pig.
\n" ); document.write( "His total profit was $54. How many pigs did he originally buy?
\n" ); document.write( "~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\r\n" );
document.write( "Let \"x\" be the unknown number of pigs he originally bought, and\r\n" );
document.write( "let \"p\" be the original price for each individual pig.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Then you have these two equations\r\n" );
document.write( "\r\n" );
document.write( "xp = 234                 (1)\r\n" );
document.write( "(x-8)*(p+7) = 234+54     (2)\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Simplify (2):\r\n" );
document.write( "\r\n" );
document.write( "xp - 8p + 7x - 56 = 234 + 54\r\n" );
document.write( "\r\n" );
document.write( "234 -8p + 7x - 56 = 234 + 54\r\n" );
document.write( "\r\n" );
document.write( "-8p + 7x - 56 = 54\r\n" );
document.write( "\r\n" );
document.write( "-8p + 7x = 54 + 56 = 110\r\n" );
document.write( "\r\n" );
document.write( "-8p + 7x = 110.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Finally, you have these two equations\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "xp = 234\r\n" );
document.write( "-8p + 7x = 110.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Express p from the second equation  p = \"%287x-110%29%2F8\"  and substitute it into he first.\r\n" );
document.write( "You will get a quadratic equation for the single unknown \"x\".\r\n" );
document.write( "\r\n" );
document.write( "x*(7x-110) = 234*8 = 1872.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Solve it and get the answer x= 26.\r\n" );
document.write( "
\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "--------------
\n" ); document.write( "Notice 1.   Other setup/setups are possible,  too.  For example,  this one:\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "\"%28234%2B54%29%2F%28x-8%29\" - \"234%2Fx\" = 7.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Notice 2. This problem is a TWIN to the problem\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "https://www.algebra.com/algebra/homework/quadratic/Quadratic_Equations.faq.question.1105285.html\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "I solved couple of days ago in this forum.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );