I am performing a numerical integration of a function f(x)=g(x)*h(x) over an interval [a,b]. In other words, "integral (f(x)*dx)". I am also interested in plotting the integral's result as a function of the distance along the interval [a,b].

The algorithm that the calculator uses to perform the integration must calculate the integral at a fixed number of intermediate points along [a,b].

So, my question is whether that information is available to the user when using the built-in numerical integration routine?

I can do what I want by performing a summation of the integral's value over a fixed number of divisions over the interval [a,b]. However, I thought that these intermediate values may be available and accessible.

Any thoughts?

*Edited: 9 Mar 2011, 4:08 p.m. *

If I am reading you correctly, you want to plot the the area from a to b, varying the value of b from a until you hit bmax:

For b = a to bmax

area = area under f(x) curve between [a,b]

plot value for area on a graph showing area vs b

Next

Yes? No?

Namir

*Edited: 9 Mar 2011, 4:58 p.m. *

Yes, that is correct.

The issue becomes one of speed, since the built-in numerical integration function divides the interval into a finite number of strips, calculates the area of that strip for a given ordinate, and adds that to the total sum. With your method, there is alot of computational overlap between successive iterations. I came up with a similar method, but it basically mimics the built-in routine. I was hoping that the intermediate values for iterations of the numerical solver are available in some manner, but seems like wishful thinking.

Thanks!

It seems like it would be easier to do with a program.

Supposing that the distance between pixels is dx, you'd want to integrate f(x) between x and dx for each coordinate x, and add the result to variable that keeps the total.

Since the limits are so close, for most functions I'd imagine the integral would converge quickly.

OK, so I divided the interval into a number of sub-intervals. For each sub-interval, I used the built-in numerical integration routine. I increment an area variable by that amount, and also store the total area and upper limit of the current interval as a 2 column row within a matrix.

At the end, I have the total area as well as the area as a function of the distance along the interval (a,b).

Thanks for the replies!