1
$\begingroup$

I'd like to integrate the function $f(x)=x^{a-1}e^{-b x}$ over the interval $[0,\infty)$.

f[x_] := x^(a - 1)*Exp[-b*x]

Then:

Integrate[f[x], {x, 0, \[Infinity]}]

But I get:

ConditionalExpression[b^-a Gamma[a], Re[b] > 0 && Re[a] > 0]

How can I force both a and b to be real, positive parameters, then try the integration again?

$\endgroup$
  • 1
    $\begingroup$ Assuming[Re[b] > 0 && Re[a] > 0, Integrate[f[x], {x, 0, Infinity}]] Just copied what Integrate gave back into the Assuming part. $\endgroup$ – Nasser Jun 22 '14 at 5:31
  • $\begingroup$ @Nasser looks like an answer... $\endgroup$ – Yves Klett Jun 22 '14 at 5:48
  • $\begingroup$ It looks like a question asked instead of looking into documentation, does not it? $\endgroup$ – Alexei Boulbitch Jun 23 '14 at 9:35
3
$\begingroup$

In addition to @Nasser´s solution you can also use the Assumptions option:

Integrate[f[x], {x, 0, ∞}, Assumptions -> {Element[{a, b}, Reals], a > 0, b > 0}]
b^-a Gamma[a]

As pointed out by @m_goldberg, the assumption of a > 0 and b > 0 is sufficient, because this already implies real values.

$\endgroup$
  • $\begingroup$ Nice answers. Thanks. $\endgroup$ – David Jun 22 '14 at 6:10
  • 3
    $\begingroup$ Actually, Integrate[f[x], {x, 0, ∞}, Assumptions -> {a > 0, b > 0}] is sufficient, since {a > 0, b > 0} implies a and b are real. $\endgroup$ – m_goldberg Jun 22 '14 at 8:44
  • $\begingroup$ Another very nice answer. $\endgroup$ – David Jun 22 '14 at 16:26

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.