# How can I generate a polynomial? [closed]

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.

## closed as off-topic by corey979, ubpdqn, MarcoB, m_goldberg, FeyreDec 6 '16 at 9:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – corey979, ubpdqn, MarcoB, m_goldberg, Feyre
If this question can be reworded to fit the rules in the help center, please edit the question.

• There's no such thing as i. For an imaginary unit, type I - capitalization matters. Use also Chop. – corey979 Dec 6 '16 at 0:51
• You need to use a capital I to represent the complex part of your z1 and z2. This will help. – user6014 Dec 6 '16 at 0:52
• @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. – corey979 Dec 6 '16 at 0:53
• Ah, I was sloppy with it. Thanks for clarifying. – user6014 Dec 6 '16 at 0:55

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.