Return to Article Details Power series for the half width of the Voigt function, rederived

Power series for the half width
of the Voigt function, rederived

Joachim Wuttke
(Date: November 05, 2025; accepted: November 21, 2025; published online: December 15, 2025.)
Abstract.

The Voigt function is the convolution of a Gaussian and a Lorentzian. We rederive power series for its half width at half maximum for the limiting cases of near-Gaussian and near-Lorentzian line shapes. We thereby provide independent verification and slight corrections of the expansion coefficients reported by Wang et al (2022). Results are used in our implementation of function voigt_hwhm in the open-source library libcerf.

Key words and phrases:
Voigt function, Faddeeva function, Maclaurin series, asymptotic series, high-precision computation
2005 Mathematics Subject Classification:
33C15, 41A58, 33-04
Forschungszentrum Jülich GmbH, JCNS at MLZ, Garching, Germany
j.wuttke@fz-juelich.de, ORCID 0000-0002-4028-1447

1. Introduction

The Voigt [8] function is the convolution of a Gaussian and a Lorentzian [5, 7.19.1]. It is frequently used to describe peak shapes in spectroscopy and diffraction. In such applications, it is customary to characterize peaks by their full or half width at half maximum (fwhm, hwhm).

Much work has been devoted to numerical approximations of the Voigt function and its half width. For most applications, considering experimental uncertainties, quite simple approximations would do. Nonetheless, for internal consistency and reproducibility of data analyses, to facilitate numerical differentiation (e.g., in fitting routines), and out of pure mathematical interest, it is worthwhile to push approximations to ever better accuracy.

The Voigt function can be expressed through the Faddeeva function, which is closely related to the complex error function. Therefore, our open-source complex error function library libcerf [4] also provides functions voigt and voigt_hwhm. Earlier versions of libcerf computed voigt_hwhm very directly by bisection on function values of voigt. Starting with release 3.3, a completely new implementation of voigt_hwhm uses series expansions for the near-Gaussian and near-Lorentzian limiting cases, and piecewise Chebyshev interpolation [10] in between. Near machine accuracy is achieved in each region. This paper documents the two series expansions.

The same series have recently been studied by Wang et al [9]. Here, we rederive them in different ways and thereby provide independent verification and slight corrections for the coefficients tabulated in [9]. For the near-Gaussian case, our derivation (Section 3) is more compact, as we use complex notation and represent the Voigt function through the Faddeeva function instead of decomposing it as in [9, Eq 9]. For the near-Lorentzian case, Wang et al chose a pragmatic method: numerical differentiation, followed by rounding to integer numerators [9, Appendix B]. Here (Section 4), we derive a fully algebraic recursion.

2. Foundations

2.1. Voigt function

The Voigt function

(1) V(q;σ,γ)dpG(p;σ)L(qp;γ)

is the convolution of a normalized Gaussian with standard deviation σ

(2) G(q;σ)12πσexp(q22σ2)

and a normalized Lorentzian with half width γ

(3) L(q;γ)γπ(γ2+q2).

As G and L are even functions of σ and γ, so is V. Therefore in the following we will only consider σ,γ0. Otherwise said, we will simply write σ and γ instead of their absolute values.

2.2. Half width

Function H(σ,γ) is the half width at half maximum of the Voigt function. It is implicitly defined by

(4) V(H(σ,γ);σ,γ)=12V(0;σ,γ).

Or, introduce the reduced Voigt function

(5) v(q;σ,γ)V(q;σ,γ)V(0;σ,γ),

and its inverse function v1 with respect to the first argument, such that

(6) v(q;σ,γ)=yv1(y;σ,γ)=q.

Then we have simply

(7) H(σ,γ)=v1(12;σ,γ).

2.3. Scaling

For real α0, the Voigt function scales as

(8) V(αq;ασ,αγ)=1αV(q;σ,γ).

The reduced Voigt function scales accordingly as

(9) v(αq;ασ,αγ)=v(q;σ,γ),

and its inverse as

(10) v1(y;ασ,αγ)=αv1(y;σ,γ).

This implies for the half width

(11) H(ασ,αγ)=αH(σ,γ).

The homogeneity of degree 1 implies that we only need to study a function of one real variable σ/γ or γ/σ.

2.4. Relation to the Faddeeva function

Given the error function

(12) erf(z)2π0zdtet2,

the complementary error function

(13) erfc(z) 1erf(z)
(14) =2πzdtet2,

and the underflow-compensated complementary error function

(15) erfcx(z)ez2erfc(z),

the Faddeeva function is [5, 7.2.3]

(16) w(z) =erfcx(iz)
(17) =ez2erfc(iz)
(18) =ez22πizdtet2
(19) =ez2(12π0izdtet2)
(20) =ez2(1+i2π0zdtet2).

Another integral representation, valid for Imz>0, is [5, 7.7.2]

(21) w(z)=iπ+dtet2zt.

Let us define uRew and vImw so that

(22) w(z)u(z)+iv(z).

The real part of Eq. 21 is

(23) u(x+iy)=yπ+dtet2(xt)2+y2,

which is essentially Voigt’s convolution integral Eq. 1. Divide t, x, and y by 2σ to find

(24) V(q;σ,γ)=12πσu(q2σ+iγ2σ).

Accordingly, the Voigt half width is implicitly defined by a functional equation that involves the real part of Faddeeva’s function,

(25) u(H(σ,γ)2σ+iγ2σ)=12u(iγ2σ).

3. Near-Gaussian case 𝜸𝝈

3.1. Case 𝜸=𝟎

In the case γ=0, the Voigt function is just a Gaussian with standard deviation σ. With a real argument z=x, the real part of Eq. 20 is simply

(26) u(x)=ex2.

The implicit equation Eq. 25 is solved by the well-known

(27) H(σ,0)=2ln2σ.

3.2. Rescaled function 𝒇

We now consider the case of a relatively small Lorentzian width, γσ. Thanks to the scaling property Eq. 11, the half width of the Voigt function can be computed as

(28) H(σ,γ)=σH(1,γ/σ).

For later convenience, we introduce the reduced variable

(29) tγ2σ

so that

(30) H(σ,γ)=σH(1,2t).

We define the function

(31) f(t)H(1,2t)H(1,0)2+it

and the constant

(32) ηH(1,0)2=ln2

so that H(σ,γ) can be obtained via Eq. 30 and

(33) H(1,2t)=2(η+f(t)it).

Below, we will determine a series expansion for f(t), so that we can ultimately compute the Voigt width using

(34) H(1,2t)=2(η+n=1(Refn)tn).

3.3. Power series in 𝒕 and 𝒇

In Eq. 25, choose σ=1 and γ=2t. then use Eq. 30 and Eq. 33 to obtain an implicit equation for f,

(35) u(η+f(t))=12u(it).

On the right-hand side, use the Maclaurin expansion of w(z) [5, 7.6.3] to obtain

(36) u(it)=n=0(t)nΓ(n2+1).

On the left-hand side of Eq. 35, use the Taylor expansion

(37) u(η+f(t))=Ren=0wnf(t)n

with coefficients

(38) wnw(n)(η)n!

given by the recursion [5, 7.10.3] [7, Eq 10]

(39) wn=2n(ηwn1+wn2)

with starting values w0w(η) and w1i/π.

Combine Eqs. 35, 36 and 37, and omit terms in t0, to obtain an equation that relates the power series in t and in f,

(40) 12n=1(t)nΓ(n2+1)=n=1Rewnf(t)n.

3.4. Recursive solution

To solve Eq. 40 numerically, function f(t) shall be expressed as a power series in t. Since f(0)=0 by construction Eq. 31, the power series starts with the linear term,

(41) f(t)n=1fntn.

Per Eq. 31, the fn are real for n>1; only for n=1 there is an imaginary part, per the definition Eq. 31, so that

(42) Imfn=δn1.

With notation from [3], write [tN]f(t) for the coefficient of tN in the power series representing f(t). For the series Eq. 41, [tN]f(t)=fN. Define

(43) FN,n[tN]f(t)n,

and apply the operator [tN] to both sides of Eq. 40:

(44) (1)N2Γ(N2+1)=n=1NRewnFN,n

for all N1.

Equations Eqs. 44, 43 and 41 fully determine the fn in terms of the wn, which are given by the recursion Eq. 39. We resolve said equations in two steps. First, we solve Eq. 44 for FN,1. For N=1, we recall Eq. 42 to obtain

(45) F1,1=(Rew1)1(Imw112Γ(32))+i.

For N>1,

(46) FN,1=(Rew1)1((1)N2Γ(N2+1)n=2NRewnFN,n).

Second, we use Eq. 41 to obtain the FN,n for n>1:

(47) FN,n=m=1Nn+1Fm,1FNm,n1.

Finally, we note that the coefficients of Eq. 41 are fNFN,1. This completes our derivation of a power series for the half width H.

To minimize the number of computational operations in the highly optimized code of libcerf, we write Eqs. 28 and 34 as

(48) H(σ,γ)=σ2ln2+γn=0Ncutcn(γσ)n

with precomputed coefficients

(49) cnRefn+12n.

3.5. Implementation

A Python script near_gauss.py used to generate coefficients is preserved in subdirectory dev/voigt of the libcerf source repository. The script uses the arbitrary-precision math library mpmath [6] with a fixed internal precision, checked against a computation with some more digits. It turns out that an internal precision of 40 decimal digits is needed to compute fn for n<32 with 32 reliable decimal digits. The program executes within a fraction of a second.

The recursive forward computation of wn according to Eq. 39 would be divergent if η had a positive imaginary part [7]. In our case, η is real so that we are at the margin of numerical instability. Indeed, our computations show that up to n=30 only the last few decimal digits get incorrect. Nonetheless, our script validates each wn against a non-recursive computation, derived in the Appendix.

3.6. Results

f1=8.325546111576977563531646448952101+if2=5.3254711842961210323020845059416101f3=1.3603423870145348659601346974136101f4=6.3839925995348583105863651935208103f5=7.5882994178697868047017954181619103f6=7.5685451134845100193553849814044104f7=6.4174309726033170181322853645455104f8=1.0278614365257442345642575963235105f9=6.6864392638387619203117167133824105f10=1.8800729899141457354675112660009105f11=9.3901358253570724565409358708571106f12=5.4149990265667553408636905696295106f13=1.2862976252461744893956942201673106f14=1.0759168918380548822306060203341106f15=7.8733635964790862989086501951507108f16=1.9255725519174188542320412973488107f17=2.5308903977393059634088084205148108f18=3.3104307709547517055285672959576108f19=1.1821070040002130133075915099552108f20=5.0020607880755762331999675884955109f21=3.2040951850692659104678394048668109f22=4.92767215080129162162906093605741010f23=7.13522461047254486818364234748521010f24=3.2407999521373985008284717584509¯1011f25=1.4010883014409870068385079612875¯1010f26=3.3772678382910580581437551000254¯1011f27=2.3680267709337763087056901649239¯1011f28=1.1462686830707711798806492528473¯1011f29=3.0039670443183376826912340278726¯1012f30=2.9478889614035047804083367602927¯1012f31=9.7467646700490397869815620681195¯1014

Table 1. Coefficients fn of the series Eq. 41 that can be used according to Eq. 33 for computing the half width H(σ,γ) in the near-Gaussian case of γσ. Digits that deviate from [9, Table A1] are underlined. Agreement through n=22 confirms essential correctness of both their work and ours.

Resulting coefficients fn up to n=30 are reported in Table 1 with 32 digits precision. Up to n=22, they fully agree with [9, Table A1]. Then, suddenly, the agreement drops to 12 digits for f23, and further decreases to 7 digits for f30. Given that our algorithm is simpler than the one of [9] and that we cross-checked our results with different internal accuracies we are confident that all digits reported in Table 1 are correct.

4. Near-Lorentzian case 𝝈𝜸

4.1. Case 𝝈=𝟎

For a pure Lorentzian, V(q;0,γ)=L(q;γ), the half width is just H(0,γ)=γ.

4.2. Rescaled function 𝒈

We now consider the case of a relatively small Gaussian width, σγ. Thanks to the scaling property Eq. 11, the half width of the Voigt function can be computed as

(50) H(σ,γ)=γH(σ/γ,1).

For later convenience, we introduce a reduced variable

(51) sσ2/γ2

and a real function

(52) g(s)H(s,1)1=H(σ/γ,1)1=H(σ,γ)γγ

that is to be determined so that we ultimately obtain the Voigt half width as

(53) H(σ,γ)=γ(1+g(σ2/γ2)).

In this notation, the implicit definition Eq. 25 of H can be written as

(54) 2u(1+g(s)+i2s)u(i2s)=0,

which needs to be resolved for g.

For large |z|, the Faddeeva function can be computed from its asymptotic expansion [1, p. 14]

(55) w(z)=iπn=0Nan2nz2n+1+RN(z)

with the abbreviation

(56) an2nπΓ(n+1/2)=(2n)!2nn!=(2n1)!!.

The remainder |RN| is no larger than the first term omitted from the sum. Drop the explicit notation of truncation, and apply Eq. 55 to Eq. 54,

(57) 0Imn=0an2n{2(2s1+g+i)2n+1(2si)2n+1}.

Factor out (2s)n, and drop a common factor 2s:

(58) 0Imn=0an{2(11+g+i)2n+1(1i)2n+1}sn.

Binomial expansion:

(59) 0Imn=0an{2(11+i)2n+1k=0(2n+kk)(g1+i)k(1i)2n+1}sn.

As an, s, g are all real, the only complex quantity here is the imaginary unit i.

We precompute

(60) (1)kIm(11+i)2n+k+1=ψ2n+k44(2n+k)/4,

where ψk is an integer function with period 8, given by

(61) (ψ0,ψ1,,ψ7)(2,2,1,0,2,2,1,0).

Multiply Eq. 59 by 2 and use Eq. 60 to obtain

(62) 0n=0an{k=0bn,kgk2(1)n}sn.

with the rational function

(63) bn,k(2n+kk)ψ2n+k4(2n+k)/4.

4.3. Solution

We seek a solution in form of a power series

(64) g(s)=j=1gjsj.

As in Section 3.4, write [sn]f for the coefficient of sn in a power series representing f(s). Apply the operator [sn] to Eq. 62:

(65) 0m=0am{(bm,02(1)m)+[snm]k=1bm,kgk}.

Define

(66) GN,m[sN]gm.

Restrict the sums to non-zero terms, using the fact that g(s) per Eq. 64 has no s0 term:

(67) 0an(bn,02(1)n)+m=0namk=1nmbm,kGnm,k.

The only linear occurrence of gnGn,1 is in the m=0,k=1 term, with prefactor a0b0,1=2. Isolating that contribution gives the recurrence

(68) Gn,1=12{an(bn,02(1)n)+m=0namk=1+δm0nmbm,kGnm,k}.

The recurrence starts from

(69) G1,1=a1(b1,0+2)2=32.

Coefficients Gn,k with 1<kn can be computed by another recursion, as in Eq. 47 of Section 3.4,

(70) Gn,k=j=1nk+1Gj,1Gnj,k1.

While the coefficients a,c in Eq. 68 are integers, the b are rational numbers with denominators that are powers of 2. Therefore the gnGn,1 must also be rational numbers, and their denominators powers of 2.

4.4. Implementation

A Python script near_lorentz.py used to generate coefficients is preserved in subdirectory dev/voigt of the libcerf source repository. The script employs the Python library Fraction to compute exact rational numbers using long-integer arithmetics.

4.5. Results

g0=1/20=1.g1=3/21=1.5g2=21/23=2.625g3=183/24=11.4375g4=10413/27=81.3515625g5=198477/28=775.30078125g6=9070497/210=8857.9072265625g7=241045983/211=117698.2338867187g8=58945112829/215=1798862.085845947g9=2038148025489/216=31099670.79908752g10=156915708321627/218=598585923.4681205g11=6654666968153361/219=12692769943.52981g12=1234122510349636713/222=294237735354.8137g13=62113630324702350897/223=7404521742427.628g14=6745007796528337910073/225=201016896859655.9g15=393001502942654465122863/226=5856178744772888.
Table 2. Coefficients gn of the asymptotic expansion Eq. 64 that can be used according to Eq. 53 for computing the half width H(σ,γ) in the near-Lorentzian case of σγ. Based on these gn, we can confirm the T2n of [9, Table A2] except for n=15, as discussed in Section 4.5.

The expansion coefficients gn are reported in Table 2. The ratio of consecutive coefficients is shown as log|gn/gn1| versus n in Figure 1, which indicates that the |gn| grow faster than a power law. In consequence, Eq. 64 is an asymptotic series, as was noted by Wang et al [9], and was to be expected from the asymptotic expansion Eq. 55 used for w(z).

Refer to caption

Figure 1. Absolute value of the ratio of consecutive coefficients, |gn/gn1|, shown on a logarithmic scale against n. The ratio appears to grow slowly beyond all limits.

Wang et al expanded squared half widths in a series [9, Eq A30] that reads in our notation

(71) (H(σ,γ)γ)2=n=0Tn(σ2γ)=n=0Tn(s2).

They computed rational numbers Tn by approximating floating-point numbers obtained from numerical differentiation [9, Eq A31]. For odd n, they found Tn=0, consistent with our Eqs. 53 and 64. To validate their results for even n, we recompute T2m as

(72) T2m=[(s2)m](H(σ,γ)γ)2=2m[sm](1+g(s))2.

We define g01 so that we are left with a self-convolution

(73) T2m=2m[sm](k=0gksk)2=2mk=0mgkgmk.

With rational arithmetics based on our gk as shown in Table 2, we confirm the T2m of [9, Table A2] except for their T30=176955754371862947/219, which is too large by 3/220; the correct result is 353911508743725891/220.

Appendix. Closed expression for 𝒘𝒏

As the recursion Eq. 39 is marginally unstable, it may be preferable to compute wn from a closed expression, or at least use the direct computation as a cross-check. With Eqs. 38 and 17,

(74) wn=1n!dnd(iz)2e(iz)2erfc(iz).

With [5, 7.18.4], [2, 2.23], and with the notation inerfc [5, 7.18.2] for the iterated integral of erfc,

(75) wn=in2ne(iz)2inerfc(iz).

With [5, 7.18.11],

(76) wn=in2n2n1πez2/2U(n+1/2,i2z).

The parabolic cylinder function U [5, Chapter 12] is provided by mpmath as the function pcfu. Internally, mpmath computes it by means of hypergeometric functions.

References