Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

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

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]


share|improve this answer
That was very helpful! Thank you! – user5720 Feb 4 '13 at 15:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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