4
algebra

A farm has goats and ducks. There are 45 animals with 126 legs total. How many goats are there? (Goats have 4 legs, ducks have 2 legs)

A

15 goats

B

18 goats

C

20 goats

D

24 goats

Correct Answer: B

Choice B is the correct answer. Let gg = goats and dd = ducks.

System: {g+d=454g+2d=126\begin{cases} g + d = 45 \\ 4g + 2d = 126 \end{cases}

Step 1: From first: d=45gd = 45 - g

Step 2: Substitute: 4g+2(45g)=1264g + 2(45 - g) = 1264g+902g=1264g + 90 - 2g = 1262g=362g = 36g=18g = 18

Solution: 18 goats

Verification: 18+27=4518 + 27 = 45 ✓ and 4(18)+2(27)=72+54=1264(18) + 2(27) = 72 + 54 = 126

💡 Strategic Tip: Animals/legs problems are classic systems applications.

**Other choices fail verification.