Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

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

1 Answer 1

up vote 3 down vote accepted

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.

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

Your Answer

 
discard

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.