Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solving 2 inequalities with imaginary numbers?

  1. Oct 29, 2005 #1
    I have 2 equations, imaginary ones, and 2 unknowns....trying to solve for them..but the answer i got, works with one, but not the other:

    i*Z1 - i*Z2 = -2 - i
    Z1 + 3i*Z2 = 4 + 7i

    where i is the imaginary number, and Z1 and Z2 are the 2 unknowns

    the answer i got:
    Z1 : 1.33333 + 0.6666667i
    Z2 : 2.33333 - 1.3333333i

    plugging it in, works for the first equation, but not the 2nd.

    unless i am doing the math wrong?
  2. jcsd
  3. Oct 29, 2005 #2
    i should say that the title is wrong, not inwqualities
  4. Oct 29, 2005 #3


    User Avatar
    Science Advisor
    Homework Helper

    You're not solving any inequalities. You are solving equations. Inequalities of complex numbers do not make sense.

    Your solution for [itex]z_2[/itex] is incorrect.
  5. Oct 29, 2005 #4


    User Avatar
    Science Advisor

    It's hard to say what you did wrong because you don't show your work.
    Multiplying the first equation by 3 gives
    3iZ1- 3iZ2= -6- 3i and the second equation is
    Z1+3iZ2= 4+ 7i Adding those:

    (1+ 3i)Z1= -2+ 4i.
    Divide both sides by 1+ 3i and you get z1= 1+ i
  6. Oct 29, 2005 #5
    well, problem is, my work, is done by the computer.

    my assignment is to do write the main program, use matrices, and get the answer, with given functions (that teacher provided).

    all we have to do, is pass the functionthe matrices, and get the PA=LU factorization, and the solve using front and back substitutions.

    are you familiar with that? if so, then I can go into detail what I did, which is how i obtained the answer i got above.

    the details of the assignment is here:

    http://www.whiteazn.com/upload/COMPWK.txt [Broken]

    Program 6 (very bottom)
    Last edited by a moderator: May 2, 2017
  7. Oct 30, 2005 #6


    User Avatar
    Science Advisor

    But since you still haven't told us how you attempted to solve the problem, I don't see how we can help you.
  8. Oct 30, 2005 #7
    i did tell you how i attempted it. I put it in the program, gave it the function, and that is what i got?

    A = matrix of:
    0 0
    0 0

    B = matrix of:
    1 -1
    0 3

    a = matrix:

    b = matrix:

    and i solved for x,y . (which is done by passing the matrices to the functions that are given to us by the teacher).

    how I got A,B, a, b?

    I put the 2 equations into a matrix:
    http://www.whiteazn.com/upload/matrix_eq.bmp [Broken]

    of then which I used to get A, B, a, b:

    http://www.whiteazn.com/upload/matrix.bmp [Broken]

    sent it the two functions, and got the answer.
    Last edited by a moderator: May 2, 2017
  9. Oct 30, 2005 #8


    User Avatar
    Science Advisor
    Homework Helper


    When you write a computer program to solve problems for you then you must be able to verify independently whether your program does, in fact, give the right answers. That means you must (a) understand the algorithm and underlying math and (b) you must be able to solve test cases by hand for comparison. Without both of those conditions being met your program is meaningless.
  10. Oct 30, 2005 #9
    I did that. he gave us a couple test examples, and they worked.

    ALl we are to do is setup the main part of the program, and send the matrices to the functions.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook