Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Integrating with constant integrand

How can you specify an integral with a constant integrand? For example, I know that

f = x
f.integrate(x,0,1)

works fine, but

f = 1
f.integrate(x,0,1)

doesn't, since the Integer class has no integrate() method. (Should it?) I can get around this with something like

f = x-x+1
f.integrate(x,0,1)

but that seems awfully kludgey.