I'm trying to solve an integral equation of the form Constant == Integrate [g(x)f(x,Efermi), {x,-200,200}], for the parameter Efermi. The function g(x) is Exp[-(x^2)/5000] and f(x) is 1/(1+Exp[(x-Efermi)/25].

In addition to this, if the Constant is an array, I'd like to extract Efermi as an array. Any inputs on how to go about solving this would be appreciated.

  • 3
    $\begingroup$ E==Exp[1] so that is a bad choice as a parameter $\endgroup$ Feb 3, 2013 at 22:13
  • $\begingroup$ Integral, dx isn't correct syntax. Is this a definite or indefinite integral? What are the limits, what are examples for Constants? $\endgroup$
    – Jens
    Feb 3, 2013 at 23:25
  • $\begingroup$ Right. I've edited my question for syntax. Hope the question I'm asking now is clear. $\endgroup$
    – user5720
    Feb 4, 2013 at 10:29
  • $\begingroup$ This is not really a Mathematica question. For the Mathematica part, you may use Map to get an array. $\endgroup$
    – unstable
    Feb 4, 2013 at 14:25
  • $\begingroup$ @Nasser Considering that he's talking about the Fermi energy, EFermi would be even better. $\endgroup$
    – rcollyer
    Feb 4, 2013 at 14:37

1 Answer 1


For the scalar case:

Set up a function, h, depending on EFermi, and use FindRoot to solve h[EFermi]==c

Clear[g, f, h];
g[x_] = Exp[-x^2/5000];
f[x_, EFermi_] = (1 + Exp[(x - EFermi)/25])^-1;
h[EFermi_?NumericQ] := NIntegrate[g[x] f[x, EFermi], {x, -200, 200}]
c = 100;
sol = FindRoot[h[e] == c, {e, 10}]
h[e] /. sol
(*  {e -> 55.2154} *)
(*  100. *)
Plot[{h[e], c}, {e, -500, 500}, Epilog -> Point[ {e, c} /. sol],ImageSize -> 300]


  • $\begingroup$ That was very helpful! Thank you! $\endgroup$
    – user5720
    Feb 4, 2013 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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