GraphingComplexPolynomials.mw

 

Graphing Complex Polynomials 

> P1 := z -> z^2 +2*I*z + 1;
 

proc (z) options operator, arrow; `+`(`*`(`^`(z, 2)), `*`(`*`(2, `*`(I)), `*`(z)), 1) end proc (1)
 

Image of unit circle. 

> plot([Re(P1(cos(t)+I*sin(t))),Im(P1(cos(t)+I*sin(t))),t=0..2*Pi],x=-5..5,y=-5..5);
 

Plot_2d
 

Question: Is this a true cardioid? I do not think so.  

Animation of circles of varying radii. 

> animate(plot, [[Re(P1(a*cos(t)+a*I*sin(t))),Im(P1(a*cos(t)+a*I*sin(t))),t=0..2*Pi]], a=0..3);
 

Plot_2d
 

> P2:= z -> z^3 + (1+I)*z^2- z +2;
 

proc (z) options operator, arrow; `+`(`*`(`^`(z, 3)), `*`(`+`(1, I), `*`(`^`(z, 2))), `-`(z), 2) end proc (2)
 

> animate(plot, [[Re(P2(a*cos(t)+a*I*sin(t))),Im(P2(a*cos(t)+a*I*sin(t))),t=0..2*Pi]], a=0..3);
 

Plot_2d
 

> P3:= z-> z^4 +3*z^3 -2*I*z;
 

proc (z) options operator, arrow; `+`(`*`(`^`(z, 4)), `*`(3, `*`(`^`(z, 3))), `-`(`*`(`+`(`*`(2, `*`(I))), `*`(z)))) end proc (3)
 

> animate(plot, [[Re(P3(a*cos(t)+a*I*sin(t))),Im(P3(a*cos(t)+a*I*sin(t))),t=0..2*Pi]], a=0..3);
 

Plot_2d
 

>