TAILIEUCHUNG - Computational Physics - M. Jensen Episode 1 Part 7

Tham khảo tài liệu 'computational physics - m. jensen episode 1 part 7', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | . GAUSSIAN QUADRATURE 109 and we note that in both cases the error goes like ỡ ỉ2j . With the latter two expressions we can now approximate the function as . . . . L. Inserting this formula in the integral of Eq. we obtain f dx fh 4f0 f_h O h which is Simpson s rule. Note that the improved accuracy in t he evaluation of the derivatives gives a better error approximation ỡ z5 vs. ỡ z3 . But this is just the local error approximation. Using Simpson s rnle we can easily compute the i 11 tegral of Eq. to be I J f x dx ị a 4 a h 2 a 2fi ----------1- 4 0 - h fb with a global error which goes like Ỡ Ã4 . It can easily be implemented numerically through the following simple algorithm Choose the number of mesh points and fix the step. . Perform a loop over n 1 to n 1 o and 6 are known and sum up the terms 4 ữ fi 2 ữ 2fi 4 ữ 3ỈÌ 4 6 ỉ . Each step in the loop corresponds to a given value a nh. Odd values ofn give 4 as factor while even values yield 2 as factor. Multiply the final result by I. A critical evaluation of these methods will be given after the discussion on Guassian quadrature. Gaussian quadrature The methods we have presented hitherto are taylored to problems where the mesh points .Ọ are equidistantly spaced .g differing from Xi 1 by the step o These methods are well suited to cases where the integrand may vary strongly over a certain region or if we integrate over the solution of a differential equation. 110 CHAPTER 8. NUMERICAL INTEGRATION If however our integrand varies only slowly over a large interval then the methods we have discussed may only slowly converge towards a chosen precision1. As an example _ rh . . 1 . may converge very slowly to a given precision ifb is large and or f x varies slowly as function oi .r at large values. One can obviously rewrite such an integral by changing variables to t 1 x resulting in 1 f f dt Jb-1 which has a small integration range and hopefully the number of mesh points needed is not that

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.