Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

"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.


  • Prev by Date: Path finding in graph theory, Lookig for your help,
  • Next by Date: Re: Compiling functions
  • Previous by thread: Re: Path finding in graph theory, Lookig for your help,
  • Next by thread: Re: "Incremental Integration"?