# A farmer looks over a field and sees 2828 heads and 8282 feet. Some are pigs, some are chickens....

## Question:

A farmer looks over a field and sees {eq}2828 {/eq} heads and {eq}8282 {/eq} feet. Some are pigs, some are chickens.

How many of each animal are there?

## Elimination Method:

In the elimination method, we solve a system of two equations of two variables by adding or subtracting the equations. By doing so, we get a linear equation in one variable, which we can solve easily.

Let us assume the number of pigs and chickens to be {eq}p {/eq} and {eq}c {/eq} respectively.

Since there are {eq}2828 {/eq} heads in total,

$$p+c = 2828 \,\,\,\,\,\,\rightarrow (1)$$

Since there are {eq}8282 {/eq} legs in total, and since a pig has 4 legs and a chicken has 2 legs, we have:

$$4p+2c = 8282\,\,\,\,\,\,\rightarrow (2)$$

Multiply both sides of (1) by {eq}-2 {/eq}:

$$-2(p+c=2828) \Rightarrow -2p-2c = -5656\,\,\,\,\,\,\rightarrow (3)$$

$$(4p+2c )+(-2p-2c)= 8282 +(-5656) \\ (4p-2p)+(2c-2c) = 8282-5656\\ 2p= 2626\\ \text{Dividing both sides by 2}, \\ p=1313$$

Substitute this in (1):

$$1313+c =2828 \\ \text{Subtracting 1313 from both sides}, \\ c = 1515$$

Therefore the number of pigs is {eq}\boxed{\mathbf{1313}} {/eq} and the number of chickens with grandfather is {eq}\boxed{\mathbf{1515}} {/eq}. 