title: Scipy - Opposite of incomplete gamma function
body: <p>I'm working on a super-simplified radiative transfer problem, and I end up with an integral of the form<br>
  \int_{x_0}^{x_1} e^{+t} t^a dt<br>
  in one of my equations.  Is there either:<br>
  1. A special name for such a function that I just haven't been able to find?  It's clearly related to the incomplete gamma function<br>
  \frac{1}{\Gamma(a)} \int_0^{x} e^{-t} t^{a-1} dt<br>
  which is implemented under <code>scipy.special.gammainc</code>.  I've already used that in an earlier part of my code.<br>
  2. A reasonably fast implementation of such a function, where the exponent $a$ is fixed but the integration bounds $x_{0,1}$ are variable?  Preferably one where $x_{0,1}$ can be numpy vectors of the same length, or where one is a scalar? (I can discuss how this fits into the problem if it would clarify things.)</p>
  
  <p>Two straightforward work-arounds use <code>scipy.integrate.quad</code> or <code>scipy.integrate.cumtrapz</code>:  </p>
  
  <pre><code>from scipy.integrate import quad  
  from scipy.integrate import cumtrapz  
  from numpy import exp, empty_like, linspace, ones
  
  a = 0.286 * 4.0
  fIntegrand = lambda t: exp(t) * t**a
  
  def FIntegrated1(x0,x1):
      # Use quad to do integrals one by one
      F = empty_like(x0)
      for i in xrange(x0.size):
          F[i] = quad(fIntegrand, x0[i], x1[i])[0]
      return F
  
  def FIntegrated2(x):
      # Use cumtrapz
      # x is a numpy array from x0 to maximum x1 to be calculated
      F = cumtrapz(fIntegrand, x=x, initial=0.0)
      return F
  
  # Test out with typical values
  x = linspace(.5,8,50)
  x1 = x[1:]
  x0 = ones(x1.shape) * .5
  F1 = FIntegrated1(x0,x1)
  F2 = FIntegrated2(x)
  </code></pre>
  
  <p>Neither work-around is particularly slow or particularly fast, but a better approach would be much appreciated.</p>