The Lambert function [1783] is a less known function which has a lot of nice applications in sciences. This post presents its application in Biochemistry and Physical Chemistry in real situations.
The Lambert function is defined as follow:
It is a multi-valued function with two real branches and . The figure below shows the real valued direct function and its inverses functions (real branches of Lambert function).

The Lambert function is also referenced as Product Log in some articles and softwares.
Michaelis-Menten
It can be shown [1997] that the Michaelis-Menten equation can lead to an analytical solution using the Lambert function. Given the Michaelis-Menten equation:
It is a separable ordinary differential equation (ODE), we can solve it explicitly for :
It goes as follow:
This is where the Lambert function becomes useful, it allows us to isolate . First we rewrite the equation such as the LHS has the form of the Lambert definition:
Then we simply apply the definition of the Lambert function:
Which is the analytical solution of the Michaelis-Menten equation.
Numerical solution
The Michaelis-Menten ODE can be solved numerically using Python and scipy for a given set of parameters and initial condition:
import numpy as np
from scipy import special, integrate, optimize
import matplotlib.pyplot as plt
K_M = 1e-3
v_max = 1e-4
def system(t, S, K_M, v_max):
return np.array([
- v_max * S[0] / (K_M + S[0])
])
t = np.linspace(0, 300, 200)
S0 = 1e-2
solution = integrate.solve_ivp(system, [t[0], t[-1]], [S0], t_eval=t, args=(K_M, v_max))
S = solution.y[0,:]
Now we can recover this parameters and initial condition by fitting the ODE solution using the analytical function found above:
def model(t, K_M, v_max, S_0):
return np.real(K_M * special.lambertw((S_0 / K_M) * np.exp((- v_max * t + S_0) / K_M), 0))
popt, pcov = optimize.curve_fit(model, t, S)
Shat = model(t, *popt)
We can show that both model numerically agree:

Analytical solution
The Michaelis-Menten ODE can be solved analytically using Computer Algebra System (CAS) such as Python and sympy package:
import sympy as sp
K = sp.Symbol("K", real=True, positive=True)
v = sp.Symbol("v", real=True, positive=True)
S0 = sp.Symbol("S0", real=True, positive=True)
t = sp.Symbol("t", real=True)
S = sp.Function("S")
equation = sp.Eq(sp.Derivative(S(t), t), - v * S(t) / (K + S(t)))
sp.dsolve(equation, ics={S(0): S0})
Which returns the above found function:
It can also be confirmed using Wolfram CAS.
Heterogeneous Catalysis
With the assumption of the Langmuir Adsorption model, for a competitive heterogeneous catalysis such as deshydrogenation of isopropanol in presence of Raney’s Nickel catalyst. A typical ODE model of the reaction coordinate is:
Where and are constants of the experimental setup and and are reaction constants, respectively the molar kinetic constant and the adsorption affinity constant ratio of product and reactant.
This ODE is separable:
Integration w.r.t. initial conditions leads to:
Which is an explicit function . For the equation is easily invertible. For , it is also invertible by the mean of the Lambert function, it is then possible to get an analytical form of in both cases.
Recalling that , it requires a bit of algebra to show that:
Now we apply the following property (see next section):
To get the expression of the reaction coordinate:
The solution of the original ODE is then:
Numerical Solution
We first solve the ODE system with scipy:
kp = 1e-3 * 200e-3
a = 70.
n0 = 2.5
def system(t, xi, kp, a, n0):
return np.array([
kp * (1. / (1. + a * xi[0] / (n0 - xi[0])))
])
t = np.linspace(0, 8000, 200)
solution = integrate.solve_ivp(system, [t[0], t[-1]], [0], t_eval=t, args=(kp, a, n0), method="LSODA")
xi = solution.y[0,:]
From the solution, we can derive parameters using Non Linear Least Square (NLLS):
def model(t, kp, a, n0):
if np.abs(a - 1.) <= 1e-8:
return n0 * (1. - np.exp(- kp * t / n0))
else:
return np.real(n0 * (1. - a / (1 - a) * special.lambertw(np.exp((1 - a - n0 * kp * t) / a) / (a / (1 - a)), 0)))
popt, pcov = optimize.curve_fit(model, t, xi, [1e-3, 1e2, 1.], bounds=[[0.] * 3, [np.inf] * 3])
xihat = model(t, *popt)
It required some fine tuning such as genuinely choosing the initial parameters and fixing bounds. Both solutions numerically agree:

Analytical solution
We can confirm our calculations using Python and sympy:
t = sp.Symbol("t", real=True, positive=True)
k = sp.Symbol("k", real=True, positive=True)
a = sp.Symbol("a", real=True, positive=True)
n0 = sp.Symbol("n0", real=True, positive=True)
x = sp.Function("x")
equation = sp.Eq(
sp.Derivative(x(t), t),
k * (1 / (1 + a * x(t) / (n0 - x(t))))
)
sp.dsolve(equation, ics={x(0): 0})
sol.rhs.limit(a, 1)
Which returns an equivalent solution:
And properly converges to the degenerated solution when taking the limit :
Verification with Wolfram CAS gives same results.
Properties
Proof
Given the following equation:
We take the -th root:
Dividing booth side by :
Finally applying the Lambert definition, we get:
Which leads to the desired property:
Origin
Another useful property is the following identify which holds for :
And is trivial to show just by applying the Lambert definition to . At the limit of zero, it diverges, one can show that:
And:
The following limits involves indeterminate forms of , they can be reduced by using the l’Hospital rule and the derivative formula of the Lambert function:
This property ensures that the solution actually pass by the origin as required by the initial conditions.
Conclusions
We showed through applied chemistry examples that the Lambert function can provide analytical solution to common ODE systems.
The Lambert function comes into play after the integration part when it needs to get the inverse function of moderately complex expressions. The trick is always the same, performing algebra to express the product and then applying the Lambert function.
We also showed that Python equipped with scipy is an useful package to numerically solve the ODE or to implement regression of curves involving the Lambert function and that Python equipped with sympy package is helpful in solving the ODE and doing the necessary algebra to apply the Lambert function.
Just as the logarithm function is, the Lambert function is a useful addition to the analyst’s toolkit.