Solving 2 inequalities with imaginary numbers?

JaeSun
Messages
37
Reaction score
0
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?
 
Mathematics news on Phys.org
i should say that the title is wrong, not inwqualities
 
You're not solving any inequalities. You are solving equations. Inequalities of complex numbers do not make sense.

Your solution for z_2 is incorrect.
 
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
 
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

Program 6 (very bottom)
 
Last edited by a moderator:
But since you still haven't told us how you attempted to solve the problem, I don't see how we can help you.
 
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:
-2
4

b = matrix:
-1
7

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

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

http://www.whiteazn.com/upload/matrix.bmp

sent it the two functions, and got the answer.
 
Last edited by a moderator:
JaeSun,

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.
 
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.
 
Back
Top