on a farm there is 18 pigs and chickens (all together). There are 52 legs, how many pigs and how many chickens are there? Show how you got your answer. i know there are 10 chickens and 8 pigs, but i did that through trial and error, can you help me figure out the right math to do for this problem.

Certainly! Let's break down the problem step by step to find a systematic approach to solve it.

Let's assume the number of pigs is 'p' and the number of chickens is 'c'. We are given that the total number of pigs and chickens is 18, so we can write the equation: p + c = 18.

Since each pig has 4 legs and each chicken has 2 legs, the total number of legs can also be expressed using 'p' and 'c': 4p + 2c = 52.

To solve these two equations simultaneously, we can use a method called substitution. First, solve one equation for one of the variables in terms of the other variable. Let's solve the first equation for 'p': p = 18 - c.

Now, substitute this value of 'p' into the second equation: 4(18 - c) + 2c = 52.

Simplify the equation: 72 - 4c + 2c = 52.

Combine like terms: -2c = 52 - 72.

Simplify further: -2c = -20.

Divide both sides of the equation by -2 to solve for 'c': c = -20 / -2 = 10.

We have found that there are 10 chickens. Now substitute this value of 'c' back into the first equation to find 'p': p + 10 = 18.

Solve for 'p': p = 18 - 10 = 8.

So, there are 8 pigs and 10 chickens on the farm, which matches your initial answer obtained through trial and error.

There are two ways to do it, the farmer's way and the mathematicians's. I prefer the farmer's way.

First, the farmer's way:
We have 18 animals and 52 legs.
If we have 9 of each, that makes an average of 3 legs each animal, we get 3*18=54 legs. We only have 52. So change one pig (9-1=8) for a chicken (9+1=10) to get 52 legs (two less). That makes 10 chickens and 8 pigs. No calculators, no pain either.

Now the mathematicians way:
Let p be the number of pigs, then the number of chickens is (18-p).
The total number of legs is thus
4*p + 2(18-p) = 52
2p = 52-36
p = 16/2
=8
(18-p) = 18-8 = 10
Answer: there are 8 pigs and 10 chickens.

make a funny sentense for each math word