# A small farm has ducks and goats. There are 11 animals in all and 34 legs in all (wings don't count!). How many goats does the farm have? How many ducks?

5 ducks, 6 goats

#### Explanation:

We have some Goats and some Ducks. There are eleven animals in all:

$G + D = 11$

Goats have 4 legs and Ducks 2. There are 34 legs altogether:

$4 G + 2 D = 34$

I'm going solve the first equation for $G$ in terms of $D$, then substitute in:

$G = 11 - D$

$4 \left(11 - D\right) + 2 D = 34$

and now solve for $D$:

$44 - 4 D + 2 D = 34$

$2 D = 10$

color(blue)(ul(bar(abs(color(black)(D=5))))

which will mean that color(blue)(ul(bar(abs(color(black)(G=6)))):

$G + D = 11$

$G + 5 = 11 \implies G = 6$

And now let's check our leg count:

$4 G + 2 D = 34$

$4 \left(6\right) + 2 \left(5\right) = 34$

$24 + 10 = 34$

34=34color(white)(000)color(green)sqrt