If you have a list L of N, say, sample values of the function f over
the interval
(a,b), say, then

intf = sum(L)*(b-a)/N

should be the approximate integral shouldn't it?

sage: a = 1; b = 2; N = 10; Delta = (b-a)/N
sage: intf = sum(L)*(b-a)/N
sage: int_f = integral(sin(x),x,1,2)
sage: RR(intf); RR(int_f)
0.952260646490585
0.956449142415282


On Fri, May 23, 2008 at 7:21 AM,  <[EMAIL PROTECTED]> wrote:
>
> I have a function that is not piecewise and cannot be symbolically
> integrated.  Hence, I cannot use the Riemann or trapezoid
> approximations.
>
> Is there any other way in Sage to numerically integrate such a
> function?
>
> Thanks,
> Andrew
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to