# Solving a system of equations for four variables

1. Nov 5, 2015

### cmkluza

1. The problem statement, all variables and given/known data
Consider the polynomial $p(x) = x^4 + ax^3 + bx^2 + cx + d$, where a, b, c, d ∈ ℝ.

Given that 1 + i and 1 - 2i are zeroes of p(x), find the values of a, b, c and d.

2. Relevant equations

3. The attempt at a solution
Since 1 + i and 1 - 2i are zeroes, I believe it follows that 1 - i and 1 + 2i should also be zeroes, right? Hence, plugging in 1 + i, 1 - i, 1 + 2i, 1 - 2i should produce equations that equal 0, assuming I'm remembering the factor theorem correctly. But, I'm not sure where to go from there. Solving this through brute force would be ridiculous and inefficient, but I can't think of how else I can solve this. Anyhow, I plugged in the factors and got the following equations, I just don't know what to do with them:

$p(1 + i) = (-4 - 2a + c + d) + (2a + 2b + 2c)i = 0$
$p(1 - i) = (-4 - 2a + c + d) - (2a + 2b + 2c)i = 0$
$p(1 + 2i) = (-7 - 11a - 3b + c + d) + (-24 - 2a + 4b + 2c)i = 0$
$p(1 - 2i) = (-7 - 11a - 3b + c + d) - (-24 - 2a + 4b + 2c)i = 0$

How can I solve for these variables efficiently?

2. Nov 5, 2015

### epenguin

If you know all the factors you know the equation.

Last edited: Nov 5, 2015
3. Nov 5, 2015

### cmkluza

... oh yeah.

$[x - (1 + i)][x - (1 - i)][x - (1 + 2i)][x - (1 - 2i)] = p(x)$
Don't have pen and paper handy at the moment, but if I get a chance I'll add what the algebra comes out to later.

4. Nov 5, 2015

### PeroK

Try to think of a quick way to do that expansion. Don't just multiply all those things together!

5. Nov 5, 2015

### HallsofIvy

It has already been explained that you do NOT need to solve these equations- but since you asked:
Separating real and imaginary parts, the first two equation both give -4- 2a+ c+ d= 0 or -2a+ c+ d= 4 and 2a+ 2b+ 2c= 0 or a+ b+ c= 0 and the last two both give -7- 11a- 3b+ c+ d= 0 or -11a- 3b+ c+ d= 7 and -24- 2a+ 4b+ 4c= 0 or -a+ 2b+ 2c= 24 so we still have four equations in four unknowns.

If we subtract 2 times a+ b+ c= 0 from -a+ 2b+ 2c= 24, we get -3a= 24 so a= -8. Then, from -2a+ c+ e= 4, c+ d= -12 and -11a- 3b+ c+ d= 88- 3b- 12= 7 so 3b= 88-12- 7= 69 and b= 23. a+ b+ c= -8+ 23+ c= 0 so c= 8- 23= -15. Finally -15+ d= -12 so d= 15- 12= 3.

6. Nov 5, 2015

7. Nov 5, 2015

### Ray Vickson

As HallsofIvy has explained, you do not need to solve any equations at all, but if you wanted to, you would start with the 4x4 system obtained by equating all real and imaginary parts to zero:
$$\begin{array}{lcrl} -4 - 2a + c + d &=&0&(\text{real part of }\;p(1+i) )\\ 2a + 2b + 2c &=& 0 & (\text{imag. part of }\;p(1+i) )\\ -7 - 11a - 3b + c + d &=&0 & (\text{real part of }\;p(1+2i) )\\ -24 - 2a + 4b + 2c&=& 0 &(\text{imag. part of }\;p(1+2i) ) \end{array}$$
The standard way to solve such problems is to use Gaussian elimination, which in this case would work as follows.

Pick one equation and solve for one of the variables in it, in terms of the other variables. For example, we can solve for $d$ in terms of $a$ and $c$ from the first equation: $d = 4 + 2a - c$. Substituting that expression for $d$ into the other equations (and simplifying) gives a new system of 3 equations in three unknowns:
$$\begin{array}{rcr} 2a + 2b + c &=& 0 \\ 9a + 3b &=& -3 \\ -2a + 4b + 2c &=& 24 \end{array}$$
Now do it again: pick one of the equations and solve for one variable in terms of the others; then substitute the result into the remaining two equations, leaving 2 equations in two unknowns. For example, we could solve for $c$ from the first equation above, giving $c = -2a - 2c$, and putting that into the next two equations leaves 2 equations in the two variables $a,b$. Then do it again, until you are left with one equation in 1 unknown. After solving for that unknown, you can back-substitute the result into your final substitution formula, to obtain both of your final variables. In other words, you would now know $a$ and $b$ both. Then back-substitute into your $c$-formula to get the value of $c$. Finally, put the known values of $a,b,c$ into your $d$-formula to determine the value of $d$.

Of course, you can "automate" a lot of that by using matrices and so forth, but the basics are really no different from what I just described. And, believe it or not, that really is the "go-to" method used in dealing with 99% of such problems, even for real-world versions of such instances that often reach thousands of equations in thousands of unknowns in industrial applications.

8. Nov 5, 2015

### HallsofIvy

Ray, I wasn't the one who said that he did not need to solve the equations- that was epenguin. What I did was show how to solve the four equations.

9. Nov 5, 2015

### Ray Vickson

Yes, you are right. My apologies to epenguin.

10. Nov 5, 2015

### cmkluza

Not seeing how to do it in my head...

What I've done is let (x - 1) = y, making it slightly more simple to do:

$(y + i)(y - i)(y + 2i)(y - 2i)$
$(y^2 + 1)(y^2 + 4) = y^4 + 5y^2 + 4$
$(x - 1)^4 + 5(x - 1)^2 + 4$
$x^4 - 4x^3 + 11x^2 - 14x + 10$
Hastily done, so anticipate algebraic mistakes. What's the intuition used to figure the answer in my head?

11. Nov 6, 2015

### PeroK

My idea was just to use the fact that $(x - z)(x - z^*) = x^2 - 2Re(z) + |z|^2$. Then you can simply write:
$p(x) = (x^2 - 2x +2)(x^2 -2x + 5)$

Although, I couldn't finish it off in my head.

12. Nov 6, 2015

### epenguin

It is exactly what you have done. That is, regrouping so as to use the formula (A + B)(A - B) = A2 - B2.

I really meant only someone could reasonably get as far as the real quadratic factors that way in their head; after that it might be less easy to remember in the head as you multiplied that out. Slightly useful but not to worry either way, not make any of it it a must or a test.

13. Nov 6, 2015

### Ray Vickson

Remember: $(x-a)(x-b) = x^2 -(a+b) x + ab$, so coefficient of x is minus the sum of the roots and the constant is the product of the roots. So, if you combine complex-conjugate pairs, you get $(x-1-i)(x-1+i) = x^2 -2x + (1+i)(1-i) = x^2 - 2x + 2$ and $(x-1+2i)(x-1-2i) = x^2 -2x + (1+4) = x^2 + 2x + 5$. You could get that far in your head, but expanding the product of these two quadratics in your head is a bit challenging. (However, in your head you could evaluate and write down the coefficients one-by-one if you really wanted to.)

14. Nov 9, 2015

### CrazyNinja

Uhh guys..? Can't we just use the theory of equations? Isn't the sum of all the roots -a, products taken two at a time b and products taken three at a time c... followed by products taken four at a time giving -d?

15. Nov 10, 2015

### epenguin

Yes you can do that. Better!