1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

System of linear equations

  1. Feb 19, 2015 #1
    1. The problem statement, all variables and given/known data
    How do I solve the following system?
    x+y+z = 100
    120x + 50y + 25z = 4000

    where x, y, and z must all be at least one and are all integers. There will be more than one solution right

    2. Relevant equations
    none.

    3. The attempt at a solution
    I solved for z in terms of the other two variables and got z must be between 43 and 84. I choose p = 50 and then tried to solve for c but didn't get an integer. Is there a more systematic way to approach this question?
     
  2. jcsd
  3. Feb 19, 2015 #2

    epenguin

    User Avatar
    Homework Helper
    Gold Member

    Systematic way? I don't know the answer. I also don't know whether it really helps but you would at least show you had done something if you divided the second equation by 5. You can in any case get three (<) inequalities for x, y and z without solving any equations. And you caN get inequalities for x and y in the same way you did for z. Then you could see whether that limits the answer enough to be able to solve efficiently. It's obvious isn't it that you can always solve it inefficiently? In fact once you have solved them why dont you.... think about everything you know about linear equations?
     
    Last edited: Feb 19, 2015
  4. Feb 19, 2015 #3
    How do i gaurentee that my answer will be an integer when I select a value for one of my variable within the bounds? seems like ALOT of work/luck to finally come to a proper answer.
     
  5. Feb 19, 2015 #4

    epenguin

    User Avatar
    Homework Helper
    Gold Member

    Well I don't call what I suggested a lot of work and sometimes if you can't foresee a calculation right to the end you just have to see what it is that you can calculate, do it, and then ponder what you might make of the greater information you then have. And even if you can't in the end, you get some credit from teachers, examiners and us.
     
  6. Feb 20, 2015 #5

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    A better way is to solve for two variables in terms of a third, then just "scan" the possible values of that third variable to see what the other two become. It makes sense to solve for y and z in terms of x, since x is the most restricted variable: we must have x <= 4000/120 = 33.33333 .., so 1 <= x <= 33 for integer-restricted x. If you actually carry out the solution you will be able to see that x is much more restricted than indicated above: requiring that y,z be positive integers reduces the number of possible x values to a small number of possibilities.
     
  7. Feb 20, 2015 #6

    ehild

    User Avatar
    Homework Helper
    Gold Member

    You can use divisibility: Eliminating z, for example, you get the equation 19x +5y=300 at the end. Isolating x, ##x=\frac {5(60-y)}{19}##. So 60-y has to be divisible by 19 and 0<y<60.
     
  8. Feb 20, 2015 #7

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    From x+y+z = 100, we have z= 100- x- y. Putting that into 120x + 50y + 25z = 4000, 120x+ 50y+ 25(100- x- y)= 120x+ 50y+ 2500- 25x- 25y= 95x+ 25y+ 2500= 4000 or 95x+ 25y= 1500. Divide by 5: 19x+ 5y= 300. That is a "Diophantine equation" and there is a fairly standard way of solving such equations. 5 divides into 19 3 times with remainder 4: 19- (3)5= 4. 4 divides into 5 once with remainder 1: 5- 4= 1. Replace that "4" with 19- (3)5: 5- (19- (3)5)= 4(5)- 1(19)= 1. Multiply by 300: 1200(5)- 300(19)= 300. So one solution to 19x+ 5y= 300 is x= -300, y= 1200. But it is easy to see that x= -300+ 5k, y= 1200- 19k is also a solution for any k: 19(-300+ 5k)+ 5(1200- 19k)= -300(19)+ 1200(5)+ 19(5k)- 5(19k) and the "k" terms cancel.
     
  9. Feb 20, 2015 #8
    Isn't it possible that 5*(60-y) to be divisible by 19 but not 60-y? I know your statement would be true if 60-y was guaranteed to be a prime, but it's not.
     
  10. Feb 20, 2015 #9

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    19 is prime! 5 certainly is not divisible by 19 so 60- y must be. (If 60- y is divisible by 19 either it is 19 or it is not prime!)
     
  11. Feb 20, 2015 #10

    ehild

    User Avatar
    Homework Helper
    Gold Member

    5 is not divisible by 19 but 5K is. What do you know about K then? :)
     
  12. Feb 20, 2015 #11
    ahhh gee wilikers y'er all sho shmart
     
  13. Feb 20, 2015 #12

    ehild

    User Avatar
    Homework Helper
    Gold Member

    would you please translate??? :)
     
  14. Feb 20, 2015 #13
    You are intelligent!
     
  15. Feb 20, 2015 #14

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Just a little slurring. PsychonautQQ has probably been drinking too much.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: System of linear equations
Loading...