"Incremental Integration"?
- To: mathgroup at smc.vnet.net
- Subject: [mg31774] "Incremental Integration"?
- From: aes <siegman at stanford.edu>
- Date: Sat, 1 Dec 2001 02:45:54 -0500 (EST)
- Organization: Stanford University
- Sender: owner-wri-mathgroup at wolfram.com
Given a rather messy function f[x] , I want to make a Table of its integral from x0 up to a set of equally spaced points xn = x0 + n*dx with maximum value xFinal -- in other words g[x_] := NIntegrate[f[xi], {xi, x0, x}] Table[ {x, g[x]}, {x, x0, xFinal, dx}] Is Mathematica smart enough to calculate each successive value using the previous value plus integration just over the increment in x to the next value? If not, what would be a clean and readable and also reasonably efficient way to code this? [Note: For me anyway, there's some emphasis on the "clean and readable" part -- avoiding esoteric Mathematica syntax, not taking terseness as the ultimate goal.] Email cc to poster appreciated.