# Everywhere Orthogonal

Just a quick bit of pure maths today.

Consider the function

$F(z)=\cos z$

where $z$ is a complex variable. We know how this function behaves for real $z$, but what if we were to step off the real axis and onto the complex plane? Suppose we know $z$ in Cartesian form, that is to say, as the sum of a real and imaginary part:

$z = x+iy$

How do we express $F(z)$ in similar terms? The cosine function may be expressed in exponential form:

$\cos z =\frac{1}{2}(e^{iz}+e^{-iz})$

This makes manipulation far easier. Substituting in for $z$:

$\cos z = \frac{1}{2}(e^{i(x+iy)}+e^{-i(x+iy)})$

$\cos z = \frac{1}{2}(e^{ix-y}+e^{-ix+y})$

$\cos z = \frac{1}{2}(e^{ix}e^{-y}+e^{-ix}e^{y})$

$\cos z = \frac{1}{2}((\cos x+i \sin x)e^{-y}+(\cos x-i\sin x)e^{y})$

$\cos z = \frac{1}{2}((e^{-y}+e^{y})\cos x+i(e^{-y}-e^{y})\sin x)$

$\cos z = \cosh y \cos x - i \sinh y \sin x$

Hence we have found $F(z)$ in Cartesian form. We can also arrive at this result without needing to use exponential notation by using compound angle formulae.

It so happens that $F(z)$ is an analytic function. It has an interesting property which we will now explore.

We have $F(z)$ in the form

$F(z)=u(x,y)+iv(x,y)$

There exist families of loci in the complex plane for which either $u(x,y)$ or $v(x,y)$ is constant. Take the real part of $F(z)$ for instance. We will find the Cartesian equation for the loci which satisfies the equation

$\cosh y \cos x=C_1$

$\displaystyle y=\text{arcosh}\Big(\frac{C_1}{\cos x}\Big)$

which, in more informative terms, can be rewritten as

$y=\displaystyle \ln\bigg({\frac{\sqrt{C_1^2-\cos^2 x}+C_1}{\cos x}}\bigg)$

A similar expression is found for $v(x,y)=C_2$:

$y=\displaystyle \ln\bigg({\frac{\sqrt{C_2^2+\sin^2 x}-C_2}{\sin x}}\bigg)$

Let’s plot the two families of curves on the same graph. The blue curves show the real part of $F(z)$, the orange curves show the imaginary part.

The two contour plots are everywhere orthogonal.

What is even more remarkable is that there is nothing special about the cosine function in this respect. Any analytic function yields a similar result. We can tell whether a function is analytic by testing for whether it satisfies the Cauchy-Riemann conditions. These are that if, as above, we have a function in the form

$F(z)=u(x,y)+iv(x,y)$

then

$\displaystyle \frac{\partial u}{\partial x}=\frac{\partial v}{\partial y}$

$\displaystyle \frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x}$

In fact, an even more simple definition which is equally valid is that $F$ is a function of $x+iy$ only. Hence any polynomial in $z$ is an analytic function, for example

$F(z) = z^3-z+1$

Exponents are also analytic:

$F(z)=e^z$

and so too are trigonometric functions.

One of the motivations for studying these kinds of functions is that they can provide solutions to electrostatic problems. The electric field and the equipotentials associated with them are always at right angles to one another. Analytic functions allow these fields and contours to be found with relative ease.