Problem with integral on WP 34s
|
09-15-2021, 11:26 AM
Post: #28
|
|||
|
|||
RE: Problem with integral on WP 34s
(09-15-2021 02:21 AM)lrdheat Wrote: How, then, does the WP 34S on DM 42 recognize the important part of the curve when Quote:For exp-sinh, a to ∞, c = a, sample points f(c+d), then f(c+d/r), f(c+d*r) Sorry, I missed the question. r → ∞: (c+d/r) is approaching c, (c+d*r) to infinity. (for a to ∞, d>0) r → 1 : (c+d/r) and (c+d*r) are both approaching (c+d) So, exp-sinh is really summing of 2 integrals. \( \displaystyle \int_c^∞ = \int_c^{c+d} + \int_{c+d}^∞ \) Test using code from here (I had updated quad to return function call counts too) lua> Q = require'quad' lua> f = function(x) return x*exp(-x) end For x = 0 .. inf, f(x) peaked at x=1, so default d=1 is not too bad. lua> Q.quad(f, 0, huge) -- d = 1 (default) 0.9999999999749527 2.5934163150981393e-009 107 But, from plots, we know 0 .. 10 is where the action is. lua> Q.quad(f, 0, huge, 10) -- d = 10 0.999999999999988 7.448208716454109e-013 61 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)