Skip to content

Instantly share code, notes, and snippets.

@cathcart
Created September 28, 2011 12:52
Show Gist options
  • Save cathcart/1247853 to your computer and use it in GitHub Desktop.
Save cathcart/1247853 to your computer and use it in GitHub Desktop.
#import modules python 2.5* and scipy and atlas
from scipy.integrate import quad
from math import log
from math import exp
from numpy import inf
def func_inner(y):
return (1-exp(-y))/y
def int_inner(x):
return quad(func_inner,0,x)[0]
print quad(lambda x: exp(-2*int_inner(x)),0,inf)[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment