.
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?
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Let "x" be the unknown number of pigs he originally bought, and
let "p" be the original price for each individual pig.
Then you have these two equations
xp = 234 (1)
(x-8)*(p+7) = 234+54 (2)
Simplify (2):
xp - 8p + 7x - 56 = 234 + 54
234 -8p + 7x - 56 = 234 + 54
-8p + 7x - 56 = 54
-8p + 7x = 54 + 56 = 110
-8p + 7x = 110.
Finally, you have these two equations
xp = 234
-8p + 7x = 110.
Express p from the second equation p = and substitute it into he first.
You will get a quadratic equation for the single unknown "x".
x*(7x-110) = 234*8 = 1872.
Solve it and get the answer x= 26.
--------------
Notice 1. Other setup/setups are possible, too. For example, this one:
- = 7.
Notice 2. This problem is a TWIN to the problem
https://www.algebra.com/algebra/homework/quadratic/Quadratic_Equations.faq.question.1105285.html
I solved couple of days ago in this forum.