Python Forum

Full Version: SyntaxError - Integral
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I am trying to solve an integral with the below code but I keep getting a Syntax error for my second def F; I would


def f(x):
	return exp(sin(x))
def F(x):
	return quad(f,0,x)[0]
for n in range(1,27):
	x = 2*pi*(float(n)-1.0)/25.0
	print str(x) + ' ' + str(F(x))
Thank you!!
Is it possible that function F has no clue what f is? Is it maybe f(x)?