13.07.2015 Views

Mathematical Methods for Physics and Engineering - Matematica.NET

Mathematical Methods for Physics and Engineering - Matematica.NET

Mathematical Methods for Physics and Engineering - Matematica.NET

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

27.4 NUMERICAL INTEGRATIONThis provides a very simple expression <strong>for</strong> estimating integral (27.34); its accuracyis limited only by the extent to which h can be made very small (<strong>and</strong> hence Nvery large) without making the calculation excessively long. Clearly the estimateprovided is exact only if f(x) is a linear function of x.The error made in calculating the area of the strip when the trapezium rule isused may be estimated as follows. The values used are f i <strong>and</strong> f i+1 , as in (27.36).These can be expressed accurately in terms of f i+1/2 <strong>and</strong> its derivatives by theTaylor seriesf i+1/2±1/2 = f i+1/2 ± h 2 f′ i+1/2 + 1 ( ) 2 hf i+1/2 ′′2! 2± 1 ( ) 3 hf (3)3! 2i+1/2 + ··· .ThusA i (estim.) = 1 2 h(f i + f i+1 )[= h f i+1/2 + 1 ( h2! 2whilst, from the first few terms of the exact result (27.35),A i (exact) = hf i+1/2 + 2 ( h3! 2Thus the error ∆A i = A i (estim.) − A i (exact) is given by∆A i = ( 18 − ) 124 h 3 f i+1/2 ′′ +O(h5 )) 2f ′′i+1/2 +O(h4 )) 3f ′′i+1/2 +O(h5 ).≈ 1 12 h3 f i+1/2 ′′ .The total error in I(estim.) is thus given approximately by],∆I(estim.) ≈ 1 12 nh3 〈f ′′ 〉 = 1 12 (b − a)h2 〈f ′′ 〉, (27.38)where 〈f ′′ 〉 represents an average value <strong>for</strong> the second derivative of f over theinterval a to b.◮Use the trapezium rule with h =0.5 to evaluateI =∫ 20(x 2 − 3x +4)dx,<strong>and</strong>, by evaluating the integral exactly, examine how well (27.38) estimates the error.With h =0.5, we will need five values of f(x) =x 2 − 3x + 4 <strong>for</strong> use in <strong>for</strong>mula (27.37).They are f(0) = 4, f(0.5) = 2.75, f(1) = 2, f(1.5) = 1.75 <strong>and</strong> f(2) = 2. Putting these into(27.37) givesI(estim.) = 0.5 (4 + 2 × 2.75 + 2 × 2 + 2× 1.75 + 2) = 4.75.2The exact value is[ ] x32I(exact) =3 − 3x22 +4x =4 2 . 301003

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!