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
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));
1.2
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);
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));
1.4
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);
1.5 Example
Take the complex logarithm
>
test||r:=(x,y)->log(x+I*y);
which looks in the complex fashion
>
test||c:=unapply(R2C(test||r,z),z);testc(z);
Taking the last function we rederive the starting point in the complex expanded version
>
C2R(test||c,x,y);
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.
where we define
. 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:
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
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;
We transform to the complex form
>
Test||c:=r2c(Test||r,x,y,z);
and find for the Wirtinger derivatives
>
w1diff(Test||c,z);
>
w2diff(Test||c,z);
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));
>
r2c(%,x,y,z);
The Wirtinger derivative with respect to
>
1/2*(diff(Test||r,x)+I*diff(Test||r,y));
>
r2c(%,x,y,z);
2.3.2
Another instructive example using functions
>
TEst||c:=unapply(2*log(sqrt(z*conjugate(z))),z);
>
w1diff(TEst||c(z),z);
>
w2diff(TEst||c(z),z);
The same in the real representation
>
TEst||r:=unapply(C2R(TEst||c,x,y),x,y);
The definition for
w1diff
using the
<D>
operator
>
1/2*(D[1](TEst||r)(x,y)-I*D[2](TEst||r)(x,y));
>
r2c(%,x,y,z);
>
simplify(%);
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);
is surely analytic.We transform and find as expected
>
g:=r2c(f,x,y,z);
>
w1diff(g,z);
>
w2diff(g,z);
2.3.4
The norm of a complex value
z
is given by
abs(z)
which is equivalent to
, so that the
conjugate
of
z
is "hidden". As expected the Wirtinger derivatives give an erratic result.
>
w1diff(abs(z),z);
>
w2diff(abs(z),z);
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);
>
expand(%);simplify(%);
>
w1diff(abs||c,z);
>
expand(%);simplify(%);
>
w2diff(abs||c,z);
>
expand(%);simplify(%);
The same applied to
conjugate(z^2)
in one step
>
r2c(c2r(conjugate(z^2),z,x,y),x,y,z);
>
simplify(%);
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;
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)));
and the direction of the ellipse is
>
direction:=(expr,z)->argument(mu(expr,z))/2-Pi/2;
whereas the complex function
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);
The equation
is called the
Beltrami equation
. Functions with
for all
z
are analytic or conformal. Functions for which the relation
holds are called
k-quasi conformal
(qc) if
for all
z
and share many properties of conformal functions. Obviously the Jacobian of qc-mappings cannot vanish (up to points for which
).
3.3 An Example
As example we look at the mapping (describing a black hole gravitational lens)
>
w:=z->z-1/conjugate(z);
we find for the Jacobian
>
J:=jacob(w(z),z);
and for the critical curve
which is the equation for the unit circle. We find for
>
m:=mu(w(z),z);
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
and
). 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);
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]);
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
>