Final answer:
By setting up and solving a system of equations based on the total number of animals and legs, we determine there are 15 goats.
Step-by-step explanation:
To solve the problem of how many goats the farmer has, we must set up a system of equations using the given information: there are 20 ducks and goats in total and they have 70 legs altogether. We know that ducks have 2 legs and goats have 4 legs. Let's denote the number of ducks as D and the number of goats as G.
From the first piece of information, we can write the equation:
D + G = 20
This equation represents the total number of ducks and goats.
From the second piece of information, we can write:
2D + 4G = 70
This equation accounts for the total number of legs, considering that each duck has 2 legs and each goat has 4.
Now, we can solve this system of equations by substitution or elimination. Let's use substitution. We can express D as 20 - G from the first equation and plug it into the second equation:
2(20 - G) + 4G = 70
40 - 2G + 4G = 70
2G = 30
G = 15
Thus, there are 15 goats and 5 ducks.
It's important to use a step-by-step approach to accurately determine the solution to problems involving systems of equations, especially in real-world scenarios like this one involving a farmer's livestock.