Application Center - Maplesoft

App Preview:

Wirtinger derivatives, Beltrami equation & ellipse fields

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

beltrami[1].mws

WIRTINGER DERIVATIVES, BELTRAMI EQUATION & ELLIPSE FIELDS

by Thomas Schramm,

Hamburg, June 10, 1997

Technische Universitt Hamburg-Harburg
Rechenzentrum
schramm@tu-harburg.de

http://www.tu-harburg.de/rzt/rzt/

Keywords: calculus, nonanalytical complex functions, Wirtinger calculus, Beltrami equations, quasiconformal mappings, ellipse fields

This worksheet contains a set of routines to transform complex expressions depending on two real variables e.g. x,y into equivalent expressions containing the complex variable e.g. z and conjugate(z) , respectively. This representation is used to invoke Wirtinger derivatives which are used to describe complex expressions locally. A visualisation of this local behaviour is given by the ellipse fields of the mappings defined by the Beltrami equation .

> restart:

1 REAL AND COMPLEX REPRESENTATIONS OF NON ANALYTICAL COMPLEX VALUED FUNCTIONS

1.1 From real to complex variables.

The function r2c(expr,x,y,z) converts a complex valued expression depending on the real variables x,y into an equivalent expression depending only on the complex variable z . Note that applying <simplify> to the resulting expressions could lead to expressions like abs(z) which could not be handled by the derivatives defined in section 2. (See example 2.3.4).

> r2c:=(expr,x,y,z)->(subs(x=(z+conjugate(z))/2,y=(z-conjugate(z))/(2*I),expr));

r2c := proc (expr, x, y, z) options operator, arrow...

1.2 proc (f(x,y)) options operator, arrow; f(z) end pro...

The function R2C(f,z) transforms a complex valued function depending on two real variables to an expression depending on the complex variable z . This expression can be converted to a function using the <unapply> command.

> R2C:=(f,z)->r2c(f(x,y),x,y,z);unapply(R2C(g,l),l);

R2C := proc (f, z) options operator, arrow; r2c(f(x...

proc (l) options operator, arrow; g(1/2*l+1/2*conju...

1.3 From complex to real variables.

The function c2r(expr,z,x,y) converts a complex valued expression depending on the complex variable z into an equivalent expression depending only on the real variables x,y .

> c2r:=(expr,z,x,y)->evalc(subs(conjugate(z)=x-I*y,z=x+I*y,expr));

c2r := proc (expr, z, x, y) options operator, arrow...

1.4 proc (f(z)) options operator, arrow; f(x,y) end pro...

The function C2R(g,x,y) transforms a complex valued function g depending on one complex variable to an expression depending on two real variables x,y . This expression can be converted to a function using the <unapply> command.

> C2R:=(g,x,y)->c2r(g(z),z,x,y);unapply(C2R(f,u,v),u,v);

C2R := proc (g, x, y) options operator, arrow; c2r(...

proc (u, v) options operator, arrow; f(u+I*v) end p...

1.5 Example

Take the complex logarithm

> test||r:=(x,y)->log(x+I*y);

testr := proc (x, y) options operator, arrow; log(x...

which looks in the complex fashion

> test||c:=unapply(R2C(test||r,z),z);testc(z);

testc := ln

ln(z)

Taking the last function we rederive the starting point in the complex expanded version

> C2R(test||c,x,y);

1/2*ln(x^2+y^2)+I*arctan(y,x)

2 WIRTINGER DERIVATIVES

Nonanalytical complex functions can be understood as functions depending on the complex argument and its complex conjugate, respectively. Thus, for some purposes, arbitrary complex valued functions can be treated as depending on two independent complex variables. E.g. f(x,y) = f(z,conjugate(z)) where we define f(z,conjugate(z)) = f(z) . Following this idea, the derivatives with respect to the complex argument z and conjugate(z) can be built. These so called Wirtinger derivatives are defined as follows:
diff(f,z) = 1/2*(diff(f,x)-I*diff(f,y))

diff(f,conjugate(z)) = 1/2*(diff(f,x)+I*diff(f,y))

Unfortunately MAPLE can not handle this directly. So we define the Wirtinger derivatives with respect to the complex and the conjugated argument as w1diff(f,z) and w2diff(f,z) , respectively. NOTE that these derivatives do not recognize combined expressions as conjugate(z^2) or abs(z) etc. Look at example 2.3.4 to see how to overcome this problem. Compare the note in section 1.1. Appropriate simplification or expansion should be done after the application of the derivatives.

2.1 Wirtinger derivative with respect to z

The function w1diff(expr,z) builds the derivative of an expression containing a complex variable z and its conjugate, with respect to z .

> w1diff:=(expr,z)->subs(dummy=conjugate(z),diff(subs(conjugate(z)=dummy,expr),z)):

2.2 Wirtinger derivative with respect to conjugate(z)

The function w2diff(expr,z) builts the derivative of an expression containing a complex variable z and its conjugate with respect to conjugate(z) .

> w2diff:=(expr,z)->subs(dummy=conjugate(z),diff(subs(conjugate(z)=dummy,expr),dummy)):

2.3 EXAMPLES

2.3.1

The following example shows how this works:

> Test||r:=x^2+I*y^3;

Testr := x^2+I*y^3

We transform to the complex form

> Test||c:=r2c(Test||r,x,y,z);

Testc := (1/2*z+1/2*conjugate(z))^2-1/8*(z-conjugat...

and find for the Wirtinger derivatives

> w1diff(Test||c,z);

1/2*z+1/2*conjugate(z)-3/8*(z-conjugate(z))^2

> w2diff(Test||c,z);

1/2*z+1/2*conjugate(z)+3/8*(z-conjugate(z))^2

The same results can be found using the definition given above:

The Wirtinger derivative with respect to z :

> 1/2*(diff(Test||r,x)-I*diff(Test||r,y));

x+3/2*y^2

> r2c(%,x,y,z);

1/2*z+1/2*conjugate(z)-3/8*(z-conjugate(z))^2

The Wirtinger derivative with respect to conjugate(z)

> 1/2*(diff(Test||r,x)+I*diff(Test||r,y));

x-3/2*y^2

> r2c(%,x,y,z);

1/2*z+1/2*conjugate(z)+3/8*(z-conjugate(z))^2

2.3.2

Another instructive example using functions

> TEst||c:=unapply(2*log(sqrt(z*conjugate(z))),z);

TEstc := proc (z) options operator, arrow; 2*ln(sqr...

> w1diff(TEst||c(z),z);

1/z

> w2diff(TEst||c(z),z);

1/conjugate(z)

The same in the real representation

> TEst||r:=unapply(C2R(TEst||c,x,y),x,y);

TEstr := proc (x, y) options operator, arrow; 2*ln(...

The definition for w1diff using the <D> operator

> 1/2*(D[1](TEst||r)(x,y)-I*D[2](TEst||r)(x,y));

x/(x^2+y^2)-I*y/(x^2+y^2)

> r2c(%,x,y,z);

(1/2*z+1/2*conjugate(z))/((1/2*z+1/2*conjugate(z))^...

> simplify(%);

1/z

A similar result can be found for w2diff .

2.3.3

Wirtinger derivatives show very easily whether a function is analytic or not. For every analytic function w2diff must vanish. For example:

> f:=sin(x+I*y);

f := sin(x+I*y)

is surely analytic.We transform and find as expected

> g:=r2c(f,x,y,z);

g := sin(z)

> w1diff(g,z);

cos(z)

> w2diff(g,z);

0

2.3.4

The norm of a complex value z is given by abs(z) which is equivalent to sqrt(z*conjugate(z)) , so that the conjugate of z is "hidden". As expected the Wirtinger derivatives give an erratic result.

> w1diff(abs(z),z);

abs(1,z)

> w2diff(abs(z),z);

0

But if we transform abs(z) to the real representation and back, the result is more convenient

> abs||r:=c2r(abs(z),z,x,y);abs||c:=r2c(abs||r,x,y,z);

absr := sqrt(x^2+y^2)

absc := sqrt((1/2*z+1/2*conjugate(z))^2-1/4*(z-conj...

> expand(%);simplify(%);

sqrt(z*conjugate(z))

abs(z)

> w1diff(abs||c,z);

1/2*conjugate(z)/(sqrt((1/2*z+1/2*conjugate(z))^2-1...

> expand(%);simplify(%);

1/2*conjugate(z)/(sqrt(z*conjugate(z)))

1/2*conjugate(z)/abs(z)

> w2diff(abs||c,z);

1/2*z/(sqrt((1/2*z+1/2*conjugate(z))^2-1/4*(z-conju...

> expand(%);simplify(%);

1/2*z/(sqrt(z*conjugate(z)))

1/2*z/abs(z)

The same applied to conjugate(z^2) in one step

> r2c(c2r(conjugate(z^2),z,x,y),x,y,z);

(1/2*z+1/2*conjugate(z))^2-(1/2*z+1/2*conjugate(z))...

> simplify(%);

conjugate(z)^2

will give the correct result.

3 QUASICONFORMAL MAPPINGS AND THE BELTRAMI EQUATION

The local structure of a complex function can be measured in terms of Wirtinger derivatives. Locally a plane-to-plane mapping is determined by its Jacobian which measures the transformation of surface elements and the Beltrami parameter which measures the local stretching of these elements. Using the real representations of mappings the results are rather unhandy. Wirtinger derivatives make life easy.

3.1 The Jacobian of a complex mapping

> jacob:=(expr,z)->abs(w1diff(expr,z))^2-abs(w2diff(expr,z))^2;

jacob := proc (expr, z) options operator, arrow; ab...

This means that locally a mapping w=w(z) maps an infinitesimal surface element dA to dB . The ratio dB/dA is then given by the Jacobian J of the mapping. It is therefore a measure for the local "magnification"-property of the mapping. The curve J=0 is called " critical curve " of the mapping and is of particular importance. The image of J=0 (symbolically written as w(J=0) ) is called " bifurcation-curve " (or caustic , in certain applications). The inverse mapping z(w) is often multivalued. The importance of the bifurcation curve comes from the fact that it encloses areas of constant numbers of solutions z(w) . Normally the number of solutions changes by two when crossing the bifurcation curve.

3.2 Beltrami Parameter and Ellipses

Analytic or conformal mappings map small circles onto circles. Arbitrary mappings map small circles onto ellipses. The axial ratio of these ellipses and the direction of the main axis is a measure for the amount and direction of the stretching, which is therefore a measure of the "non analyticity". Since locally the mapping is one-to-one, the same information could be expressed by the ellipse mapped onto a circle by the mapping. The axial ratio of a local small ellipse at z mapped to a circle by a map (expr) is:

> axialratio:=(expr,z)->(1-abs(mu(expr,z)))/(1+abs(mu(expr,z)));

axialratio := proc (expr, z) options operator, arro...

and the direction of the ellipse is

> direction:=(expr,z)->argument(mu(expr,z))/2-Pi/2;

direction := proc (expr, z) options operator, arrow...


whereas the complex function
mu is called the Beltrami parameter of the mapping (expr) at z . It is simply defined in terms of Wirtinger derivatives:

> mu:=(expr,z)->w2diff(expr,z)/w1diff(expr,z);

mu := proc (expr, z) options operator, arrow; w2dif...

The equation w2diff(f,z) = mu*w1diff(f,z) is called the Beltrami equation . Functions with mu = 0 for all z are analytic or conformal. Functions for which the relation abs(mu) <= k holds are called k-quasi conformal (qc) if k < 1 for all z and share many properties of conformal functions. Obviously the Jacobian of qc-mappings cannot vanish (up to points for which diff(f,z) = 0 ).

3.3 An Example

As example we look at the mapping (describing a black hole gravitational lens)

> w:=z->z-1/conjugate(z);

w := proc (z) options operator, arrow; z-1/conjugat...

we find for the Jacobian

> J:=jacob(w(z),z);

J := 1-1/(abs(z)^4)

and for the critical curve z*conjugate(z) = 1 which is the equation for the unit circle. We find for mu

> m:=mu(w(z),z);

m := 1/(conjugate(z)^2)

4 PLOTTING ELLIPSE FIELDS

> with(plots):

4.1 Single Ellipses

plotellipse(a,b,phi,x0,y0) plots an ellipse with major half axis a , minor half axis b , an angle of phi between the major half axis and the positive real-axis and with origin at (x0, y0) .

> plotellipse:=(a,b,phi,x0,y0)->plot([a*cos(t)*cos(phi)-b*sin(t)*sin(phi)+x0,
a*cos(t)*sin(phi)+b*sin(t)*cos(phi)+y0, t=0..2*Pi],
axes=boxed,scaling=constrained):

4.2 Local Ellipses

localellipse(expr,z,z0,r) plots the local ellipse of the complex expression expr with variable z at the complex location z0 which is mapped by expr onto a circle of radius r . The axial ratio and direction of the ellipse is given by the Beltrami equation, the actual size is given by the Jacobian (since r^2/(a*b) = J and b/a = a*r ). In the case of J=0 the major axis is set to one.

> localellipse:=proc(expr,z::name,z0::complex,r::numeric)
local ar,phi,J,a,b;
ar:=unapply(axialratio(expr,z),z)(z0);
phi:=unapply(direction(expr,z),z)(z0);
J:=unapply(jacob(expr,z),z)(z0);
if J<>0 then a:=r/sqrt(abs(ar*J)) else a:=1 fi;
b:=a*ar;
plotellipse(a,b,phi,Re(z0),Im(z0));
end:

4.2.1 Example

> localellipse(z+1/conjugate(z),z,1+I,0.5);

[Maple Plot]

4.3 Ellipse Fields

ellipsefield(expr,z,a,range) plots a field of ellipses with major half axis a due to the local structure of the mapping expr depending on the complex variable z . The range should be given in complex constants e.g. as: -2-2*I..2+2*I and optionally a vector of the form [m,n] defining the number of ellipses in the real and imaginary direction, respectively. Note that there is no check for singular values but appropriate choosing of range helps mostly (see Example).

> ellipsefield:=proc(expr,z::name,a::numeric,range::range)
local ar,phi,m,n,g,x1,x2,y1,y2,nl,ml,i,grid;
x1:=Re(lhs(range));x2:=Re(rhs(range));
y1:=Im(lhs(range));y2:=Im(rhs(range));
if nargs>4 then
grid:=args[5];
ml:={seq(x1+i*(x2-x1)/(grid[1]-1),i=0..(grid[1]-1))};
nl:={seq(y1+i*(y2-y1)/(grid[2]-1),i=0..(grid[2])-1)};
else
ml:=x1..x2;
nl:=y1..y2;
fi;

phi := unapply(evalf(direction(expr,z)),z);
ar:=unapply(evalf(axialratio(expr,z)),z);

g:= seq(seq(plotellipse(a,a*ar(m+I*n),phi(m+I*n),m,n),m=ml),n=nl):
display([g]);
end:

4.3.1 Example

> ellipsefield(z-0.5*conjugate(z)-1/conjugate(z),z,.3,-2.0001-2*I..2+2*I,[6,7]);

[Maple Plot]

Comment

These routines have been derived to describe elements of gravitational lensing. In the theory of gravitational lensing we use complex mappings to map points from the lens-plane to the source-plane. The last ellipse field is of particular interest. It shows how a field of lensed round sources (e.g. Quasars or Galaxies) would look like if seen through a lens (e.g. Galaxies). The application is that we really observe very faint elongated images/beltrami (arclets) of far away background sources in clusters of galaxies. We hope to reconstruct the properties of the lens (mass distribution) from these arclet fields. The mathematical framework is then given by the Beltrami Equation. For an introduction of the application of the Beltrami formalism to gravitational lensing see: Astronomy & Astrophysics 1995 Vol. 299, July (I), T. Schramm & R. Kayser: The complex theory of gravitational lensing, Beltrami equation and cluster lensing.

Thanks to Mike Monagan for some improvements of the code

>