1
$\begingroup$

I am trying to calculate the principal value integral - $$I = P\int_{-\infty}^{\infty}\frac{g(x)}{y-x}dx$$ where $$g(x) = f_{1}(x) - f_2(x)$$ $$ f_i(x) = \frac{1}{1+e^{\beta_{i}(x-\mu_{i})}} $$ $$y = 200*1.6*10^{-19}$$ $$ \beta_{1} = \beta_2 = \frac{1}{kT} = 2.5*10^{17} $$ $$\mu_1 = 300 * 1.6*10^{-19} $$ $$\mu_2 = 0$$

According to this paper (arxiv),

the integral $I$ should be, $$I = \Re[\Psi(w_2) - \Psi(w_1)]$$ where $\Psi(z)$ is the digamma function and $w_i = 0.5 + i\beta_i(y-\mu_i)/2\pi$.

But when I use Integrate to calculate the principal value, it gives me the output as an expression -

Integrate[(1/(1 + E^(2.5*10^17 (-4.8*10^-17 + en))) - 1/(1 + E^(2.5*10^17 (0. + en))))/(-3.2*10^-17 + en), {en, -\[Infinity], \[Infinity]}, PrincipalValue -> True]

I have had no luck with using finite limits either. The output then is simply 'infinite expression $\frac{1}{0}$' and 'indeterminate expression' errors.

My code -

fPlus[x_, mu_, kT_] := If[(kT == 0) && (x > mu), 0, If[((kT == 0) && (x <= mu)), 1, 1/(1 + Exp[(x - mu)/kT])]];

eV = 1.6*^-19;
mu1 = 300*eV;
mu2 = 0*eV;
kT = 25*eV;
y = 200*eV;

func[en_] := (fPlus[en, mu1, kT] - fPlus[en, mu2, kT])/(en - y);

Integrate[func[en], {en, -\[Infinity], \[Infinity]}, PrincipalValue -> True]

Any help would be greatly appreciated. I don't understand why this is not working.

$\endgroup$
1
$\begingroup$

First, I suppose, your "en" is also given in units of eV, therfore you have to multiply it with eV. If not, you get overflow.

Trying analytical integration with rationalized "eV" shows, there is no antiderivative for the integrand.

Therefore do numerical integration (en multiplied with eV) and you get a pretty result

 NIntegrate[(1/(1 + E^(2.5*10^17 (-4.8*10^-17 + en))) - 
     1/(1 + E^(2.5*10^17 (0. + en))))/(-3.2*10^-17 + en) /. 
        en -> en*eV, {en, -Infinity, Infinity}, MaxRecursion -> 200, 
     Method -> "PrincipalValue", Exclusions -> en == 200]

(*    -4.94239*10^18    *)
$\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.