16Point Gaussian Quadrature

04092021, 05:17 AM
(This post was last modified: 04092021 05:18 AM by Gamo.)
Post: #1




16Point Gaussian Quadrature
Recently I try this program called 16Point Gaussian Quadrature found
in the HP11C Solutions Handbook on page 30 So this program do the Integration problem. I have try diffrent problem and the answer come out very well except one. This one doesn't give enough accuracy when compare to the Integration Function on the HP15C Here is the problem: ∫ 0 to 2 √4  X² dx = Pi = 3.141592654 On the HP11C and HP15 Equation is [X²] [4] [X<>] [] [√] Answer on HP11C is 3.141722674 Answer on HP15C is 3.141592653 So is program provided on the HP11C Solutions Book only give three decimal place accuracy or it only happen to certain problem. Gamo 

04092021, 11:53 AM
(This post was last modified: 04092021 01:13 PM by robve.)
Post: #2




RE: 16Point Gaussian Quadrature
(04092021 05:17 AM)Gamo Wrote: Here is the problem: ∫ 0 to 2 √4  X² dx = Pi = 3.141592654 This looks right and not bad for 16 points. 16 points will only give you a (rough) approximation of \( \int_0^2 \sqrt{4x^2}\,dx \). Gausss 10 point: 3.14209916979661 Gauss Kronrod 21 point: 3.14161975053083 By comparison (edited to add more examples): Romberg 524289 points (1e9 error threshold) gives 3.14159265256818 Romberg 16385 points (1e7 error threshold) gives 3.14159265256818 TanhSinh 56 points (1e9 error threshold) gives 3.14159265358672 TanhSinh 30 points (1e7 error threshold) gives 3.14159265358975 Adaptive Simpson 417 points (1e9 error threshold) gives 3.14159111522653 Adaptive Simpson 153 points (1e7 error threshold) gives 3.14159111489381  Rob "I can count on my friends"  HP 71B,PrimeTi VOY200,Nspire CXII CASCasio fxCG50...Sharp PCG850,E500,2500,1500,14xx,13xx,12xx... 

04092021, 04:41 PM
Post: #3




RE: 16Point Gaussian Quadrature
(04092021 05:17 AM)Gamo Wrote: Here is the problem: ∫ 0 to 2 √4  X² dx = Pi = 3.141592654 Both Gaussian and Romberg quadrature are based on fitting the curve to polynomial. When X ≈ 2, the curve fall off a cliff, which is hard to curve fit by polynomial. HP15C does a usubstitution, which in this case, removed the cliff entirely. int(√(4x^2), x=0..2.) = int(4*√(1x^2), x=0..1.) = int(24*u*(1u) * √(1  (u*u*(32*u))^2), u = 0..1.) Try this utransformed function, 16points should converge to pi pretty good.  Another way is to avoid the cliff. y = √(4x²), x≥0 → x = √(4y²) Note the x/y symmetry, instead of integrating from 0 to 2, we can do 0 to √2 With limit = [0,√2], doubled the result overcounted by a square, area = (√2)² = 2 int(√(4x^2), x=0..2.) = int(√(4x^2), x=0..√(2.)) * 2  2 

04102021, 02:54 AM
Post: #4




RE: 16Point Gaussian Quadrature
The HP15C Integration Function is excellent.
I will go back to read more information about this great integration function in the Advance Functions Handbook. Gamo 

04102021, 03:50 PM
Post: #5




RE: 16Point Gaussian Quadrature
(04092021 05:17 AM)Gamo Wrote: Here is the problem: ∫ 0 to 2 √4  X² dx = Pi = 3.141592654 I put that exact integral on my last calculus test. :) (04092021 04:41 PM)Albert Chan Wrote: Try this utransformed function, 16points should converge to pi pretty good. The TINspire calculator uses this utransformation with a 15 point GaussKronrod method. 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)