0
$\begingroup$

Suppose, z1 = 0.1 + 0.5i and z2 = 0.1 - 0.5i are from in a unit circle.

How can I find a polynomial of the form $z^2 - az -b$ from (z - z1)*(z - z2)

I tried,

z1 = 0.1 + 0.5i;
z2 = 0.1 - 0.5i ;

Expand[(z-z1)(z-z2)]

It gave the folowing output in Mathematica7

$0.01+0. i-0.25 i^2-0.2 z+0. i z+z^2$

And,

$-0.25 i^2+z^2-0.2 z+0.01$

in Mathematica-11.

$\endgroup$
  • 2
    $\begingroup$ There's no such thing as i. For an imaginary unit, type I - capitalization matters. Use also Chop. $\endgroup$ – corey979 Dec 6 '16 at 0:51
  • $\begingroup$ You need to use a capital I to represent the complex part of your z1 and z2. This will help. $\endgroup$ – user6014 Dec 6 '16 at 0:52
  • $\begingroup$ @user6014 Imaginary part; the whole number is complex. In fact, a real number is also complex - it just has its imaginary part equal to zero. $\endgroup$ – corey979 Dec 6 '16 at 0:53
  • $\begingroup$ Ah, I was sloppy with it. Thanks for clarifying. $\endgroup$ – user6014 Dec 6 '16 at 0:55
3
$\begingroup$

Consider (with the capital I's):

z1 = 0.1 + 0.5 I;
z2 = 0.1 - 0.5 I;
Chop@Expand[(z - z1) (z - z2)]

which will give you

0.26 - 0.2 z + z^2

where your $a =$ -0.2 and $b =$ 0.26.

$\endgroup$