MATH529 L18 Functions of complex variables

Complex algebra

Cartesian  and polar forms

(Subscript[z, 1])=(Subscript[x, 1])+I (Subscript[y, 1]); (Subscript[z, 2])=(Subscript[x, 2])+I (Subscript[y, 2]);
ComplexExpand[{(Subscript[z, 1])+(Subscript[z, 2]),(Subscript[z, 1]) (Subscript[z, 2])}]

(Subscript[z, 1])=(Subscript[r, 1]) Exp[I (Subscript[θ, 1])]; (Subscript[z, 2])=(Subscript[r, 2]) Exp[I (Subscript[θ, 2])];
ComplexExpand[{(Subscript[z, 1])+(Subscript[z, 2]),(Subscript[z, 1]) (Subscript[z, 2])}]

Simplify[{(Subscript[z, 1])+(Subscript[z, 2]),(Subscript[z, 1]) (Subscript[z, 2])}]

Roots

z=r (E^(I θ));
Assuming[{n∈Integers,n>1},(z^(1/n))]

RootEq = (w^n)==z

w[n_,k_,r_,θ_]=(r^(1/n))(Cos[((θ+2k π)/n)]+I Sin[((θ+2k π)/n)])

ListPlot[{Re[#],Im[#]}& /@ Table[w[6,k,1,0],{k,0,5}],AspectRatio->1,Frame->True,GridLines->Automatic,PlotMarkers->{Automatic,Medium},PlotStyle->Red]

Complex functions

Visual representations

Real functions

f[x_]=(x^2); Plot[f[x],{x,0,2},GridLines->Automatic]

f[x_]=Exp[x]; Plot[Exp[x],{x,-2,2},GridLines->Automatic]

Complex functions through mappings

ConformalMap[w_,x1_,x2_,y1_,y2_,dx_,dy_,fW_,fH_]:=Module[{xidplts,yidplts,yimplts,ximplts,W,H},
W=fW(x2-x1); H=fH(y2-y1);
xidplts= Show[Table[ParametricPlot[{x,y},{y,y1,y2},PlotStyle->{Red,Thin},Axes->True,PlotRange->{{x1-W,x2+W},{y1-H,y2+H}}],{x,x1,x2,dx}]];
yidplts= Show[Table[ParametricPlot[{x,y},{x,x1,x2},PlotStyle->{Blue,Thin},Axes->True,PlotRange->{{x1-W,x2+W},{y1-H,y2+H}}],{y,y1,y2,dy}]];
ximplts= Show[Table[ParametricPlot[{Re[w[x+I y]],Im[w[x+I y]]},{y,y1,y2},PlotStyle->Red,Axes->True,PlotRange->{{x1-W,x2+W},{y1-H,y2+H}}],{x,x1,x2,dx}]];
yimplts= Show[Table[ParametricPlot[{Re[w[x+I y]],Im[w[x+I y]]},{x,x1,x2},PlotStyle->Blue,Axes->True,PlotRange->{{x1-W,x2+W},{y1-H,y2+H}}],{y,y1,y2,dy}]];
Show[{xidplts,yidplts,ximplts,yimplts}]
]

w(z)=(z^2),z=x + i y
w(x,y)= u(x,y)+ i v(x,y) = (x^2)-(y^2)+2i x y
u(x,y)=(x^2)-(y^2),v(x,y)=2 x y
z= r (e^(i θ)); w=ρ (e^(i ϕ))=(z^2)=(r^2) (e^(2 i θ))

w2[z_]=(z^2);
ConformalMap[w2,-1,1,-1,1,.2,.2,2,2]

w(z)=(z^4)-3z,z=x + i y
w(x,y)= u(x,y)+ i v(x,y) = -3 x+(x^4)-6 (x^2) (y^2)+(y^4)+i(-3 y+4 (x^3) y-4 x (y^3))
u(x,y)=-3 x+(x^4)-6 (x^2) (y^2)+(y^4),v(x,y)=-3 y+4 (x^3) y-4 x (y^3)
z= r (e^(i θ)); w=ρ (e^(i ϕ))=(r^4) (e^(4 i θ))-3 r (e^(i θ))

w4[z_]=(z^4)-3z;
ComplexExpand[w4[x+I y]]

ConformalMap[w4,-1,1,-1,1,.2,.2]

w4[1+I]

ConformalMap[w4,0,1,0,1,.2,.2]

ConformalMap[w4,-1,0,0,1,.2,.2]

ConformalMap[w4,-1,0,-1,0,.2,.2]

ConformalMap[w4,0,1,-1,0,.2,.2]

w(z)=(((z^3)-2)/((z^3)+2)),z=x + i y
w(x,y)= u(x,y)+ i v(x,y)

wr[z_]=(((z^3)-2)/((z^3)+2));
ComplexExpand[wr[x+I y]]

ConformalMap[wr,-1,1,-1,1,.2,.2,1,1]

w(z)=(e^z),z=x + i y
w(x,y)= u(x,y)+ i v(x,y) = (e^x)(cos y+i sin y)
u(x,y)=(e^x) cos y,v(x,y)=(e^x) sin y

wexp[z_]=Exp[z];
ConformalMap[wexp,-1,1,-1,1,.2,.2,2,2]

Complex functions through flows

flow[f_,ll_,ur_]:=VectorPlot[{Re[f[x+I y]],Im[f[x+I y]]},{x,ll[[1]],ur[[1]]},{y,ll[[2]],ur[[2]]},Frame->True,FrameLabel->{"Re[z]","Im[z]"},GridLines->Automatic,PlotLabel->"Flow of complex function " <> ToString[f],PlotLegends->Automatic];
flowVS[f_,ll_,ur_]:=VectorPlot[{Re[f[x+I y]],Im[f[x+I y]]},{x,ll[[1]],ur[[1]]},{y,ll[[2]],ur[[2]]},Frame->True,FrameLabel->{"Re[z]","Im[z]"},GridLines->Automatic,PlotLabel->"Flow of complex function " <> ToString[f],PlotLegends->Automatic,VectorScaling->Automatic];

flow[Exp,{-1,-4π},{1,4π}]

flowVS[Exp,{-1,-4π},{1,4π}]

flow[Log,{-1,-4π},{1,4π}]

flow[Sin,{-2π,-2π},{2π,2π}]

flow[Sinh,{-2π,-2π},{2π,2π}]

Streamline representation

ParametricPlot[{{(E^t),(E^(-t))},{2(E^t),3(E^(-t))}},{t,0,2},PlotRange->All]

ParametricPlot[Flatten[
Table[{(E^t) x0,(E^(-t)) y0},{x0,-4,4},{y0,-4,4}],1],{t,0,2},PlotRange->{{-5,5},{-5,5}}]