On Dec 4, 2008, at 10:05 PM, Jason Grout wrote:
Tim Lahey wrote:JasonIs there an easy way to get the integrand, variable and bounds out of the integral? That way, if one has tried to analytically evaluate it, theycan pull it out and try numerically evaluating it easily. In fact, it probably could be done automatically.sage: a=integrate(250*cos(pi*x/180)^1.8 + 170.35 , x, 0, 18) sage: a integrate(250*cos(pi*x/180)^1.8 + 170.35, x, 0, 18) sage: a.arguments() (250*cos(pi*x/180)^1.8 + 170.35, x, 0, 18)
In that case, it should be simple to feed the integral to scipy. One could write a simple wrapper to numerically integrate integrals which can't be done analytically. Cheers, Tim. --- Tim Lahey PhD Candidate, Systems Design Engineering University of Waterloo http://www.linkedin.com/in/timlahey
smime.p7s
Description: S/MIME cryptographic signature