A Tetrad of Captivating Problems
2025-05-19 | 2025-06-30
Estimated Reading Time: 24 minutes
Prologue
This blog is the sandwich filling between two blog-slices: The Exponential and Logarithmic Functions and e Unleashed. It consists of a tetrad of captivating problems that are related to exponents, which assumed centre stage after Euler showcased the number \(e\) and explored its facets in the eighteenth century.
Problem One: No solution or Too Many?
Once, while I was idly browsing the gallery of suggestions put forth by YouTube to grab my attention—and entice me to watch yet another video—I came across the rather tantalizing screenshot simulated in Figure 1 below [1].
We are told that \[ 1^{x} = 4 \qquad{(1)}\] and asked to solve for \(x\).
Even though the nature of \(x\) was not specified—whether it is positive or negative, an integer, a non-integral rational, real, complex, etc.—this problem transfixed me. “Surely, the author must be joking,” was my first thought.
But, try as I might, my mind militated against any solution. My thoughts ran like this: \[ \begin{aligned} 1^{-2} &= 1 & 1^{-1} &= 1 & 1^{-\frac{1}{2}} &= 1\\ 1^{0} &= 1 & 1^{\frac{1}{2}} &= 1 & 1^{1} &= 1\\ 1^{2} &= 1 & 1^{e} &= 1 & 1^{3} &= 1\\ 1^{\pi} &= 1 & 1^{4} &= 1 & 1^{100} &= 1\\ \end{aligned} \] Indeed, \(1\) raised to any power is \(1\), whether that power is zero, a non-zero integer, a positive fraction, a negative fraction, or a transcendental number. It all boiled down to the standard manipulation when faced with solving for exponents: take natural logarithms of both sides. In this case, \[ \begin{aligned} \ln(1^{x}) &= \ln 4\\ x \ln 1 = x (0) = 0 &\ne 4. \end{aligned} \]
So, the equation is a falsehood. And since a false statement can imply any statement, I could as well claim that the moon is made of green cheese. On that note, I withdrew from the problem and let my subconscious mind try to wrangle a solution.
There was one nagging refrain. Why was the base chosen to be \(1\)? Was it to underscore the impossibility of the equation at first sight, while keeping the door slightly ajar for a sneaky solution? But, first a brief detour to re-visit the exponential and logarithmic functions.
The \(\ln\) and \(\exp\) functions for reals
The exponential and natural logarithm functions for real numbers are maps so: \[ \begin{aligned} \exp: & \quad\mathbb{R} \to \mathbb{R^{+}}\\ \ln: & \quad\mathbb{R^{+}} \to \mathbb{R} \end{aligned} \] where \(\mathbb{R^{+}} = \{ x \in \mathbb{R} \mid x > 0\}\), i.e., \(\mathbb{R^{+}}\) is the set of positive real numbers.
When we deal with real numbers exclusively, we have unambiguous inverses for the exponential and logarithmic functions as shown below: \[ \begin{aligned} \ln( \exp x ) &= x\; ; \; (x \in \mathbb{R})\\ \exp( \ln y ) &= y\; ; \; (y \in \mathbb{R^{+}}) \end{aligned} \] For an illustration of this idea, see Figure 7 of my blog The Exponential and Logarithmic Functions. But this is not the case once complex numbers enter the fray.
To understand why, let us take a step or two back to review how points are depicted using co-ordinate pairs.
Cartesian and Polar forms
The Cartesian co-ordinate system is a marriage between arithmetic and geometry. It allows any point on a plane to be represented by a pair of numbers. What these numbers mean depends on the context.
The number pairs may represent
\((x, y)\) pairs corresponding to points on the graph of a real-valued function;
co-ordinates on a map like a latitude and a longitude;
the components of a two-dimensional vector; or
represent the real and imaginary parts of a complex number.
Here, we will focus on the first and last of these interpretations.
Any point in two-dimensional Euclidean space or the Euclidean plane may be represented by an ordered pair of real numbers. The first number corresponds to the \(x\)-coordinate and the second to the \(y\)-coordinate. Note that order matters here because of the meaning attached to the two numbers, as being distances along two named orthogonal axes.
But the Cartesian \((x, y)\) representation is not the only means to tie number pairs to positions. Other methods are also possible. Take a look at Figure 2. The point labelled \(P\) has positional co-ordinates \((a, b)\). But it is located on a circle of radius \(r\), and the line from the origin \(O\) to \(P\) makes a counter-clockwise angle of \(\theta\) with the positive \(x\)-axis. These two numbers \(r\) and \(\theta\) may also be used to define the position of \(P\) as shown in Figure 2.
We may refer to \(P\) as the point \((a, b)\), or as the point \((r, \theta)\). The equivalence between these two representations is shown below and also in Figure 2: \[ \begin{aligned} a &= r\cos\theta\\ b &= r\sin\theta\\ r &= \sqrt{a^2 + b^2}\\ \theta &= \arctan\left({\frac{b}{a}}\right) \end{aligned} \]
So, what is the advantage gained by using the polar representation? For a start, consider a circle with the centre at the origin and a radius of 4 units. Its radius \(r\) does not vary with angle \(\theta\), and is independent of it. Therefore, the equation of this circle is \(r = 4\), which is starkly simple, compared with \(x^2 + y^2 = 16\) using the \((x, y)\) representation.
Certain curves like the Lemniscate of Bernoulli are also more elegantly expressed and analyzed using their polar equations. Simplicity, convenience, and clarity are useful advantages from the polar viewpoint.
But are polar equations an unalloyed blessing? No, they embody the cunning wolf of ambiguity because the inverse trigonometric functions are multi-valued. If we are given only the value \(\arctan\frac{b}{a}\) we will not get a unique \(\theta\) corresponding to it.
First, recall that the trigonometric functions like \(\sin\), \(\cos\), and \(\tan\) are circular functions which are naturally periodic with a period equal to one revolution of the circle or \(2\pi\) radians. Refer to my blog on Varieties of Multiplication for a quick review of the sine and cosine functions. You will note therefrom that in each \(2\pi\) period, there are two values of the angle for which the function takes on a specified value.
Consider a concrete example. What are the angles \(\theta\) for which \(\tan\theta = 0.5\), or equivalently, solve for \(\theta = \arctan \frac{1}{2}\). One answer is 0.463647609 radians or 26.56505118° which lies in the first quadrant. But there is a second answer that lies in the third quadrant: 3.605240263 radians or 206.5650512°.
Moreover, each of these answers, when augmented by a full rotation of \(2\pi\) radians or 360° degrees is also a solution. Therefore, not only do we have two solutions, but we also have an infinity of solutions when we trace our way back from a trigonometric function to its argument or angle. But is there a unique answer at all?
Given the value of a trigonometric function, determining the corresponding angle is what an inverse trigonometric function does. But because the angle is non-unique, mathematicians have devised a convention to restore uniqueness by restricting its range, calling the result the principal value of the inverse trigonometric function. For example, the principal value of the \(\arctan\) function lies in \((-\frac{\pi}{2}, \frac{\pi}{2})\).
The angle \(\theta\) can take on an infinity of values. This non-uniqueness in the value of \(\theta\) is something we must never forget, especially when dealing with functions of complex variables and their inverses.
The Complex plane \(\mathbb{C}\)
The Euclidean plane may also be used to represent complex numbers, in which case it is sometimes called an Argand diagram. An arbitrary complex number \(z\) may be represented as a point on the two-dimensional complex plane \(\mathbb{C}\), as shown in Figure 3.
The horizontal axis represents the real part of the complex number and the vertical axis represents the imaginary part. Two equivalent representations are commonly used for complex numbers:
The Cartesian representation \(z = a + ib\), where \(i\) is the imaginary unit, and \(a, b \in \mathbb{R}\). When two complex numbers \(a + ib\) and \(c + id\) are added, their sum is \((a + c) + i(b + d)\), i.e., the real and imaginary parts are added separately.
The polar representation \(z = r(\cos\theta + i \sin\theta)\) is an equivalent representation for a complex number, where \(r = \sqrt{a^2 + b^2} = \lvert z \rvert\) and \(\theta = \arctan{\frac{b}{a}} = \arg z\). Here, \(\lvert z \rvert\) is called the modulus of \(z\)1 and \(\arg z\) is called the argument of \(z\).
Thus far, we have extrapolated to \(\mathbb{C}\) the development for ordered pairs on \(\mathbb{R}\). This is fine, but pedestrian, yielding no remarkable insights. The alchemy is yet to happen. For that, we need the magic sauce of Euler’s formula.
The Euler formula
The remarkable Euler formula is \[ e^{i\theta} = \cos \theta + i\sin\theta \qquad{(2)}\]
Don’t let its simplicity belie its power or impact.
The eminent Italian-French mathematician Joseph-Louis Lagrange called Euler’s formula \(e^{ix} = \cos x + i \sin x\) “one of the most beautiful discoveries in analysis made in this century,” [2]. The famous physicist, Richard Feynman, extolled it as “the most remarkable formula in mathematics… This is our jewel.” [3].
If you can spare the time to examine the formula, you will see that it unifies the trigonometric functions with the exponential function: something that could not have been guessed merely from their respective histories or applications. What is more, the imaginary unit sits smack dab in the centre. It is an equation so unlikely that it beggars the imagination.
Yet, one might claim—without exaggeration—that its consequences are all around us in this electrical age of digital communications, instant messaging, shared images, satellite navigation, etc. How did this equation facilitate such mind-boggling progress?
Gifts from Euler’s Formula
The first gift from Euler’s formula is that the polar form of the complex number facilitates multiplication. Let \(u = pe^{i\theta}\) and \(v = qe^{i\varphi}\). Their product \(uv\) is then \[ \begin{aligned} uv &= (pe^{i\theta})(qe^{i\varphi})\\ &= pq(e^{i\theta})( e^{i\varphi})\\ &= pq(e^{i(\theta+\varphi)})\\ &= we^{i\psi} \end{aligned} \] where \(w=pq\) and \(\psi = \theta + \varphi\). This means that the modulus of the product of two complex numbers is the product of their respective moduli and the argument of their product is the sum of their arguments, as illustrated in Figure 4. See my blog Varieties of Multiplication for a more detailed discussion.
The second gift from Euler’s formula follows on from the first. Multiplying a complex number by \(i\) rotates it by \(\frac{\pi}{2}\) radians counterclockwise on the complex plane. See the section rotation on the complex plane in my blog The Two Most Important Numbers: Zero and One for an explanation.
Logarithms of complex numbers
Most high school mathematics courses stop at the real-valued exponential and logarithmic functions. Indeed, the logarithms of complex numbers are either not taught at all at school or, if taught, usually gently glossed over. The fact that the complex logarithm is a different kettle of fish escapes most school-leavers. And books that devote enough time, rigour, and examples to this topic are not easy to come by.
Personally, I cannot claim much familiarity with the topic myself, and had to spend some time understanding matters from first principles, while I was researching for this blog.
Recapitulating, let \(z = a + ib\) be the Cartesian form of a non-zero complex number with \(a, b \in \mathbb{R}\). Its polar form is \(z = re^{i\theta}\) where \(r = \sqrt{a^2 + b^2}\) and \(\theta = \arctan\frac{b}{a}\). An alternative way to express \(z\) is the modulus-argument form, which is \(z = \lvert z \rvert e^{i \arg(z)} = re^{i\theta}\). It pays to be proficient in using any one of these three forms, and in being able to convert from one to the other with ease.
Let us keep in mind that the exponential and logarithmic functions are inverses of each other, and start with: \[ \begin{aligned} z &= e^{w}\; ; \; \text{take logarithms on both sides}\\ \ln z &= \ln \left[ e^w\right]\\ &= w\\ &= \ln\left(\lvert z \rvert e^{i \arg(z)}\right)\\ &= \ln[re^{i\theta}]\\ &= \ln[r] + \ln[e^{i\theta}]\\ &= \ln r + i\theta\\ &= u + iv. \end{aligned} \qquad{(3)}\]
When the logarithm of a complex number is expressed in Cartesian form, the real and imaginary parts are related so:
- the real part is the logarithm of the modulus of the original complex number: \[ \mathbb{Re}(\ln z) = \mathbb{Re}(w) = \ln \lvert z \rvert = \ln r = u; \] and
- the imaginary part is the argument of the original complex number: \[ \mathbb{Im}(\ln z) = \mathbb{Im}(w) = \arg(z) = \theta = v. \]
So far so good. But the argument or angle of \(z\), \(\arg(z)\), is non-unique because angles on a circle repeat themselves after each revolution. As with inverse trigonometric functions, we again invoke the idea of the principal value of the argument to overcome this ambiguity. If we denote the principal value of the argument of \(z\) by \(\mathrm{Arg} (z)\), we could write \[ \arg(z) = \mathrm{Arg}(z) + 2k\pi\; \text{ where } k \in \mathbb{Z} \text { and } \mathrm{Arg}(z) \in (-\pi, \pi]. \]
What does this mean geometrically or pictorially? The imaginary part of \(w\), which is \(v\), is not just \(\theta\) but really \(\theta + 2k\pi\) where \(k \in \mathbb{Z}\). The imaginary part of the complex logarithm \(w\) is not unique, but is actually a series of points that lie along a vertical line parallel to the imaginary axis, intersecting the real axis at \(u = \ln r\). This is illustrated in Figure 5.
This means that the complex logarithm of a single complex number \(z\) maps onto multiple complex numbers having the same modulus but different arguments, all differing by integer multiples of \(2\pi\) on the complex plane, as depicted in Figure 5:2 \[ \begin{aligned} \ln(z) &= w\\ &= \ln\left[re^{i(\theta+2k\pi)}\right]\; \text{where } k \in \mathbb{Z}\\ &= \ln r + \ln\left[e^{i(\theta + 2k\pi)}\right]\\ &= \ln r + i(\theta+2k\pi).\\ &= u + iv + i2k\pi. \end{aligned} \qquad{(4)}\]
This ambiguity makes the complex logarithm a multi-valued function, whose imaginary part is not unique. For the sake of convenience and to confer uniqueness, mathematicians define the principal value of a complex logarithm by constraining the principal value of \(\arg(z)\), denoted by \(\mathrm{Arg}(z)\) to lie in a restricted domain like \((-\pi, \pi]\).
Back to Problem One
Euler’s formula—Equation 2—offers a crafty way to inject complex numbers into problems involving real numbers like Equation 1. The hope is that the solution space may be sufficiently enlarged to afford a solution. But this will come at the expense of something: uniqueness will yield to a multi-valued perspective.
Instead of looking at \(1\) as a real number, one could view it as a complex number with a zero imaginary part: \[ \begin{aligned} 1 &= \cos 0 + i \sin 0\\ &= \cos(0 + 2k\pi) + i \sin(0 + 2k\pi)\; \text{ where } k \in \mathbb{Z} ; k \ne 0 \\ &= e^{i2k\pi}. \end{aligned} \]
We may then re-write Equation 1 as: \[ \begin{aligned} 1^{x} &= 4\\ (e^{i2k\pi})^{x} &= 4\\ e^{i2k\pi x} &= 4\; ; \;\text{ take natural logarithms on both sides}\\ \ln(e^{i2k\pi x}) &= \ln 4\\ x(i2k\pi) &= \ln 4\; ; \; k \ne 0\\ x &= \dfrac{\ln 4}{i2k\pi}\; ; \;\text{ multiply by } \frac{i}{i}\\ &= -\dfrac{i\ln 4}{2k\pi}\; \text{ where } k \in \mathbb{Z} \setminus \{0\}. \end{aligned} \]
Different solutions arise by assigning specific values to \(k\). Let us set \(k = 1\). We then have the solution \(x = -\frac{i \ln 4}{2\pi}\).
Is this answer correct? It depends on the viewpoint. If the multi-valued nature of the complex logarithm is understood, and we consider non-principal values, one at a time, our answers may be invested with meaning.
If one did not bother to distinguish the single-valued logarithm function for real values from the multi-valued logarithm function for complex values, the result would be confusion.
Since I work alone, I needed to sound out the larger mathematical community, especially professionals, to find out where this solution stands. Fortunately, there was another You Tube video that proposed a similar problem [4]. The accepted solution there [5] is consistent with the above development .
One other, non-human resource was available: Wolfram Alpha. I plugged in the solution above and asked for simplification/verification. The reader may verify the output under “Multivalued result”. It is to be noted that if \(k\) takes on other integer values, the results will be other powers of \(4\) as tabulated, but that is a nuance left unexplored here.
Problem Two
The second problem led me to a function whose name I had never heard before. It is, I believe a niche function, useful in special situations, but nowhere near as widespread as the mainstays like the trigonometric or exponential functions. It was an enticing enough problem to draw me to it. The facsimile screenshot is given below in Figure 7 and in Equation 5 \[ t^t = 7 \qquad{(5)}\]
Analytical solution
My first instinct on seeing the problem was to take logarithms and see where that led: \[ \begin{aligned} t^t &= 7\; ; \; \text{take logarithms}\\ t \ln t &= \ln 7 \end{aligned} \] It looks like we are getting nowhere.
Numerical solution
My second approach was to look at the equation carefully and guess the interval in which the solution would lie. We know that \(2^2 = 4 < 7 < 3^3 = 27\). So, \(t\) lies between two and three, and is closer to two than three.
I used the Qalculate program on my desktop to evaluate \(f(t) = t^t\). Because \(f(2.3) = 6.791 630 075 < 7\) and \(f(2.4) = 8.175 361 775 > 7\), the solution lies in the interval \([2.3,2.4]\).
A bash
script was written to compute
values of \(t^t\) and its difference
from \(7\), as tabulated below. These
values gave the insight that the solution lay in the tighter interval
\([2.315, 2.320]\), denoted by the
change in sign of \((t^t - 7)\).
t t^t (t^t - 7)
----------------------------------------
2.300 6.791630 -0.208370
2.305 6.854196 -0.145804
2.310 6.917412 -0.082588
2.315 6.981288 -0.018712
2.320 7.045829 0.045829
2.325 7.111044 0.111044
2.330 7.176940 0.176940
2.335 7.243524 0.243524
2.340 7.310803 0.310803
2.345 7.378787 0.378787
2.350 7.447482 0.447482
2.355 7.516897 0.516897
2.360 7.587039 0.587039
2.365 7.657917 0.657917
2.370 7.729539 0.729539
2.375 7.801913 0.801913
2.380 7.875047 0.875047
2.385 7.948951 0.948951
2.390 8.023632 1.023632
2.395 8.099099 1.099099
2.400 8.175362 1.175362It was tempting to use Typst for a better numerical estimate because it promised not only scripting but also tabular typesetting: two birds with one stone—compute the values and get them tabulated at one go. Alas, this approach was found to be foolhardy and abandoned, because not all languages are suited for heavy duty numerical computing. Moral of the story: do not use a fountain pen to dig a trench. Match your tools for the job.
Newton-Raphson method
The next logical step was to use a solid programming language like Python or Julia and employ a technique like Newton-Raphson to refine the solution further so that the error in \((t^t - 7)\) does not exceed, say, \(10^{-3}\).
For the Newton-Raphson method, we need to know the expression for both the function \(f(t)\) and its derivative \(f'(t)\). The method relies on a linear approximation to the function \(f(t)\) and uses the update rule [7]: \[ t_{n+1} = t_{n} - \frac{f(t_{n})}{f'(t_{n})}. \qquad{(6)}\]
How does one differentiate a function when the exponent is not a constant but a variable? As a general rule, invite either \(\exp\) or \(\ln\) to the rescue.
We proceed as follows:
Observe that \[ \begin{aligned} t^t &= e^{\ln (t^t)}\\ &= e^{t\ln t}. \end{aligned} \qquad{(7)}\]
Substitute \[ \begin{aligned} u &= t\ln t \end{aligned} \]
Then, \[ \begin{aligned} \frac{\mathrm{d}}{\mathrm{d}t}u &= \frac{\mathrm{d}}{\mathrm{d}t}\left[t\ln t\right]\\ &= \left[ \ln t + t\left[\frac{1}{t}\right]\right]\\ &= \left[ \ln t + 1\right] \end{aligned} \qquad{(8)}\]
Finally, \[ \begin{aligned} \frac{\mathrm{d}}{\mathrm{d}t}\left[ t^t\right] &= \frac{\mathrm{d}}{\mathrm{d}t}\left[e^{t\ln t}\right]\\ &= \frac{\mathrm{d}}{\mathrm{d}t}\left[e^u\right]\\ &= e^u\left[\frac{\mathrm{d}}{\mathrm{d}t}u\right]\\ &= e^{t\ln t}\left[\ln t + 1\right]\\ &= t^t\left[\ln t + 1\right] \end{aligned} \qquad{(9)}\]
Using scipy
The scipy software
suite is ideally suited for heavy duty numerical computing. It might be
overkill for our case, but it usually affords a single-line program that
does the job admirably. Let’s heave ho.
import numpy as np
from scipy import optimize
def f(x):
return x**x - 7 # One real root between 2.315 and 2.320
""" Solve for x^x = 7
Arguments:
f: x^x - 7
fprime: derivative of f(x) = x**x * (np.log(x) + 1)
estimate: estimated value of root
Returns:
root: desired solution for x
"""
estimate = 2.315
root = optimize.newton(f, estimate, fprime=lambda x: x**x * (np.log(x) + 1))
print(root)
print(f(root))A commented version of this short script is available as tt7.py. From this
script, it should now be clear why we needed to get the derivative of
the given function in closed form. When the script is executed, it
outputs two numbers:
2.3164549587856125
1.7763568394002505e-15
The first is the value of \(t\) that satisfies \(t^t = 7\), which is Equation 5. The second is the value of \((t^t - 7)\) at this value of \(t\)—it is an extremely small number about \(1.8 10^{-15}\). With these two numbers, we have effectively solved the problem. But there are two more approaches that I wish to pursue to exhaust the methods that have suggested themselves to me. We next look at plotting graphs and determining intersections.
Graphical approach
We may graph the function \(y = t^t\) and the line \(y = 7\) and find out their intersection to whatever degree of precision is available to us. Alternatively, we could also plot \((t^t - 7)\) and find its root or zero. Both will give us the same result, as illustrated in Figure 8, which was prepared using the Typst typesetting system.
Apart from reduced precision, the graphical approach is a good complement to the rough and ready estimation that the root lies between \(2\) and \(3\). A more precise estimate will necessitate numerical methods.
The Lambert W Function
What I did not contend with at first was that there was a special function—known to Johann Lambert and Euler—called the Lambert W function,3 that was tailor made for a problem like this [8]. I was eager to pursue this as the third line of enquiry but was dismayed to find that tables of the Lambert W Function [9] are not available as standard.
So, the Lambert W function approach, while technically elegant, is not necessarily convenient. For the sake of completeness though, this method is outlined below.
The Lambert W function [10], also known as the product logarithm, is a special function that is used to solve particular types of equations. It is denoted \(W(z)\), and is defined as the inverse of the function: \[ w \mapsto we^w\; ; \; w \in \mathbb{C} \] So by definition: \[ \begin{aligned} W(we^w) &= w\; ; \text{ and} \\ W(z)e^{W(z)} &= z \end{aligned} \] This means that for any (complex) number \(w\), the expression \(z = we^w\) maps to \(w\) under the Lambert W function. As with the complex logarithms, we are dealing with a multi-valued function and need to be careful in what we do and mean.
Because the definition of \(W\) can sound a bit detached, let us apply it to our case to better tether it.
\(t^t = 7\). Take logarithms of both sides noting that \(\ln a^b = b\ln a\).
We have \(t\ln t = \ln 7\). Recall that because the exponential and logarithmic functions are inverses, \(e^{\ln x} = x\).
Substituting \(t = e^{\ln t}\), we have \(e^{\ln t}(\ln t) = \ln 7\), which may be re-written as \[ \ln t e^{\ln t} = \ln 7 \qquad{(10)}\] which has the form \(we^w = z\) that is used to define the Lambert W function, with \(w = \ln t\) and \(z = \ln 7\).
We now apply the Lambert W function, which performs a sort of inverse operation because if \(we^w = z\), then \(w = W(z)\). So, \(w = \ln t = W(\ln 7) = W(z)\).
We have ended up with \(\ln t = W(\ln 7)\) and we only need to exponentiate both sides to get \[ t = e^{W(\ln 7)}. \qquad{(11)}\]
The Lambert W function finds application in many different scientific fields [8,11] but is not so commonly used as to be tabulated like trigonometric or logarithmic tables.4 We therefore have to rely on numerical computation, not unlike what we used in the previous section, but with a different rationale. I tend to veer toward
scipyin such cases, as it affords both convenience, and a terseness bordering on beauty:
import numpy as np
import scipy.special as sp
W_ln_7 = sp.lambertw(np.log(7), k=0)
print("W(ln 7) = ", W_ln_7)
t = np.exp(W_ln_7)
print("t = ", t)Three points merit explanation:
the natural logarithm is invoked by
np.log;the integer \(k=0\) denotes the principal value, since complex logarithms are involved; and
the result will be a complex number, although we expect its imaginary part (denoted by \(j\)) to be zero.
The program gives the results below, and as illustrated in Figure 9. The numbers check out and all is well with the world.5
W(ln 7) = (0.8400379820358972+0j)
t = (2.316454958785612+0j)
Problem Three: Exponential Towers
The third problem involves Equation 12 which is also illustrated in Figure 10. It equates to the number \(4\) the expression \(x\) raised to itself indefinitely: \[ x^{x^{x^{x^{x^{x^{x^{x^{x^{\cdot^{\cdot^{\cdot^\cdot}}}}}}}}}}} = 4 \qquad{(12)}\]
For obvious reasons, the left hand side (LHS) is an infinitely iterated exponential or exponential tower or a power tower. The dots at the end of the tower mean that the \(x\) values continue without end. Such an expression is formally called a tetration when the number of iterations is finite.
When I first came across Equation 12, I was merely intrigued by its form. A little pottering around the subject, however, revealed that:
Euler was familiar with such iterated exponentials;
there is a small real interval for which the expression converges to a real value; and
the Lambert W function may be used to establish the interval of convergence.
I had not expected such a serendipitous confluence of factors—all relating to \(e\)—from an equation whose mere form had aroused my curiosity. The interested reader is directed to online discussions for more details on the subject [12–14]. The infinite exponential tower converges to a real value for \(x\) in \([\frac{1}{e^e}, e^{\frac{1}{e}}] = [0.065988, 1.444668]\). I am in awe of the poetic beauty of the result: \(e\) to some power of \(e\) defines the interval of convergence!
One other preliminary: Donald Knuth introduced the up-arrow notation for repeated but finite exponentiation. Tetration, for example, is denoted by \(2 \uparrow\uparrow 4 = 2\uparrow (2\uparrow (2\uparrow 2))=2^{2^{2^{2}}}=2^{16}=65,536\). Note that exponentiation associates to the left: \(2^{3{^2}} = 2^{(3{^2})} = 2^9 = 512\).
Back to the problem. Is there a way to start? Because infinity is involved, removing or augmenting the topmost exponent from the tower will not diminish its value. Therefore the entire tower of exponents may be replaced by the value of the right hand side (RHS). We may therefore write, assuming convergence: \[ \begin{aligned} x^{x^{x^{x^{x^{x^{x^{x^{x^{\cdot^{\cdot^{\cdot^\cdot}}}}}}}}}}} &= 4\\ &= x^4\; ; \; \text{ transposing the constant}\\ x^4 - 4 &= 0\\ x^2 - 2^2 &= 0\\ (x^2 + 2)(x^2 - 2) &= 0\\ \end{aligned} \qquad{(13)}\] Following on from Equation 13 we may assert that
Factorizing: \((x^2 - 2) = (x - \sqrt{2})(x + \sqrt{2}) \implies x = \pm \sqrt{2}\).
Factorizing: \((x^2 + 2) = (x - i\sqrt{2})(x + i\sqrt{2}) \implies x = \pm i \sqrt{2}\).
The four solutions are: \(x = \pm\sqrt{2}\) and \(x =\pm i\sqrt{2}\). We will restrict ourselves to real solutions, which are the first two. Are they within the interval of convergence? We note that \(\sqrt{2} = 1.414213 < 1.444668 = e^{\frac{1}{e}}\). So, the only real solution is \(x = \sqrt{2}\), as shown in Figure 11:
Problem Four: Imaginary to Real
I would like to conclude with the equation \[ i^{-i} = \sqrt{e^\pi} \qquad{(14)}\] stated in the fifth section of the blog The Exponential and Logarithmic Functions.
Before that, I want to compute the logarithm of a negative real number, \(\ln(-1)\).6 We know that for real numbers, the logarithm maps \(\mathbb{R^{+}}\) to \(\mathbb{R}\). So, \(\ln(-1)\) makes a mockery of this function until we relax the conditions and treat \(\ln\) as the complex logarithm function.
Moreover, we have discovered from Figure 5 that a single complex exponential maps to multiple complex logarithms, but any single complex logarithm will map back only to a single complex exponential.
What value of \(\theta\) in \([0, \pi]\) will give \((-1)\) for the value of \(e^{i\theta}\)? The real part is \(-1\) which equals \(\cos\theta\) giving us \(\theta = \pi\). Moreover, \(\sin\pi= 0\) giving us a zero imaginary part as required. So, we my write \[ \begin{aligned} \ln(-1) &= \ln(e^{i\pi})\\ &= i\pi. \end{aligned} \qquad{(15)}\] So, \(\ln(-1) = i\pi\). How could the complex logarithm of a negative real number be purely imaginary? But, because Euler’s formula has worked its magic, that is simply how it is.
Now, a question arising from an afterthought. Is Equation 15 the only solution? By now, you should have grasped that every argument of a polar complex number may be augmented by \(2\pi k\), and the equation would still be valid. Therefore, the multi-valued, pedantically correct answer would be: \[ \begin{aligned} \ln(-1) &= \ln\left[e^{i(\pi + 2\pi k)}\right]\; ; \; k \in \mathbb{Z}\\ &= i(2k + 1)\pi. \end{aligned} \qquad{(16)}\] This result was known to Euler in 1739 after he developed his theory of complex logarithms [2].
Now for Equation 14. The angles \(0, \frac{\pi}{2}, \pi, \frac{3\pi}{2},\) and \(\pi\) are nodal on the four quadrants of the complex plane and in the Euler formula. Can you hazard a guess what value of \(\theta\) will evaluate to \(i\)? The Cartesian point \((0, 1)\) on the complex plane corresponds to \((1, \frac{\pi}{2})\) in polar form. So, \(i = e^{i \frac{\pi}{2}}\) where we are taking the principal value. Let us use this in Equation 14 where \(e^z\) is written as \(\exp(z)\) to avoid double superscripts: \[ \begin{aligned} i^{-i} &= \exp\left[i \frac{\pi}{2}\right]^{-i}\; ; \; \text{take logarithms on both sides}\\ \ln \left(i^{-i}\right) &= \ln\left(\exp\left[i \frac{\pi}{2}\right]\right)^{-i}\\ &= -i\left[i\frac{\pi}{2}\right]\; ; \; \text{note that $i(-i) = 1$}\\ &= \frac{\pi}{2}\; ; \; \text{take exponentials on both sides}\\ \exp\left[\ln\left(i^{-i}\right)\right] &= \exp\left[\frac{\pi}{2}\right]\\ i^{-i} &= e^\frac{\pi}{2}\\ &= \left[ e^{\pi}\right]^{\frac{1}{2}}\\ &= \sqrt{e^{\pi}} \end{aligned} \] and we are done. The solution is illustrated in Figure 12.
To explore further
If you have found the foregoing a foreign language altogether, here are some alternative expositions that could ease your understanding.
Books and Online Posts
The online Libre Text Complex Variables with Applications by Jeremy Orloff [15] gives a clear account of complex logarithms, illustrated with examples.
The Wikipedia article on complex logarithms [16] is freely available online and has numerous illustrations, examples, and references.
YouTube videos
Steve Brunton’s lecture on the Complex Logarithm. It is a little long, but is clear, well-paced, authoritative, and goes beyond the scope of this blog [17].
A short, crisp, but complete YouTube video on the complex logarithm function by TheMathCoach is worth watching [18].
Another snappy but clear video on complex logarithms that is worth watching is by Xander Gouws [19].
Epilogue
This is my first blog in which all the figures have been generated using the Typst typesetting engine. It has been an exciting learning experience that has yielded rich and early rewards. If you are interested, and like what you see, do give Typst a spin.
Acknowledgements
To the creators of and contributors to Typst, my heartfelt thanks. And also to Wolfram Alpha for their free online resources. My deepest appreciation also to all those who have made SciPy possible.
Feedback
Please email me your comments and corrections.
A PDF version of this article is available for download here:
References
Not to be confused with modulo operations and remainders, or with clock arithmetic; this usage may be thought of as the absolute value of the complex number or the Euclidean distance of the complex number from the origin.↩︎
Although the numbers \(\xi\), and \(u\) and \(iv\) are shown sharing common axes, this is not an accurate representation. One is the input; the other the output. There should properly be two sets of axes: one for the “\(\xi\) space” and another for the “\(u + iv\) space”. Scarcity of space has necessitated this “hybrid” figure.↩︎
Lambert died of tuberculosis at the young age of 49. He made many contributions to mathematics, cartography, optics, etc., and was the first to prove that \(\pi\) is irrational.↩︎
I have since become aware of an online Lambert function calculator at a website worth visitng.↩︎
We will not here explore the existence or validity of complex solutions.↩︎
These final problems will definitely be relaxing, compared to the previous ones.↩︎