# Solving 2 inequalities with imaginary numbers?

1. Oct 29, 2005

### JaeSun

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

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. Oct 29, 2005

### JaeSun

i should say that the title is wrong, not inwqualities

3. Oct 29, 2005

### Tide

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.

4. Oct 29, 2005

### HallsofIvy

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

(1+ 3i)Z1= -2+ 4i.
Divide both sides by 1+ 3i and you get z1= 1+ i

5. Oct 29, 2005

### JaeSun

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:

Program 6 (very bottom)

Last edited by a moderator: May 2, 2017
6. Oct 30, 2005

### HallsofIvy

But since you still haven't told us how you attempted to solve the problem, I don't see how we can help you.

7. Oct 30, 2005

### JaeSun

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:

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

sent it the two functions, and got the answer.

Last edited by a moderator: May 2, 2017
8. Oct 30, 2005

### Tide

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.

9. Oct 30, 2005

### JaeSun

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.