Have you ever heard of a mathematical function called the Lambert function? If not, this is an interesting function that may come in handy in some applications. To understand it, let us consider the following example
and ask ourselves can we express or solve the above equation for variable and given i.e., ? At first glance, it may feel simple, but then we will realize that the term is outside and inside the exponential function and cannot be separated. The question is, is it at all possible?
The answer is yes, and that function is the Lambert function. For real and the solution for exists if and only if . More specifically,
For the case of complex variables refer.
We will solve one equation which can sometimes can come in handy and whose solution involves Lambert function in the solution. We solve for in the following equation:
and assume . For other cases it can be solved without having to invoke Lambert function. Now we solve with sequence of steps as follows:
One of the applications of the Lambert function occurs in the field of communications. Consider a simple example: the following is the Shannon capacity expression for AWGN (additive white Gaussian noise) channel
where is the capacity, is the Bandwidth, and is the normalized signal-to-noise ratio (SNR). What is the required for given and ? Here as well, the term is outside and inside the logarithmic function. Before we provide solution for this problem consider a related simplified version of the problem,
Let to solve
One can show that after some mathematical manipulations, that can be rewritten in terms of using the Lambert function as follows:
and this holds when the condition that holds, which is indeed always true. However, some times the solution may not be desirable in that situation solution doesn’t exist. For example, if the requirement is that has to be positive then for solution to exist .
Now we can solve the initial problem which we intended to solve i.e., to solve for in terms of other variables. The solution exists if . Then we can obtain the solution in closed form and it is obtained by utilizing the above result and substituting: and
Following is the MATLAB code snippet which we can use to test the above expression
clc;
clear;
rho = 2;
B = 1e3;
C = B*log2(1 + rho/B);
k = (C/rho)*log(2);
z = (-k)/(k + lambertw(-1,-k*exp(-k)));
Bcheck = z*rho;
Code results:
>> B
B =
1000
>> Bcheck
Bcheck =
1000.0000
Another application in the wireless domain where the Lambert function comes into play is obtaining closed-form expression for maximizing energy efficiency with respect to power () i.e., maximizing the following expression
where is the pathloss parameter, is noise power spectral density, amplifier efficiency and is the circuit power. All variables are constant except . If carefully derived, the optimal solution involves the Lambert function.
On a side note, strictly speaking, Lambert is not a closed-form function because this function cannot be represented in terms of elementary functions. We can think of it as another function similar to Q-function or Gamma function.