5
$\begingroup$

I have a Gaussian and a Lorentzian function here;

gd[v_] = Sqrt[(4*Log[2]/Pi)]*(1/Dw)*Exp[-4*Log[2]*((v - v0)/Dw)^2]
gl[v_] = (Lw/2/Pi)/((v - v0)^2 + (Lw/2)^2);

I want to get a Voigt function by using the convolution of the above two functions,

Voi[v_] = Integrate[gd[v']*gl[v' - v], {v', -Infinity, Infinity}]

but it just returns the input,

So, how to do this convolution in Mathematica?

$\endgroup$
  • 3
    $\begingroup$ Why don't you use VoigtDistribution[ lorentzwidth, gaussianwidth ], which is a built-in function? This convolution has not an analytical formula, and it is difficult to evaluate numerically. It is pretty much studied, since it appears in several contexts, in particular in astrophysics and x-ray spectroscopy. $\endgroup$ – Vito Vanin Nov 30 '17 at 16:31
7
$\begingroup$

It seems, that MMA can't do that integral analytically (working with Version 8.0). Also Convolvedidn't do the job.

Do it numerically. By the way, don't use v', because it is interpreted as Derivative and regard, the correct definition is gl[v - vs, v0, Lw], not vs-v.

gd[v_, v0_, Dw_] = 
   Sqrt[(4*Log[2]/Pi)]*(1/Dw)*Exp[-4*Log[2]*((v - v0)/Dw)^2];

gl[v_, v0_, Lw_] = (Lw/2/Pi)/((v - v0)^2 + (Lw/2)^2);

Voi[v_, v0_, Dw_, Lw_] := 
    NIntegrate[gd[vs, v0, Dw]*gl[v - vs, v0, Lw], {vs, -Infinity, Infinity}]

Plot[{gd[v, 1, 2], gl[v, 1, 1/2], Voi[v, 1, 2, 1/2]}, {v, -5, 5}, 
   PlotRange -> All, PlotStyle -> {Green, Blue, Red}]

enter image description here

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.