Results 1 to 7 of 7

Thread: Solving systems of linear equations?

  1. #1

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Solving systems of linear equations?

    Hello. Can anyone tell me how to go about solving two equations
    simultaneously. Such as. a - b = 1, a/3 + b/5 = 1. The second equation is a fractional equation so i thought the correct process was to multiply the denoms by a number that both can divide into evenly.

    (15/1)a/3 + (15/1)b/5 = 1(15/1) --> 5a + 3b = 15

    Now take the first equation equation. a - b = 1 and multiply by -5 to drop one variable. -5(a - b = 1) --> -5a + 5b = -5

    Now i end up with two equations --> 3b = 15, 5b = -5

    Add the cofficents 8b = 10 --> 8b/8 = 10/8 --> b = 5/4

    So if i plug in 5/4 into the first equation a - b = 1 --> a - 5/4 = 1
    --> a = 5/4 + 1 --> a = 9/4

    I guess i was on the right track.

  2. #2
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860
    You should've added "resolved" to the title for the fastest-solved post ever.
    Don't pay attention to this signature, it's contradictory.

  3. #3

  4. #4
    New Member
    Join Date
    Mar 2004
    Posts
    4
    Hi,

    Check this link:
    http://www.ibrtses.com/delphi/dequ.html

    I contains the theory and the code to solve N equations with N unknown, not just this simple problem.

    have fun

  5. #5

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    for two equations theres two simple methods: add the equations left side to left side and right side to right side. Alternatively subtract.

    For several equations, try googling for linear algebra and gauss elimination
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  7. #7
    Lively Member
    Join Date
    Apr 2003
    Location
    Georgetown, Texas
    Posts
    114
    Dilenger4 wrote:
    Hello. Can anyone tell me how to go about solving two equations simultaneously. Such as. a - b = 1, a/3 + b/5 = 1. The second equation is a fractional equation so i thought the correct process was to multiply the denoms by a number that both can divide into evenly.
    (15/1)a/3 + (15/1)b/5 = 1(15/1) --> 5a + 3b = 15

    Now take the first equation equation. a - b = 1 and multiply by -5 to drop one variable. -5(a - b = 1) --> -5a + 5b = -5

    Now i end up with two equations --> 3b = 15, 5b = -5
    You method is correct, up to the last sentence!. You now really have two equations, namely:
    5a + 3b = 15
    -5a + 5b = -5

    You now add these two, obtaining:

    (5a-5a) + (3b+5b) = (15-5), or
    0 + 8b = 10, from which
    b = 10/8, or
    b = 1.25

    Then, substituing this value of b in the first equation:
    5a + 3*1.25 = 15
    5a + 3.75 = 15, from which
    a = (15 - 3.75)/5, or
    a = 11.25/5. or
    a = 2.25
    Last edited by RAEsquivelC; May 3rd, 2004 at 10:07 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width