Possible sage bug?

127 days ago by snn

Define the probability density function of the standard exponential distribution.

f(x)=e^(-x); f 
       
x |--> e^(-x)
x |--> e^(-x)

Compute the moment-generating function of the exponential distribution.

var('t'); assume(t >= 0); assume(t < 1); mgf(t)=integrate(f(x)*e^(t*x),x,0,oo); mgf 
       
t |--> -1/(t - 1)
t |--> -1/(t - 1)

The true answer (and solution to the above integral) should be \textrm{mgf}(t)=\frac{1}{t-1}.

See Mathworks integrator or the Wikipedia page on the exponential distribution.