--------------- # Aufgabe 3 # --------------- # 3a) t = seq(from=0,to=1,length=1000) phi = seq(from=pi/4,to=3*pi/4,length=1000) z = 1-2*t+1i z2 = sqrt(2)*exp(1i*phi) plot(z,typ="l",col="red",xlim=c(-1.5,1.5),ylim=c(-1.5,1.5)) lines(z2,col="green") points(1+1i,cex=1) points(-1+1i,cex=1) points(0+0*1i) # Bemerkung: der Buchstabe t wird in R schon benutzt, # ist eigentlich schon verbraucht, der obige code # funktioniert trotzdem. # 3b) n = 10000 t = seq( from=0, to=1, length=n ) z = 1-2*t+1i dz = diff(z) z = z[-1] sum( z * dz ) # -2i bis auf discretization-error O(1/n) # Jetzt die Wegintegrale: # int_{gamma_red} bar(z) dz : n = 10000 t = seq( from=0, to=1, length=n ) z = 1-2*t+1i dz = diff(z) z = z[-1] sum( Conj(z) * dz ) # +2i # int_{gamma_red} 1/z dz : n = 10000 t = seq( from=0, to=1, length=n ) z = 1-2*t+1i dz = diff(z) z = z[-1] sum( 1/z * dz ) # pi/2 *i # int_{gamma_green} bar(z) dz : n = 10000 phi = seq(from=pi/4,to=3*pi/4,length=n) z = sqrt(2)*exp(1i*phi) dz = diff(z) z = z[-1] sum( Conj(z) * dz ) # pi*i # int_{gamma_green} 1/z dz : n = 10000 phi = seq(from=pi/4,to=3*pi/4,length=n) z = sqrt(2)*exp(1i*phi) dz = diff(z) z = z[-1] sum( 1/z * dz ) # pi/2 *i