Let's solve this problem by setting up a system of equations:
Let's say the number of pigs is P and the number of ducks is D.
Each pig has 4 legs and each duck has 2 legs.
So, the total number of legs can be expressed as:
4P + 2D = 36
We also know that there are 10 animals in total:
P + D = 10
We can solve this system of equations to find the number of pigs and ducks:
P + D = 10 (Equation 1)
4P + 2D = 36 (Equation 2)
From Equation 1, we can solve for P:
P = 10 - D
Substitute this value of P into Equation 2:
4(10 - D) + 2D = 36
Simplify and solve for D:
40 - 4D + 2D = 36
-2D = -4
D = 2
Substitute this value of D into Equation 1 to find P:
P + 2 = 10
P = 8
So, there are 8 pigs and 2 ducks.
The farmhouse has 8 pigs and 2 ducks, determined by setting up and solving two equations based on the total number of animals and legs. We find that there are 10 animals in total and 36 legs altogether. By using substitution, we arrive at the final answer.
;