Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SyntaxError - Integral
#1
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!!
Reply
#2
Is it possible that function F has no clue what f is? Is it maybe f(x)?
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Positive integral solutions for Linear Diophantine Equation august 4 1,240 Jan-13-2023, 09:48 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020