Answer:
The number of pigs the farmer has is 47
Explanation:
Assume that the number of pigs is x and the number of chickens is y
∵ The farmer has 102 animals
∵ The number of pigs is x
∵ The number of chickens is y
→ Add them and equate the sum by 102
∴ x + y = 102 ⇒ (1)
∵ Each pig has 4 legs
∴ The number of legs of all pigs is 4x
∵ Each chicken has 2 legs
∴ The number of legs of all chickens is 2y
∵ He has a total of 298 legs
→ Add 4x and 2y, then equate the sum by 298
∴ 4x + 2y = 298 ⇒ (2)
Now we have a system of equations to solve it
→ Multiply equation (1) by -2 to make the coefficients of y equal in values
and opposite in signs
∵ -2(x) + -2(y) = -2(102)
∴ -2x - 2y = -204 ⇒ (3)
→ Add equations (2) and (3)
∵ (4x + -2x) + (2y + -2y) = (298 + -204)
∴ 2x + 0 = 94
∴ 2x = 94
→ Divide both sides by 2 to find x
∴ x = 47
∴ The number of pigs the farmer has is 47