# How can we solve two equations with three unknowns or variab

### How can we solve two equations with three unknowns or variab

how can we solve two equations with three unknowns or variables for ex:

x+y+z=100 &
5x+2y+ 0.25z=100 , then x=?, y=?, z=? where x,y,z are positive integers

Guest

### Re: how can we solve two equations with three unknowns or va

In general with 2 equations and 3 variables you can't find a unique solution, instead you'll usually be faced with infinite solutions which can be written as a function of one variable. However, there is a slight twist in your case that you are told that $x,y,z$ are positive integers, this gives us extra information which can narrow down the number of solutions.

Start as you would normally, by solving for $x,y,z$ in terms of one of the variables (choose your favourite, it shouldn't matter), say $x$. So we solve assuming $x$ is a fixed known constant, so now we have 2 unknowns $y,z$ and 2 equations.
$x+y+z=100 \implies y = 100-x-z$
Substitute this into
$5x+2y+z/4 = 100 \implies 5x+2(100-x-z)+z/4=100 \implies z = (12x+400)/7$
Substitute this back into $y$
$y=100-x-z \implies y=100-x-(12x+400)/7 \implies y=(300-19x)/7$

So $y=(300-19x)/7$ and $z = (12x+400)/7$, remember that the question tells us that $x,y,z>0$, this means that
$y=(300-19x)/7>0 \implies 300-19x>0 \implies 300>19x \implies 300/19=15.789...>x$
Since $x$ is positive and an integer we've narrowed its down to 15 possibilities, $x=1,2,3,...,15$.
We could just try all 15 possibilities and see which ones work. However, if you know a bit of modulo arithmetic you can save yourself a bit of time.

So so far we've used the fact that $x,y$ are positive, if we try to do the same trick with $z>0$, we don't get anything useful. We get $z>0$ as a consequence of $x>0$, so it doesn't help us. The other information we are given is that $x,y,z$ are integers. In particular this means that $y = (300-19x)/7$ must be an integer, or put another way $300-19x$ must be divisible by $7$. Using modula arithmetic this would be represented by $300-19x\equiv 0\bmod 7$, you can look up tutorials on the internet on how to solve this, but it will essentially tell you that if $300-19x$ is divisible by 7 then so is 4 times that, i.e.
$4\times (300-19x) = 1200-76x = 7\times(172-11x)+(x-4)$
If the whole thing is divisible by 7 and $7\times(172-11x)$ is clearly divisible by 7, then it follows that $x-4$ is divisible by 7, i.e. $x$ has remainder 4 upon dividing by 7. This narrows down $x$ to 4, or 11.
We could try the same trick on $z$ being an integer but it turns out it will just tell us again that $x$ has remainder 4 when dividing by 7, so it isn't useful.

So there are two possible solutions $x=4, y=32, z=64$, and $x=11, y=13, z=76$, which you can check both satisfy all the constraints in the question.

Hope this helped,

R. Baber.

Guest

### Re: How can we solve two equations with three unknowns or va

thank you Mr, Baber for your help

a customer buys some apples, mangos and oranges which total comes exactly 100 fruits

the cost of one apple is 5 Rs.
the cost of one mango is 2 Rs.
and four oranges cost 1 Rupee.

the total amount he pays also equal to 100 Rs.

then how many apples, mango and oranges did he buy?

how these kinds of problems solved mathematically?

Guest

Return to Math Problem of the Week

### Who is online

Users browsing this forum: No registered users and 2 guests