48sx Numerical Integration Question  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: 48sx Numerical Integration Question (/thread179915.html) 
48sx Numerical Integration Question  svisvanatha  03092011 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 builtin 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.
Re: 48sx Numerical Integration Question  Namir  03092011 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 bmaxYes? No? Namir
Edited: 9 Mar 2011, 4:58 p.m.
Re: 48sx Numerical Integration Question  svisvanatha  03092011 Yes, that is correct. The issue becomes one of speed, since the builtin 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 builtin 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!
Re: 48sx Numerical Integration Question  Crawl  03092011 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.
Re: 48sx Numerical Integration Question  svisvanatha  03102011 OK, so I divided the interval into a number of subintervals. For each subinterval, I used the builtin 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!
