## Domain coloring for visualizing complex functions

The above figure shows a domain color plot for the function ${z\mapsto {1/(1 - i z )} -(1 + i z)}$ .

I have been relearning complex analysis and decided to have some fun plotting complex functions. It is easy to visualize graphically a real function ${f:\Bbb R\rightarrow \Bbb R}$ of a real variable. To visualize ${f(x)}$, we can plot ${x}$ on the horizontal axis and ${y=f(x)}$ on the vertical axis, as we learn in high school mathematics. It is more difficult, however, to visualize the function ${g:\Bbb C\rightarrow \Bbb C}$, because ${g}$  is a  complex function of a complex variable. A complex number ${z}$ can be expressed in terms of real numbers $x, ~y$ as ${z=x+ i y}$. To visualize the complex domain of a function, one thus requires 2 real dimensions. The complex function ${g(z)}$ must then be plotted on the remaining dimensions. If we lived in 4 dimensional space, it would be easy to plot a complex function of a complex variable. The problem is that we live in three dimensions, not four. Domain coloring is a method to overcome this limitation. The basic idea is to use colors and shades etc. as extra dimensions for visualizing functions.

I first heard about domain coloring when I came across Hans Lundmark’s complex analysis pages. For readers unfamiliar with domain coloring, I recommend reading up on it first. There is also a wikipedia article on the subject.

### Introduction

The pictures below were generated using Wolfram’s Mathematica software (many thanks to my department colleague Professor Marcio Assolin). I adapted the code from the discussion on stackexchange here, and also here.

The first figure below shows the identity function ${f(z)=z}$:

The horizontal axis is the real axis and the vertical the imaginary axis of the domain ${z}$. The 29×29 grid is not deformed in this case because the identity function ${f(z)=z}$ does “nothing.” But I decided to include this example to illustrate how the colors and shades code information. First of all, notice that as we go around the origin ${z=0}$, the colors go from red on the positive real line, to green on the positive imaginary axis, to cyan on the negative real axis, to purple on the negative imaginary axis and then back to red again.

The color represents the argument of the function. In this case, since we can write ${z=r e^{i\theta}}$ the argument ${\theta}$ wraps back around every time we turn ${2\pi}$ radians around the origin in the complex plane.

Note that in addition to color, there is shading. Notice that at ${|z|=1/2}$, ${|z|=1}$ and ${|z|=2}$ there are discontinuities in shading. As we increase the absolute value of ${z}$, the shading gets darker and discontinuously gets brighter and this process repeats itself. Indeed, the shading has been used to plot the absolute value of the function. Every time the absolute value doubles, the shading goes through one cycle, becoming discontinuously brighter.

### Monomials

Let us now look at more complicated functions. The pictures below show the functions ${z\mapsto z^2}$ and ${z\mapsto z^3}$.

Now, things look more interesting! The first thing to note is that the 29×29 grid is distorted. The grid shown is the inverse image of the grid of the identity map. So for the function defined by ${f(z)=z^2}$, the procedure is as follows. Take the points of the grid and put them into some set ${S}$. Then calculate the inverse image ${f^{-1}(S)}$, i.e. the set of points that map to ${S}$. This inverse image is the grid shown above.

Notice how the distorted grid seems to preserve right angles, except at the origin. Indeed, holomorphic functions are typically also conformal (i.e., angle preserving) in many instances, and we will return to this topic further below. At the origin, the monomial functions above are clearly not conformal.

Take a look at the colors. Instead of cyclying through the rainbow colors going once around the origin, the colors cycle 2 and 3 times, respectively, for ${z^2}$ and ${z^3}$. This is easy to understand if we write ${z=re^{i \theta}}$ (for real ${r}$ and ${\theta}$), so that ${z^2=r^2 e^{2i\theta}}$ and ${z^3=r^3 e^{3i\theta}}$. So ${z^2}$ and ${z^3}$ circle the origin 2 and 3 times every time ${z}$ goes around the origin once.

Finally, notice that the shading cycles through more quickly. Indeed, ${|z^2|}$ and ${|z^3|}$ double more quickly than ${|z|}$.

### Poles

The monomial functions above have zeroes, but no poles. What do poles look like? The image below shows the function ${z\mapsto 1/z}$.

Notice how the colors cycle around “backwards.” Indeed, the argument of ${z}$ and ${z^{-1}}$ are negative of each other. Notice also how the shading now has discontinuities in the “opposite” sense (compare with ${z\mapsto z}$ in the first image above).

It is also worthwhile to look at the grid. The original grid of lines has transformed into a patchwork of circles. To show this more clearly, I modifed the image to show only a few grid lines, corresponding to real and imaginary lines at ${\pm 1,2,3,4,5}$:

In the image above the grid lines are now clearly seen to have mapped into circles. In higher order poles, the colors cycle around (backwards) a number equal to the order of the pole. Here are poles of order 2 and 3, shown with only some grid lines for greater clarity:

In addition to p0les, there are other kinds of singularities. Removable singularities are not too interesting, because basically a “point” is missing. If we “manually add” the point, the singularity is “removed” — hence the name.

In addition to removable singularities and poles, there are also what are known as essential singularities. Essential singularities can be thought of, loosely speaking, as poles of infinite order. Further below, we will take a look at essential singularities.

Now consider a function with a zero as well as a pole:

The function shown above is ${z\mapsto (z-1)+ 1/(z+1)}$, which has a zero at ${z=0}$ and simple pole at ${z=-1}$.

### Non-holomorphic functions

Having looked at examples of holomorphic and meromorphic functions, let us look at more complicated non-holomorphic function. The figure below shows ${|z|}$, the absolute value of ${z}$.

The color is red because ${|z|}$ is always non-negative real. The grid is gone and we have circles instead: we do not have conformality. The Cauchy-Riemann equations are impossible to satisfy because ${|z|}$ is always real, the imaginary part being identically zero everywhere.

The complex conjugate function ${z\mapsto \bar z}$ also is not analytic. Here is ${z\mapsto \bar z}$:

Notice that it looks just like the identity map, but reflected along the real axis. The imaginary axis is “backwards”.  Still, angles are preserved, so why is this function not holomorphic? The answer is that the angle orientations are reversed, i.e. the function is antiholomorphic rather than holomorphic. The colors cycle around “backwards”  in this case because the complex conjugate of  $r e^{i \theta}$ is $\latex r e ^{- i \theta}$.  Conformal maps preserved oriented angles, rather than just angles. Indeed, the complex conjugate function is neither holomorphic nor conformal.

### The exponential function and its Taylor polynomials

Let us now look at a transcendental holomorphic function: the exponential function ${z\mapsto \exp(z)}$. The images below show the exponential function at two scales.

Notice that the colors now cycle through going up and down vertically. The reason for this is as follows. If we write ${z=x + i y }$, then

$\exp[z]=e^{x+i y } = e^x e^{i y} ~.\ \ \ \ \$

So ${y}$, which is the imaginary part of ${z}$, determines the argument, hence the color. The zoomed out version makes it clear that the argument is periodic with period ${2 \pi}$ in the imaginary direction.

While on the topic of the exponential function, let us take a look at Talyor polynomial expansions. The figure below shows the Talor polynomial of degree 5.

Notice the 5 zeroes, which lie on an arc like the letter “C” slightly to the left of the origin. The exponential function does not have zeroes, of course. We know that if we take the infinite degree Talyor polynomial, i.e. the infinite Taylor series expansion, then we recover the exponential function. We can already see that for positive real part and small imaginary part of ${z}$, the Taylor polymial above is starting to behave qualitatively like the exponential function.

### Essential singularities

Having seen the exponential function, we can now look at essential singularities. Observe that the Laurent expansion of ${\exp(1/z)}$ around the origin in ${z}$ has an infinite number of terms of negative power in ${z}$. The singularity at the origin is thus stronger than a pole of any finite order. The figure below shows ${z\mapsto \exp(1/z)}$, shown at three different scales.  The third figure is a zoom of the second, which is a zoom of the first.

The software is apparently having some trouble near the origin, in the last figure! The reason for this is the Great Picard’s theorem, which says, loosely speaking, that an analytic function near an essential singularity takes all possible complex values, with at most 1 exception. In the case of ${z\mapsto \exp(1/z)}$, the function cannot become zero, which is the exceptional value. As we approach the origin, the argument (i.e. color) changes, cycles around, etc., increasingly quickly.

Let us now look at some trigonometric functions:

${\sin(z)}$:

${\tan(z)}$

We can clearly see the zeroes in ${\sin(z)}$ and the poles and zeroes of ${\tan(z)}$. Moreover, it is clear that these are periodic functions.

Compare the above trigonometric functions with their inverses:

${\arcsin(z)}$

${\arctan(z)}$

Notice that on the real line, for ${|z|>1}$ there is a discontinuity in color for arcsine. Similarly, for arctan there is a color discontinuity on the imaginary axis. To understand this jump in color, recall that ${|\sin(x)|\leq 1}$, which means that the inverse function ${\sin^{-1}(x)=\arcsin(x) }$ is not defined for ${x}$ outside the interval ${ -1\leq x\leq 1}$. Recall also that ${\sin(x)=\sin(x+2\pi)}$, so that the inverse function ${\sin^{-1}}$ must be multivalued. What is being shown above is the principal branch.

It helps to switch over to the logarithmic form. Recall that

$\displaystyle \sin(z)= {e^{iz} - e^{-iz} \over 2i } ~. \ \ \ \ \$

If we write ${z=\arcsin(w)}$, then ${\sin(z)=w}$. Substituting, we get

$\displaystyle 2iw ={e^{iz} - e^{-iz} }~. \ \ \ \ \$

To simplify the algebra, let ${e^{iz}=Z}$, so that

$\displaystyle 2iw = {Z - Z^{-1} } ~, \ \ \ \ \$

which gives us a quadratic equation:

$\displaystyle Z^2 -2iwz -1 =0~, \ \ \ \ \$

whose roots are

$\displaystyle Z= iw \pm \sqrt{1-w^2} ~. \ \ \ \ \$

So we finally get

$\displaystyle z=\arcsin(w)=-i \log Z= -i \log\left( iw \pm \sqrt{1-w^2} \right) ~. \ \ \ \ \$

So the branch cut in the ${\arcsin}$ function is due to the 2 possible values of the square root. There is a branch point at ${w=\pm 1}$ and there is actually another branch point at infinity.

### Branch points and cuts

Let us look at branch points more closely. As we know, the square root is multivalued, and the figure below shows the two branches, with the principal branch at the bottom.

Note how in each branch alone the colors do not cycle all the way through the rainbow colors. The missing colors of one branch are on the other branch. To see both branches, one would need to visualize the Riemann surface for the square root, a topic beyong what I wish to cover here.

The figure below shows the 3 branches of the cube root function, with the principal branch at the top:

There is more than 1 type of branch point. Algebraic branch points are those that arise from taking square roots, cubic roots, and ${n}$-th roots (for positive integer ${n}$). In general there will be ${n}$ well defined branches.

What happens if one takes ${n}$ to be a positive irrational number? Here is a hint:

$z^{\alpha} = e^{\alpha \ln z} ~.$

If we choose ${\alpha}$ rational, say ${\alpha=p/q}$, then putting ${z=r e^{i\theta + 2n\pi i}}$ we get ${\ln z= \ln r + i\theta + 2n\pi i}$, so that

$\displaystyle z^\alpha = r^{p/q} e^{i \alpha \theta} e^{ 2\pi i (np /q)} ~.$

But ${n p/q}$ is rational, and so there can be at most ${q}$ branches. But if ${\alpha}$ is irrational, this argument does not work. Instead of ${np/q}$ we get ${n\alpha}$, which can never equal an integer. So the branches never cycle through and the number of branches is infinite. Indeed, the logarithm above leads to a infinite branching, as we will see below.

There is a more complicated type of branch point in the function ${z\mapsto \exp(1/z^{1/n})}$ for integer ${n}$. If we loop around the origin ${n}$ times, the function returns to the original starting point (i.e. there is finite monodromy). However, there is an essential singularity at the origin. In other words, there is the unhappy coincidence of the algebraic branch point of ${1/z^{1/n}}$ sitting exactly on top of an essential singularity. Such branch points are known as transcendental branch points.

The figure above shows ${z\mapsto \exp(1/z^{1/2} )}$. The essential singularity coincides with the branch point.

Finally, as we saw above, there are branch points where the number of branches is infinite. Consider the complex logarithm. If we again write ${z=r e^{i \theta}}$ then ${\log z= \log r + i \theta}$. Since ${\theta}$ and ${\theta \pm 2\pi}$ give same value of ${z}$, the logarithm is multivalued. The branch cut is usually taken at ${\theta=\pm \pi}$. Here is the logarithm:

The zero at ${z=1}$ is clearly visible, as is the branch cut along the negative real axis.

The complex logarithm, like other multivalued functions, could instead be visualized as Riemann surfaces. Here is an example of the Riemann surface of the complex logarithm.

### Euler’s reflection formula

Let us next consider another topic related to Weierstrass’s beautiful factorization theorem, which states that every entire function can be expressed as an infinite product. Among the best known infinite products are the one used by Euler to solve the Basel problem, and the product formula for Euler’s gamma function. Indeed, the gamma function is, in a sense, one half of the sine function (or cosecant). Put differently, the sine function is the product of two gamma functions:

$\Gamma(z)\Gamma(1-z) = {\displaystyle \pi \over \displaystyle \sin (\pi z) }$ .

Proofs can be found in textbooks. Here I wish to focus on the zeroes and poles. Take a look at these figures:

The figures above show ${1/\Gamma(z)}$ and ${1/ [\Gamma(z)\Gamma(1-z) ]}$. Note the zeroes at the non-positive integers in the first image, correponding to the poles of the gamma function. If we multiply two gamma functions, so that there are zeroes at all integers, we basically get ${\sin(2\pi z)}$ upto a constant! Indeed, the last figure above is identical, up to scale, to that of the sine function seen earlier.

### When are holomorphic functions conformal?

Finally, let us take a closer look at conformality, i.e. the angle-ṕreserving property found in many holomorphic functions. The examples above of monomials of degree greater than 1 and poles shows clearly that conformality can break down at zeroes and poles.

Consider again the function ${z \mapsto z^2}$ below:

Conformality indeed breaks down at the zero at the origin, as expected.

But if a function is holomorphic with no zeroes in a region, is it necessarily conformal in that region? The answer is NO, as seen from the following counter-example:

${z \mapsto z^2+1}$

There is no zero at the origin, yet conformality breaks down!

To understand why, recall that to preserve angles, the map must locally be a scaled rotation (upto a translation). So the Jacobian determinant of the conformal map must be some positive constant. It is easy to show that the Cauchy-Riemman equations lead to a scaled rotation, provided the derivative is not zero. If the derivative is zero, however, the function need no longer be a scaled rotation, so angles need not be preserved.

In the example above, the function is holomorphic at the origin, but the derivative is zero at the origin, in other words, the origin is a critical point. Moreover, as ${z}$ moves around the origin once, the function ${z^2+1}$ moves around 1 twice, hence the breakdown in conformality.

Conversely, if a holomorphic function has a critical point at the origin, then its Taylor series does not contain a term of degree 1. But all higher order monomials ${z^n}$ break the conformal property at the origin, so the function cannot be conformal at the critical point. By translating arbitrary functions such that a critical point is on the origin, we can understand the following well known result:

A holomorphic function is conformal if and only if there are no critical points in the region of interest.

NOTES:

[1]. Below is the Mathematica code I used for the plot of the identity map. The code has been ladapted from the discussion on stackexchange here and also here.

f[z_] := z;

paint[z_] :=
Module[{x = Re[z], y = Im[z]},
color = Hue[Rescale[ArcTan[-x, -y], {-Pi, Pi}]];
shade = Mod[Log[2, Abs[x + I y]], 1];

ParametricPlot[{x, y}, {x, -3, 3}, {y, -3, 3},
ColorFunctionScaling -> False,
ColorFunction -> Function[{x, y}, paint[f[x + y I]]], Frame -> True,
MaxRecursion -> 1, PlotPoints -> 300, PlotRangePadding -> 0,
Axes -> False , Mesh -> 29,
MeshFunctions -> {(Re@f[#1 + I #2] &), (Im@f[#1 + I #2] &)},
PlotRangePadding -> 0, MeshStyle -> Opacity[0.3], ImageSize -> 400]

## A independência do banco central vai impedir os avanços sociais?

O assunto da independência do Banco Central (BC) tornou-se polêmico nas últimas semanas devido à entrada da candidata do PSB, Marina Silva, na disputa presidencial. Economistas e gestores experientes, como o Henrique Meirelles, que foi presidente do BC durante o governo Lula, já se declararam a favor de maior independência  para o BC (veja aqui).

Mesmo assim, boatos e mentiras espalham medo e ansiedade sobre os efeitos supostamente malignos da independência do BC. Devido a esta campanha de desinformação, naturalmente há uma certa confusão sobre o assunto. Por exemplo, representantes de alguns partidos políticos estão fazendo propaganda, afirmando que a independência do BC vai impedir os avanços sociais.  Poderia isso ser verdade?  Caso afirmativo, por que pessoas reconhecidamente competentes, como Henrique Meirelles, manifestam-se a favor da independência do BC? Onde está a verdade?

Sendo cientista, tendo a abordar qualquer questão sobre o mundo observável do ponto de vista empírico e experimental. Sempre me pergunto: Para onde os dados apontam? No fundo no fundo, o método científico nada mais é do que a acareação entre teorias e dados experimentais. Muitas teorias já foram derrubadas no confronto com os dados empíricos. Neste caso, os dados sugerem que a independência de um banco central não prejudica os avanços sociais. Muito pelo contrário.

Mesmo sem entrar em detalhes, o leitor pode chegar a uma conclusão independentemente, simplesmente olhando para os polos extremos no espectro de políticas econômicas adotadas em países diferentes. Por exemplo, podemos comparar a qualidade de vida, IDH, etc. nos países com e sem bancos centrais independentes. Então, vamos considerar exemplos extremos: (1) Países com bancos centrais quase totalmente independentes e (2) países com bancos centrais marionetes.

A União Europeia, os EUA, o Reino Unido e o Japão têm bancos centrais independentes. Esses bancos centrais agem sem interferência do governo e são imunes à pressão por grupos com conflito de interesses. Esses países foram pioneiros em conquistar a independência de seus bancos centrais. Sem exceção, são países ricos e com baixas taxas de pobreza, analfabetismo, mortalidade infantil, etc.

Podemos também olhar para os países onde os bancos centrais são marionetes do governo. Venezuela é exemplo de um país onde o banco central vem perdendo autonomia: O governo manda no banco central e faz o que bem quer. Zimbabwe é outro país onde o governo interferiu na atuação do banco central. Em ambos países, o governo tem amplos poderes para ditar as regras e passar o rolo compressor por cima de qualquer questionamento técnico dos economistas que trabalham na instituição. A situação é bem diferente nos países que tem um banco central independente. Por exemplo, nem mesmo o presidente dos EUA, Barack Obama, tem o poder para ajustar as taxas de juros do banco central americano  (Federal Reserve).

Temos então os exemplos extremos de países com e sem bancos centrais. Milhares de brasileiros e pessoas de outras nacionalidades tentam imigrar todo ano para os EUA, para a Europa, e até mesmo para o Japão. Mas quantos brasileiros sonham em imigrar para Venezuela ou para Zimbabwe?

Se o leitor está convencido, então por que os políticos resistem à ideia de um banco central independente? Será que os políticos dos partidos que são contra a independência do BC estão tão enganados? Eles não conseguem distinguir entre uma Venezuela e um Japão, ou entre Zimbabwe e Europa? O leitor deve estar pensando que, certamente, deve haver alguma razão boa e bem pensada contra a independência do BC. Tantos políticos não poderiam estar todos errados! A final de contas, quem esse tal de Henrique Meirelles acha que ele é? O leitor pode estar pensando:  Se estudarmos com mais cuidado os detalhes de como funciona um banco central, certamente iremos encontrar boas razoes para manter o status quo ante.

Mas a resposta é bem mais simples.  A verdade é que todos esses políticos estão enganados. Ou pior, agem por interesses diferentes do interesse público. Havia uma época quando quase todo mundo acreditava que o sol girava em torno da terra. Nem por isso era verdade. Da mesma forma, acreditar que um BC independente vai impedir os avanços sociais não faz com que isso seja uma verdade.  Opinião popular não é um bom indício de veracidade.  A única fonte de conhecimento sobre o mundo observável é o método científico.   Para saber a verdade, temos que estudar os dados.  Os dados, diferentemente dos políticos, não mentem.

Trabalhei por mais de uma década na área de pesquisa que ficou conhecida como Econofísica, estudando fenômenos econômicos do ponto de vista da Física de processos estocásticos. Meu interesse principal tem sido as propriedades estatísticas de retornos financeiros.  Minhas publicações sobre o assunto podem ser encontradas aqui. Uma taxa de juro, no final das contas, nada mais é do que uma taxa de retorno financeiro. Considero-me, portanto minimamente equipado para discursar e opinar qualificadamente sobre essa questão da independência do BC.

A seguir, vou resumir, de forma extremamente condensada, o principal argumento a favor da independência do BC.  Na maioria dos países com bancos centrais independentes, o governo fixa a meta de inflação e o banco central administra as taxas de juros para tentar atingir essa meta de inflação. O governo não interfere nessa atuação. Os critérios que norteiam as decisões sobre as taxas de juros são relativamente transparentes. Os agentes econômicos, portanto, têm o luxo de poder planejar para o futuro, sabendo o quanto esperar da taxa de inflação anual. Essa previsibilidade gera confiança na meta de inflação, o que concede credibilidade ao BC e logo também ao governo.

O efeito colateral mais importante desse aumento da credibilidade  e da confiança é a redução da taxa de juros do BC. A razão é simples: Os investidores, o empresariado, os especuladores financeiros, os trabalhadores e todos os outros agentes econômicos perdem o incentivo para apostar suas fichas numa inflação diferente da meta de inflação. Assim, as taxas de juros (como por exemplo a taxa SELIC no Brasil) necessários para garantir a meta de inflação acabam sendo significativamente menor em países que têm bancos centrais independentes, comparados aos países sem bancos centrais independentes.

Simplificando um pouco o argumento, a independência do BC gera otimismo e segurança com relação à previsibilidade de inflação. Já a falta de independência gera desconfiança e insegurança pois ninguém sabe quanto será a inflação. Na verdade, nos países com bancos centrais marionetes, os agentes econômicos simplesmente não confiam nas projeções de inflação do governo. Quantos brasileiros já compraram dólares para fazer “hedge” contra a inflação? Às vezes, nem mesmo as estatísticas do governo são confiáveis. Na Venezuela, por exemplo, a inflação real hoje é bem maior do que a taxa de inflação oficial. O governo faz uma maquiagem para esconder a inflação. Em resumo, quando um banco central não pode agir independentemente do governo, o preço cobrado é maior para controlar a inflação.   Há situações em que nada garante que a inflação ficará sob controle, como por exemplo na Venezuela ou em Zimbabwe.

Um banco central independente é um dos vários ingredientes que fazem um país ser economicamente próspero e socialmente evoluído. Por que, então, o Brasil ainda não tem um BC independente? O custo de um banco central independente é mínimo. Os benefícios são enormes, pois a inflação é um mal que atinge principalmente as classes mais pobres. Um BC independente também ajuda a economia a crescer, da seguinte maneira: Com as expectativas da inflação futura sob controle, as taxas de juros do BC ficam reduzidas e juros baixos ajudam a economia a crescer.

Henrique Meirelles, durante os anos do governo Lula, teve total autonomia operacional no BC e consequentemente a inflação ficou sob controle, como deve se esperar. No entanto, sob seu próximo presidente  o BC teve uma atuação bem diferente inicialmente. Mesmo com a taxa de inflação acima do centro da meta de inflação de 4,5%, o BC baixou a taxa SELIC sem nenhuma explicação que fazia sentido.  Exatamente como a teoria prevê, a inflação subiu e quase estourou o teto da meta de inflação, de 6,5%. O que poderia ter levado o BC a agir desta forma tão irracional? A única explicação plausível é também a reposta mais óbvia:  A decisão veio de cima. Quando deu no que deu, o BC novamente elevou a taxa SELIC o hoje pagamos o troco em triplo: (1) inflação alta, (2) juros altos e (3) economia em recessão técnica.   O Brasil literalmente pagou caro para aprender essa lição importante sobre a necessidade da independência do BC.

Frente ao exposto, venho aplaudir a coragem e o acumen  de Henrique Meirelles e de Marina Silva.  Apoio 100% a proposta de um BC independente.

O Brasil merece.

Agradecimentos: Tiago Viera, Carlos Chesman e Claudionor Bezerra  contribuíram com comentários e correções.

## Feynman on worthwhile problems

A colleague of mine, Luiz Felipe Pereira, brought to my attention this letter of Richard P. Feynman addressed to Koichi Mano, dated 3 Feb 1966. It conveys immediately a clarity about what are the problems that are worthwhile studying. I also found it moving.

I copy the entire text here.

Dear Koichi,

I was very happy to hear from you, and that you have such a position in the Research Laboratories.

Unfortunately your letter made me unhappy for you seem to be truly sad. It seems that the influence of your teacher has been to give you a false idea of what are worthwhile problems. The worthwhile problems are the ones you can really solve or help solve, the ones you can really contribute something to. A problem is grand in science if it lies before us unsolved and we see some way for us to make some headway into it. I would advise you to take even simpler, or as you say, humbler, problems until you find some you can really solve easily, no matter how trivial. You will get the pleasure of success, and of helping your fellow man, even if it is only to answer a question in the mind of a colleague less able than you. You must not take away from yourself these pleasures because you have some erroneous idea of what is worthwhile.

You met me at the peak of my career when I seemed to you to be concerned with problems close to the gods. But at the same time I had another Ph.D. Student (Albert Hibbs) whose thesis was on how it is that the winds build up waves blowing over water in the sea. I accepted him as a student because he came to me with the problem he wanted to solve. With you I made a mistake, I gave you the problem instead of letting you find your own; and left you with a wrong idea of what is interesting or pleasant or important to work on (namely those problems you see you may do something about). I am sorry, excuse me. I hope by this letter to correct it a little.

I have worked on innumerable problems that you would call humble, but which I enjoyed and felt very good about because I sometimes could partially succeed. For example, experiments on the coefficient of friction on highly polished surfaces, to try to learn something about how friction worked (failure). Or, how elastic properties of crystals depends on the forces between the atoms in them, or how to make electroplated metal stick to plastic objects (like radio knobs). Or, how neutrons diffuse out of Uranium. Or, the reflection of electromagnetic waves from films coating glass. The development of shock waves in explosions. The design of a neutron counter. Why some elements capture electrons from the L-orbits, but not the K-orbits. General theory of how to fold paper to make a certain type of child’s toy (called flexagons). The energy levels in the light nuclei. The theory of turbulence (I have spent several years on it without success). Plus all the “grander” problems of quantum theory.

No problem is too small or too trivial if we can really do something about it.

You say you are a nameless man. You are not to your wife and to your child. You will not long remain so to your immediate colleagues if you can answer their simple questions when they come into your office. You are not nameless to me. Do not remain nameless to yourself – it is too sad a way to be. Know your place in the world and evaluate yourself fairly, not in terms of your naïve ideals of your own youth, nor in terms of what you erroneously imagine your teacher’s ideals are.

Best of luck and happiness.

Sincerely,
Richard P. Feynman.

Source: “Perfectly Reasonable Deviations from the Beaten Track: The Letters of Richard P. Feynman” (Basic Books, 2008).

## Analyzing Lévy walks in 2-D and 3-D

Lévy flights and walks form a class of random walks. Whereas in Brownian motion the probability density function (PDF) of the random walk steps has finite statistical moments, in contrast the PDF of the step sizes for a Lévy flight are not all finite. Higher moments are infinite, because the PDF decays asymptotically as a power law:

$\displaystyle P(\ell) \sim \ell^{-\mu} ~. \ \ \ \ \ (1)$

If the random walk steps are uncorrelated, it is fairly easy to show that the central limit theorem (CLT) is applicable so long as ${\mu}$ is large enough for the variance of the PDF to be finite. In 1 dimension (1-D), the critical value of ${\mu}$ is ${\mu=3}$. For ${\mu}$ larger than this critical value, the result is Brownian motion due to the CLT.

However, for ${\mu<3}$ in 1-D, the variance is infinite and the CLT is not applicable. There is a generalization of the CLT due to Paul Lévy and others for sums of random variables — typically independent and identically distributed (IID) — whose variance is not finite. The equivalent of the Gaussian distribution in this generalization is known as the Lévy stable distribution. The PDF for the Lévy stable distribution is usually expressed as a Fourier transform and for our purposes here we do not need to know it explicitly.

The only important property of the Lévy stable distribution that is relevant for our purposes here is the exponent ${\mu}$. For IID random variables described by a power law tailed PDF with exponent ${\mu}$, the PDF of the sums of these variables converges to a Lévy stable distribution which has the same power law decay exponent ${\mu}$. This is the crucial point. For ${\mu>3}$, the relevant Lévy stable distribution is the Gaussian, which is a special case of the Lévy stable distribution. The critical value ${\mu=3}$ leads to a logarithmic blow-up of the variance, thus separating Brownian motion from Lévy flights. For ${\mu=1}$, the PDF is non-normalizable. So the relevant range of exponents for a 1-D Lévy flight is ${1< \mu <3}$. The same basic ideas generalize to higher dimensions, although the value of the exponent must be handled with some care.

What about Lévy walks versus Lévy flights? The difference is minimal, in fact, and can usually be ignored in a first reading. In a Lévy flight, arbitrarily large jumps can be taken in one time step. For this reason, the instantaneous velocity can be arbitrarily large — even larger than the speed of light, for instance. For this reason, Lévy flights of matter or energy in physical space are not realistic. They are, however, plausible in other kinds of “spaces,” such as along a crumpled polymer with the metric given by chemical distance, i.e. distance measured along the polymer chain.

In contrast, a Lévy walk traverses the same path as the corresponding Lévy flight, but always at a finite (typically constant) velocity. Whereas it is impossible to imagine an animal performing a Lévy flight, it is not so far-fetched to imagine a Lévy walk.

Finally, I should mention that power laws always appear truncated in the physical universe. There are no magnitude 100 earthquakes, for example. Similarly, the inverse square decay of gravity cannot extend beyond the size of the universe. The power law behavior seen in second-order phase transitions is, in fact, a mathematical idealization for an infinite system. Finite sized systems have inflection points (or similar behavior) rather than singularities at the critical point of the phase transition. Even the singularity inside a black hole is hypothetical, since these have never been directly observed. (How do you even physically measure a singularity?) So when we say that a system is “fractal” or that this or that path is a Lévy walk or flight, upper and lower cutoffs to the power law behavior are always to be understood as implicit.

Having reviewed the basics about Lévy flights, let us turn to the topic of this post. My collaborators and I have written a book about how animals move. In particular, animals seem to perform Lévy walks. There is still some debate on this point, but I would venture to say that a majority of researchers in the field are convinced that Lévy walks correctly describe important aspects of actual animal motion.

There are several reasons why the debate continues. Some of these reasons (but not all) are technical. One obstacle has to do with statistical data analysis and statistical inference. It is not entirely straightforward to analyze data that are described by power laws. An example: when studying earthquakes, what size earthquake should be considered an “outlier”? The answer, of course, is that earthquakes are described by the Gutenberg-Richter law, which is a power law. So there is no conventional meaning for the term “outlier”. This property is not the topic of this post, although I will perhaps return to it in the future. Instead, here I wish to discuss how to detect Lévy walks and flights.

A basic strategy to infer a Lévy walk or flight is to study the histogram of the random walk step sizes. A pure Lévy walk will give rise to a power law tailed histogram. There are other equivalent methods. So far, so good.

The problem, of course, is that empirical data are never perfectly clean. There is always some noise. Superimposed on the Lévy flight or walk might be some Brownian motion. The ultra-large steps of the Lévy flight might become “chopped up” due to this noise. In 1-D, this problem is easy to solve, because one can simply coarse-grain (i.e., smooth) the random walk and make a new histogram. Since the noise has a well described characteristic scale, it will attenuate under coarse-graining. In contrast, the underlying Lévy flight signal has scale-free properties, because power laws are self-affine. So the Lévy walk “backbone” or skeleton will survive a coarse-graining. Speaking somewhat loosely, we can say that coarse-graining can give us a better signal-to-noise ratio. Put in slightly different terms, the basic idea is to look at the large scale structure, not the fine scale structure.

This approach cannot work in 2-D or 3-D without modification. The reason for this difficulty is that in 2-D and 3-D the paths can be curved. The image below shows curved trajectories.

The left panel (a) shows 2 random walk models seen at small scales and (b) shows the same walks at much larger scales. One model has an underlying Lévy walk backbone, with added curvature. Both models have the same random walk step sizes and the same turning angle distribution. The difference is that one model is Markovian in time and the other (non-Markovian) model has long-range power law correlations induced by the underlying Lévy walk. The image is adapted from this paper, which contains the somewhat technical explanation of how the 2 random walks are generated.

How do you even make histograms with such “data”? Where does a random walk step “begin” and where does it “end”? The presence of curvature introduces a set of challenges which are not present in the 1-D counterpart. The paper cited above was, to a large extent, motivated by such questions. The basic problem is the so-called “discretization” issue. How do you take a curved path and segment it into discrete random walk steps? Is there an objective criterion that we can use to know where one step ends and the other begins?

In this context, there is an interesting article which was published in the journal Methods in Ecology and Evolution, that makes significant progress on such questions. Nicolas E. Humphries, Henri Weimerskirch and David W. Sims, have written a paper titled “A new approach for objective identification of turns and steps in organism movement data relevant to random walk modelling” in which they present a new approach to the problem of how to analyze 2-D and 3-D trajectories. (Clicking on the link will take you to their paper.)

It is well known that the projection onto 1-D of a 2-D or 3-D Brownian motion is itself Brownian motion. It is less well known that the projection of a 2-D or 3-D Lévy flight is a 1-D Lévy flight. In other words, the projection of a Lévy flight is itself a Lévy flight. Humphries, Weimerskirch and Sims exploit this key idea to improve our ability to detect Lévy walks.

The image above is the 1-D projection (with time on the horizontal axis now) of the 2-D walks shown above. The ultra-long jumps are evident. Coarse graining makes them even more visible:

The essence of their method is as follows. Given a 2-D or 3-D Lévy walk, they look at its 1-D projection. This projection, being 1-D, cannot contain any curvature. At this point, the usual methods for studying 1-D Lévy walks can be successfully applied. There is an elegance to the simplicity of the idea. More importantly, the method seems to work well.

## Book: Perspectives and Challenges in Statistical Physics and Complex Systems for the Next Decade

Edited by:
Gandhimohan M Viswanathan (Universidade Federal do Rio Grande do Norte),
Ernesto P Raposo (Universidade Federal de Pernambuco),
Marcos Gomes Eleutério da Luz (Universidade Federal do Paraná)

Statistical Physics (SP) has followed an unusual evolutionary path in science. Originally aiming to provide a fundamental basis for another important branch of Physics, namely Thermodynamics, SP gradually became an independent field of research in its own right. But despite more than a century of steady progress, there are still plenty of challenges and open questions in the SP realm.

In fact, the area is still rapidly evolving, in contrast to other branches of science, which already have well defined scopes and borderlines of applicability. This difference is due to the steadily expanding number of applications, as well as ongoing improvements and revisions of concepts and methods in SP. Such particular aspects of SP lend further significance and timeliness to this book about perspectives and trends within the field.

Here, the aim is to present the state-of-the-art vision of expert researchers who study SP and Complex Systems. Although a comprehensive treatment is well beyond what can be treated in a single volume, the book provides a snapshot of the field today, as well as a glimpse of where the field may be heading during the next decade.

The book is aimed at graduate and advanced undergraduate physics students, as well as researchers who work with SP, Complex Systems, Computational Physics, Biological Physics and related topics. It addresses questions such as: What insights can be gained from recent advances in the study of traditional problems in SP? How can SP help us understand problems that arise in the biological sciences and in the study of complex systems? How can new problems be formulated using the ‘language’ of SP? In this way, it attempts to document partial progress in answering these and related questions.

The book also commemorates the occasion of the 70th anniversary in 2011 of two important physicists and friends who dedicated their lives to the understanding of nature in general and to the development of Statistical Physics and the science of Complexity in particular: Liacir Lucena and H Eugene Stanley.

Sample Chapter(s)
Comparing methods and Monte Carlo algorithms at phase transition regimes: A general overview (290 KB)
Contents:

• Further Advances in the Analysis of Traditional Problems in Statistical Physics:
• Comparing Methods and Monte Carlo Algorithms at Phase Transition Regimes: A General Overview (C E Fiore)
• Density of States of the Ising Model in the Field (B D Stošić)
• A Renormalization Group Study of the Three-Color Ashkin-Teller Model on a Wheatstone Hierarchical Lattice (R Teodoro, C G Bezerra, A M Mariz, F A da Costa and J M de Araújo)
• Applying Virial Theorem in Continuous Potential of Two Scales (N M Barraz Jr and M C Barbosa)
• Elementary Statistical Models for Nematic Transitions in Liquid-Crystalline Systems (D B Liarte & S R Salinas)
• Phase Diagram and Layer-Thinning Transitions in Free-Standing Liquid Crystal Films (M S S Pereira, I N de Oliveira and M L Lyra)
• On Some Experimental Reasons for an Inhomogeneous Structure of Ambient Water on the Nanometer Length Scale (F Mallamace, C Corsaro and C Vasi)
• Polyamorphism and Polymorphism of a Confined Water Monolayer: Liquid-Liquid Critical Point, Liquid-Crystal and Crystal-Crystal Phase Transitions (V Bianco, O Vilanova and G Franzese)
• New Insights into Traditional Problems in Statistical Physics:
• Topological and Geometrical Aspects of Phase Transitions (F A N Santos, J A Rehn and M D Coutinho-Filho)
• Pacman Percolation and the Glass Transition (R Pastore, M P Ciamarra and A Coniglio)
• Exact Solution for a Diffusive Process on a Backbone Structure: Green Function Approach and External Force (E K Lenzi, L R da Silva, A A Tateishi, M K Lenzi and H V Ribeiro)
• Multifractal Surfaces: Lucena and Stanley Approaches (G Corso and D A Moreira)
• Applications to Biological Problems:
• Nanoelectronics of a DNA Molecule (E L Albuquerque, U L Fulco, E W S Caetano, V N Freire, M L Lyra and F A B F Moura)
• Magic Trees in Mammalians Respiration or When Evolution Selected Clever Physical Systems (B Sapoval and M Filoche)
• Social Distancing Strategies Against Disease Spreading (L D Valdez, C Buono, P A Macri and L A Braunstein)
• Non-Traditional Problems Related to Complex Systems:
• Thermodynamics and Kinetic Theory of Granular Materials (G M Kremer)
• Continuous and First-Order Jamming Transition in Crossing Pedestrian Traffic Flows (H J Hilhorst, J Cividini and C Appert-Rolland)
• Multiplicative Processes in Visual Cognition (H F Credidio, E N Teixeira, S D S Reis, A A Moreira and J S Andrade Jr)
• Search Strategy: Hedging Your Bet (M F Shlesinger)

Readership: Advanced undergraduates, graduate students, researchers, academics and professionals in statistical physics, complex systems and nonlinear science.

## TelexFREE é uma pirâmide?

Recentemente muitas pessoas sofreram prejuízos desnecessariamente, devido a investimentos em esquemas financeiros.  Um exemplo é o TelexFREE.   Em julho deste ano esta empresa foi impedida judicialmente de exercer suas funções.  Muitas pessoas estão confusas sobre o que está acontecendo. Aparentemente, algumas dessas pessoas não sabem o que é uma pirâmide financeira.   Neste artigo, venho tentar esclarecer as questões fundamentais sobre pirâmides financeiras.   Notem, por favor, que embora o título contenha a palavra TelexFREE, de fato este artigo não é sobre o TelexFREE, mas sim sobre a natureza de pirâmides financeiras.

Mas, antes, venho lamentar o estado da educação no Brasil.  Do meu ponto de vista, essa confusão sobre pirâmides é consequência natural do péssimo estado de educação no país. Já fui professor de ensino fundamental e médio e conheço a primeira mão os vários problemas. Em 2013 o Brasil ficou em último lugar na América Latina no ranking da PNUD da ONU.  Enquanto que a escolaridade média do brasileiro é inferior a 8 anos, por outro lado a dos Norte-Americanos é superior a 13 anos.   A falta de escolaridade e de educação cria muitos problemas, sendo um deles o analfabetismo financeiro.   Por exemplo, os defensores das empresas, reagindo às acusações sobre serem pirâmides, reagem fazendo afirmações absurdas.  Alguns andam dizendo que a pirâmide é o Congresso Nacional!  Só falta então dizer que as pirâmides do Egito foram construídas por aliens!   O analfabetismo científico e o analfabetismo financeiro tem origem, em parte, na falta de educação de qualidade.  Levam a consequências negativas tanto para o indivíduo como para a sociedade.

Uma pirâmide financeira é uma maneira de ganhar dinheiro que depende da entrada de um número cada vez maior de pessoas participando para o esquema não quebrar. Como a população do planeta é finita, uma pirâmide financeira não pode operar por muito tempo. Ou ela quebra, devido a falta de entrada de novas pessoas, ou então, muito raramente, o esquema se transforma, via calote parcial, para se tornar sustentável, não sendo mais, então, uma pirâmide.

Um exemplo para ilustrar a ideia: Digamos que uma empresa PIRAMIDE S/A ofereça um retorno financeiro mensal de 50%, muito acima do que é encontrado no mercado financeiro.  Obviamente, muitas pessoas sem conhecimento sobre finanças irão querer entrar nesse esquema.  Vamos supor que os gerentes da empresa usem todo o dinheiro que entra na empresa para pagar o retorno financeiro aos clientes.  Digamos que no primeiro mês a empresa captou 1000 reais de 10 clientes que entraram com 100 reais cada, tal que 30 dias depois a empresa precisa ‘devolver’ 1500 reais. Cada uma das 10 pessoas precisa receber de volta 150 reais. Como eles entraram com 100 reais, o retorno financeiro é 50%, altíssimo.  De onde vem esses 500 reais adicionais?   Ela precisa sair de algum lugar. De onde ela vem?  A resposta é simples: Os 500 adicionais vem do bolso de novos clientes!    Então, supondo que cada cliente possa comprar uma participação no esquema em parcelas de 100 reais, são necessários 5 novos clientes ou parcelas.

É importante notar que os 500 reais que entram vindo dessas 5 novas pessoas servem para pagar apenas os ‘juros’ das primeiras 10 pessoas! Se as 10 primeiras pessoas continuarem com os 1000 reais investidos, então no segundo mês será necessário a entrada de mais 5 pessoas, além dos primeiros 5 que já entraram!   Veja bem que ainda nem contabilizamos o retorno financeiro dos 5 novatos inicais.  Como o retorno financeiro é alto, existe um forte incentivo para os clientes não pedirem para sacar o valor investido. Os gerentes podem, assim, manipular seus clientes (na verdade, suas vítimas) por um tempo prolongado.

O nome ‘pirâmide’ vem do fato de que os clientes iniciais precisam recrutar  novatos, que formam então a segunda camada. Esses então precisam recrutar a terceira camada, etc.   Em princípio, camadas inferiores precisam ser maior do que as camadas superiores, para permitir que as pessoas nas camadas superiores possam começar a sacar.  O recrutamento de mais e mais novos clientes, que então se tornam novos recrutadores,  é um dos requisitos de pirâmides financeiras.

Note também que é impossível devolver o dinheiro investido para todo mundo simultaneamente.  Em pirâmides financeiros, é impossível todo mundo sacar o dinheiro simultaneamente, mesmo em teoria.  Já em fundos de investimento, por exemplo, é possível liquidar todos os ativos para devolver integralmente todo o saldo dos clientes, pelo menos em teoria se não em prática.

Existem variações de pirâmides, como por exemplo o esquema de Ponzi, que é um pouco mais centralizado relativo às pirâmides financeiras.   Mas a ideia básica é a mesma:  O aspecto mais importante é a insustentabilidade desses esquemas.

Como eu trabalhei por vários anos na área de Econofísica, conheço um pouco sobre finanças.   Posso afirmar, com uma certa segurança, que pirâmides financeiras representam, quase sempre, fraudes. Os clientes são as vítimas.  É sempre difícil dizer isto para quem acredita piamente nos esquemas. Tipicamente, as vítimas dessas fraudes se tornam grandes defensores dos esquemas. É irônico e triste ver a vítima defendendo o agressor.

Um pouco mais de 1 ano atrás, quando conhecidos me falaram sobre o assunto e as maravilhas que eram esses negócios, eu imediatamente pensei na questão da sustentabilidade do esquema.   Expliquei que eu jamais iria querer entrar num esquema desses, pois rentabilidade e risco caminham juntos. Um retorno financeiro astronômico é possível sinal de risco também astronômico.  Essas informações estão na Internet e qualquer pessoa pode usufruir delas. Mesmo assim, as pessoas viram vítimas e acabam sofrendo desnecessariamente. O que fazer?

Na verdade, é sim possível ganhar dinheiro numa pirâmide, se você se cuidar de sair da camada mais baixa o mais rápido possível e então sacar todo seu saldo antes da quebra. Isso é possível, mas é ariscado.  Em jogos de loteria, muitos perdem para que poucos possam ganhar muito.  Da mesma forma, é possível ganhar dinheiro numa pirâmide.  Certamente, os criadores dessas fraudes tipicamente ganham muito dinheiro.  Obviamente, existem problemas éticos e essas práticas frequentemente representam crimes.  Um caso famoso recente é Bernard Madoff. Ele era considerado um grande investidor, mas hoje está na prisão.

Voltando ao assunto:  A empresa é ou não é pirâmide?

Basta decidir se a empresa poderia sobreviver mesmo sem a entrada de novos clientes (‘divulgadores’).   Se a resposta ainda não for óbvia por algum motivo, então a seguinte indagação talvez ajude a esclarecer um pouco mais o fato crucial:

O que aconteceria se todo mundo no planeta já fosse cliente?

## Simulações de Física

Venho compartilhar com todos esse link de simulações interativas de experiências de Física.

Um aluno de Iniciação Científica, Gustavo Lamenha, e eu traduzimos para Português os textos, originalmente em Inglês.  O site original foi criado pelo Professor Fu-Kwun Hwang, da National Taiwan Normal University. Com o apoio da Reitoria da Universidade Federal de Alagoas (UFAL) em Maceió-AL, onde eu era professor na época, conseguimos financiamento no valor de R\$7000,00 para reformar uma sala do Departamento de Física da UFAL, com a finalidade de montar o primeiro Laboratório de Multimídia da UFAL.   Mesmo com essa pequena quantia, conseguimos terminar as obras e o projeto foi um grande sucesso.

Durante sua existência física, o laboratório era bastante popular entre os alunos de graduação da UFAL. Os novos métodos de ensino repercutiram positivamente, veja aqui um artigo que saiu publicado no jornal Tribuna de Alagoas, na edição de Domingo do dia 06/01/2002. No entanto, depois de 2 ou 3 anos, o laboratório foi demolido para construir salas para professores.

Quando Professor Fu-Kwun Hwang soube que nosso laboratório seria desativado, ele muito gentilmente se ofereceu para hospedar em Taiwan um clone do nosso site original, em Português, para permitir a continuidade de sua existência na Internet.  Agradeço muito ao Professor Fu-Kwun Hwang por tudo que tem feito para melhorar o ensino de Física para as gerações futuras.