On Dec 4, 2008, at 10:05 PM, Jason Grout wrote:


Tim Lahey wrote:

Jason

Is 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, they
can 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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to