(*  C3 - 
        I  Mikronyymus 1  Syksy 2007,  
      Kari Eloranta  *) 

 (* Kayta Mathematica versiota 5.2! Kaynnistyy komennolla mathematica52   *) 


 (* 1.  *)

Plot[(E^x), {x, -2, 2}]

Plot3D[
      Abs[(E^(x + I y))], {x, -2, 
        2}, {y, -π, π}]

Plot3D[
      Arg[(E^(x + I y))], {x, -2, 
        2}, {y, -π, π}]

Plot3D[
      Re[(E^(x + I y))], {x, -2, 
        2}, {y, -π, π}, PlotRange -> {-8, 8}]

Plot3D[
      Im[(E^(x + I y))], {x, -2, 
        2}, {y, -π, π}, PlotRange -> {-8, 8}]

ComplexExpand[ Sin[x  +  I y]]

ComplexExpand[ Cos[x  +  I y]]

ComplexExpand[ Sinh[x  +  I y]]

ComplexExpand[ Cosh[x  +  I y]]

ComplexExpand[ Tan[x  +  I y]]

Sinh[ I (x  +  I y)]

k  =  8;
Apart[ 1/(1  -  z^k)]

Together[%]

Log[I]

Log[-1  +  0.00001 I]

Log[-1  -  0.00001 I]

Plot3D[Abs[Log[x + I y]], {x, -1, 1}, {y, -1, 1}, 
      PlotRange -> Automatic]

ContourPlot[
      Abs[Log[x + I y]], {x, -1, 1}, {y, -1, 
        1}]

DensityPlot[
      Re[Log[x + I y]], {x, -1, 1}, {y, -1, 
        1}]

I^I

Exp[I Log[I]]

N[%]

(*  4.  *)

(*	Kuvaus yksikkokiekossa: valitse jatkossa z0 sen sisalta	*)

M0[z_,z0_] := (z - z0)/(Conjugate[z0] z - 1);

?M0

r = (1/2); 
ParametricPlot[{Re[r (E^(I theta))], 
        Im[r (E^(I theta))]}, {theta, 0, 
        2 π}]

SetOptions[ParametricPlot, AspectRatio -> 1]

z0 = 0.5` I;  r = (1/2); 
ParametricPlot[{Re[
          M0[r (E^(I theta)), z0]], 
        Im[M0[r (E^(I theta)), z0]]}, {theta, 0, 
        2 π}]

(*	Plotteja Mma:n koodipaketilla	*)

<<Graphics`ComplexMap`

CartesianMap[ Identity, {-5,5},{-5,5}]

PolarMap[ Identity, {0,1},{0,2 Pi}]

CartesianMap[Sqrt, {-5, 5}, {-5, 5}]

PolarMap[Sqrt, {0, 2}, {-Pi, Pi}];

M[z_] := M0[z,-I/2];
CartesianMap[ M, {-1,1},{-1,1}];

M[z_] := M0[z, .5 I];
PolarMap[ M, {0,1},{0,2 Pi}];

SetOptions[Graphics, AspectRatio -> 1, PlotRange -> {-1,1}]

M[z_] := M0[z, 1/2 + I/2];
PolarMap[ M, {0,1},{0,2 Pi}];

Options[PolarMap]

Inv[z_] := 1/z;
PolarMap[ Inv, {0.1,10},{0,2 Pi}];

Inv[z_] := 1/z;
CartesianMap[ Inv, {-2,2},{-2,2}];

Options[CartesianMap]