EXPLANATION
If the field is 35 heads and 106 feet
Let x be the number of pigs and y the number of ducks.
x= number of pigs y= number of ducks
Each pig has one head and 4 feet and each duck has 1 head and 2 feets.
The first equation about the heads would be as follows:
(1) x + y = 35
The second equation about the legs would be:
(2) 4x + 2y = 106
Isolating x in (1):
x = 35 - y
Replacing x= 35 - y in (2):
4(35-y) + 2y = 106
Applying the distributive property:
140 - 4y + 2y = 106
Adding like terms:
140 -2y = 106
Adding +2y to both sides:
140 = 106 + 2y
Subtracting -106 to both sides:
140 - 106 = 2y
Subtracting numbers:
34 = 2y
Dividing both sides by 2:
34/2 = y
Simplifying:
17 = y
Switching sides:
y = 17
Replacing y=17 in (1)
x + 17 = 35
Subtracting -17 to both sides:
x = 35 - 17
Subtracting numbers:
x = 18
The solutions to the system of equations are:
x= 18 and y = 17
Hence, there are 18 pigs and 17 ducks in the farm.