WP34s 3924 Calculation Error
|
11-13-2024, 12:19 AM
Post: #4
|
|||
|
|||
RE: WP34s 3924 Calculation Error
(09-02-2024 06:44 PM)Nigel (UK) Wrote: For many integrals the new method is quicker and more accurate. It is particularly good when there is an integrable singularity at either end of the interval of integration. However it is less good when integrating functions that vary periodically many times over the interval, which is the case for your integral. You are right. DE algorithm does not like oscillatory integrand. It assumed transformed function is bell-shaped, then simply sum the rectangles. For this case, DE algorithm work too. It is just that software had placed a hard limit on levels deep. Note: my code changed meaning of levels, start from 1 instead of 0 --> levels = 12 get 12 rows output. lua> f = fn'x: exp(sin(x)*cos(x))' lua> ; Q.quad(f, 0, 1000, 1, 12, 1e-16, true) Code: 1103.4366650221054 0.370273314848271 Problem is this take about 2^(levels + 2) = 2^14 samples. Still, it beat Romberg by a factor of 2 lua> ; Q.integ(Q.simpson(Q.u(f, 0, 1000)), 2^15) Code: 4 865.1840001860048 299.21141073191774 col 1 = subintervals col 2 = extrapolated trapezoid areas col 3 = extrapolated rectangle areas, height = midpoint col 3 are less good, but it cost nothing to generate, and useful to cross check col 2 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
WP34s 3924 Calculation Error - ppphzj - 08-27-2024, 12:43 PM
RE: WP34s 3924 Calculation Error - Nigel (UK) - 09-02-2024, 06:44 PM
RE: WP34s 3924 Calculation Error - ppphzj - 09-03-2024, 10:45 AM
RE: WP34s 3924 Calculation Error - Albert Chan - 11-13-2024 12:19 AM
|
User(s) browsing this thread: 2 Guest(s)