HP71B Integral Questions
|
02-06-2020, 11:16 PM
Post: #12
|
|||
|
|||
RE: HP71B Integral Questions
(02-06-2020 06:53 PM)Wes Loewer Wrote: A couple of notes on the 3/2*u-1/2*u³ substitution. A simple test showed that HP71B INTEGRAL do extrapolations from trapezoids, not mid-points rule. >10 DISP INTEGRAL(-1, 1, 1E-5, 1/SQRT(1-IVAR^2)), IBOUND >RUN 3.14156045534 -3.1415397954E-5 this failure to converge (65535 sample points !) is due to missing end points evaluation. \(\large \int _{-1} ^1 f(x) dx = \int _{-1} ^ 1 {3 \over 2}(1-u^2) f \left({ u (3-u^2) \over 2} \right) du = \int _{-1} ^ 1 g(u) du \) \(f(x) = {1\over\sqrt{1-x^2}}\quad → \quad g(u) = {3 (1-u^2) \over \sqrt{(4-u^2)(1-u^2)^2}}\) \(\displaystyle{\lim_{u^2 \to 1^-} g(u)} = \displaystyle{\lim_{u^2 \to 1^-}{3\over\sqrt{4-u^2}}} = \sqrt3 ≠ 0\) Quote:So then the question was "Why make this substitution if the intervals are already nonuniform?" It does matter, even if gaussian quadrature do not evaluate end points. u-transformation changes the overall shape of the integrand, affecting all sample points. try above f(x) and g(u) (with 1-u^2 cancelled) XCas> f(x) := 1/sqrt(1-x*x) XCas> g(x) := 3/sqrt(4-x*x) XCas> time(gaussquad(f(x), x = -1 .. 1)) → 0.0065 XCas> time(gaussquad(g(x), x = -1 .. 1)) → 0.00054 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)