加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

第4.6节  数值积分法

(2013-07-14 01:10:17)
标签:

it

4.6  NUMERICAL  INTEGRATION

In numerical integration, one computes an approximate value for the definite integral rather than finding an exact value. In this section we shall present two methods of numerical integration, called the Trapezoidal Rule and Simpsons Rule.

 

The Fundamental Theorem of Calculus gives us a method of computing the definite integral of a given continuous function ffrom a to b. The method is to find, by trial and error, an antiderivative Fof f and then to use the equation

            ______ f(t)dt= F(b) - F(a).

 

When the method works, it provides an exact value for the integral. However, the method succeeds only if the antiderivative happens to be a function that can be described in a simple way. For many integrals one cannot find a formula for the antiderivative, and the method fails. Such integrals can still be computed approximately using numerical integration.

 

The Trapezoidal Rule and Simpsons Rule can always be applied and do not use the antiderivative. They are easy to carry out on a computer or hand calculator. We already discussed one method of approximating the definite integral in Section 4.1, the Riemann sum. The Trapezoidal Rule is a modified form of the Riemann sum, which gives a much closer approximation for a given amount of effort. Simpsons Rule is a further modification that gives still better approximations.

 

Let f be a continuous function on an interval I, and let a I. By definition, for each positive infinitesimal dxthe definite integral

                         __________  f(x)dx

is the standard part of the infinite Riemann sum

                   _____f(x) dx,

 

                    ____f(x) dx = st [ __ f(x) dx].

In Section 4.1, examples were worked out to show that the finite Riemann sums become very close to the definite integral when Δxis small; that is, the finite Riemann sums approximate the definite integral. In Section 4.2, we saw that the definite integral is the limit of the finite Riemann sums as Δx0+:

       

                   ____f(x) dx = ________f(x) __x.

 

The Riemann sum, which is a sum of areas of rectangles, is a rather inefficient approximation of the definite integral. We can usually get a much closer approximation with the same amount of work by adding up areas of trapezoids instead of rectangles, forming the Trapezoidal Rule suggested by Figure 4.6.1. The Trapezoidal Rule also provides a formula, called an error estimate, which tells us how close the approximation is to the exact value of the definite integral.

 

 

第4.6节 <wbr> <wbr>数值积分法第4.6节 <wbr> <wbr>数值积分法

 

 

 

 

 

 

 

 

Figure 4.6.1

Choose a positive integer nand divide the interval [a, b] into nsubintervals of equal length Δ x = (b - a)/ n. The partition points are a=x0, x1, x2, xn = b.

 

The trapezoidal approximation is the area of the region under the broken line connecting the points

                (x0, f(x0)), (x1, f(x1)), …, (xn, f(xn)).

 

Since all of these points lie on the curve y= f(x), the broken line closely follows the curve. So one would expect the area of the region under the broken line to closely approximate the area under the curve.

 

Consider a single subinterval [ xm , xm+1] of width Δ x. The region under the line segment connecting the two points

                (xm, f (xm)),     (xm+1, f (xm+1))

 

is a trapezoid and its area is

                        F(xm) + f(xm+1)

                        _____________   Δx.

                            

The sum of the areas of the trapezoids is a modified Riemann sum

 

 

 

We thus make the definition:

 

DEFINITION

     Let Δx= (b-a)/ n evenly divide b-a. Then by the trapezoidal approximation to the definite integral __ f(x) dx we mean the sum

 

 

 

The Trapezoidal Approximation of an integral __f(x)dx can be computed very efficiently on most hand calculators. First compute the sum

 

 

 

By cumulative addition. Then multiply this sum by Δx to obtain the Trapezoidal Approximation.

 

THEOREM 1

For a continuous function f on [a, b], the trapezoidal approximation approaches the definite integral as Δx0+, that is,

 

 

 

PROOF   Comparing the formulas for the trapezoidal approximation and the Riemann

          sum, we see that

 

 

 

For dx positive infinitesimal, the extra term

 

 

 

is infinitely small. It follows that

 

 

 

From a practical standpoint, it is desirable to have a good estimate of error. We shall first work an example and then state a theorem which gives an error estimate for the trapezoidal approximation.

 

EXAMPLE 1   Approximate the definite integral

 

 

 

Use the trapezoidal approximation with Δx = ___. We first make a table of

values of ______. The graph is drawn in Figure 4.6.2.

 

 

 

 

第4.6节 <wbr> <wbr>数值积分法

 

 

 

 

 

 

 

Figure 4.6.2

 

第4.6节 <wbr> <wbr>数值积分法

 

Thus, __f(x0) + f(x1) + f(x2) + f(x3) + f(x4) + ___f(x5) = 5.7507.

Since Δ x= __ , the trapezoidal approximation is

                5.7507) ·_____= 1.1501,

                

                ______ dx ~ 1.1501.

 

The trapezoidal approximation can be made as close to the definite integral as we want by taking Δx small. From a practical standpoint, however, it is helpful to know how small we should take Δ xin order to be sure of a given degree of accuracy. For instance, suppose we need to know the definite integral to three decimal places. How small must we take Δ xin our trapezoidal approximation? The answer is given by the Trapezoidal Rule, which gives an error estimate for the trapezoidal approximation.

 

The error in the trapezoidal approximation is the absolute value of the difference between the trapezoidal sum and the definite integral,

                       

 

 

 

An error estimate for the trapezoidal approximation is a function E(Δx). Which is known to be greater than or equal to the error.

 

Thus if E(Δ x) is an error estimate, the trapezoidal sum is within E(Δx) of the definite integral. If we want to be sure that the trapezoidal approximation is accurate to three decimal places -i.e., the error is less than 0.0005 - we choose Δx so that E(Δ x)0.0005. We are now ready to state the Trapezoidal Rule.

 

TRAPEZOIDAL  RULE

Let f be a function whose second derivative f '' exists and has absolute value at most M on a closed interval [ a, b],

 

                        |f ''(x)|  for axb.

 

If Δx evenly divides b-a, then the trapezoidal approximation of the definite integral of fhas the error estimate

                      

 

 

 

That is,

                     

 

 

The proof is omitted.

 

EXAMPLE 1 (Concluded)  We let f(x)= _______. Then

 

 

 

 

 

 

Therefore |  f '' (x)| 1 for all x in [0,1]. We take M= 1 and use the error

estimate given by the Trapezoidal Rule,

 

 

 

Thus our approximation is within an accuracy of 1/300,

 

 

 

This shows that the integral is, at least, between 1.146 and 1.154.

 

In this particular example we can even conclude that the integral is between 1.146 and 1.150 (rounded off to three places). That is, the integral is less than its trapezoidal approximation. This is because the second derivative f '' (x) = (1 +x²) -3/2is always greater than 0, whence the curve is concave upwards and therefore y = f(x)is always less than or equal to the broken line used in the trapezoidal approximation. Actually, the value to three places is 1.148. This can be found by taking Δx =____.

 

EXAMPLE 2  Consider the integral

 

 

 

 

Let                   f(x)= _____________

By Theorem 1, we have

 

 

 

 

However, the Trapezoidal Rule fails to give an error estimate in this case

Because f '(x) is discontinuous at x = __1.

 

We now turn to Simpsons Rule, for which the number of subintervals nmust be even. As before, we divide the interval [a, b] into nsubintervals of equal length Δx with the n+ 1 partition points

               a = x0, x1, …xn= b.

We shall use subintervals of length 2 Δx rather than Δ x. On each of the n/2 subintervals

           [ x0, x2], [ x2, x4], …[ xn-2, xn],

of length 2 Δxwe approximate the curve y = f(x) by a parabolic arc that meets the curve at both endpoints and the midpoint of the subinterval, as shown in Figures 4.6.3. We then add up the areas under each of the parabolic arcs to obtain an approximation to the area under the curve, which is the definite integral. We begin with a lemma that gives a formula for the area of the region under one parabolic arc.

 

第4.6节 <wbr> <wbr>数值积分法

 

 

              

 

 

 

 

 

 

 

 

 

Figure 4.6.3

 

LEMMA

The area of the region under the parabola through three points (u, r), ( u+ h, s),

第4.6节 <wbr> <wbr>数值积分法and (u+2h, t) (shown in Figure 4.6.4) is

 

 

 

 

 

 

 

 

Figure 4.6.4

           ____ (r + 4s +t).

The lemma is proved at the end of this section. Using the lemma, we find that the area of the region under one parabolic arc from xkto xk+2 is

                   ______[ f(xk) + 4f(xk+1) + f(xk+2)].

 

It follows that the sum of the n/2 regions under the parabolic arcs is a modified Riemann sum,

 

 

 

 

This modified Riemann sum is Simpsons approximation to the definite integral. Note the sequence of coefficients,

                        1, 4, 2, 4, 2…2, 4, 1.

Like the trapezoidal approximation, it is easily computed on a computer or hand calculator.

 

THEOREM 2

For a continuous function f on [ a, b] , Simpsons approximation approaches the definite integral as Δx0+,

 

 

 

 

Simpsons approximation is almost as easy to calculate as the trapezoidal approximation, but is much more accurate. Simpsons Rule is an error estimate that involves the forth derivative of the function and the fourth power of Δx.

 

SIMPSON RULE

Suppose the function fhas a fourth derivative on the interval [a, b] that has absolute value at most M,

                      |f(4)(x) |M for axb.

 

If [a, b] is divided into an even number of subintervals of length Δx, then

Simpsons approximation to the definite integral has the error estimate

 

 

 

EXAMPLE 3  Use Simpsons Rule with Δx = 0.25 to approximate the integral

 

 

 

and find the error estimate.

 

The curve is the normal (bell- shaped ) curve used in statistics, shown in Figure 4.6.5.

We are to divide the interval [ 0,1] into four subintervals of equal length Δ x = 0.25. The following table shows the values of xand y and the coefficient to be used in Simpsons approximation for each partition point.

 

第4.6节 <wbr> <wbr>数值积分法

 

 

 

 

 

 

 

Figure 4.6.5  Example 3

第4.6节 <wbr> <wbr>数值积分法

 

 

 

 

 

 

 

 

The sum used in the Simpson approximation is then

[ 1.000000 + 4·(0.969233) +2·(0.882496) + 4·(0.754840) + 0.606531]

= 10.267816

 

 

To get the Simpson approximation, we multiply this sum by Δx/3:

                 = (10.267816) ·(0.25) /3 = 0.855651.

To find the error estimate we need the fourth derivative of

                 y = e -x²/2.

The fourth derivative can be computed as usual and turns out to be

                y(4) = (x4 - 6x2 +3) e -x²/2.

On the interval [ 0, 1],  y(4)is decreasing because both  x4 - 6x2 +3 and -x2/2 are decreasing, and therefore y(4)has its maximum value at x= 0 and its minimum value at  x = 1,

             maximum:      y(4)(0) =3

             minimum:     y(4)(1) = -1.213061

The maximum value of the absolute value |y(4)|is thus M = 3. The error estimate in Simpsons Rule is then

 

 

 

 

 

This shows that the integral is within 0.000065 of the approximation; that is,

 

            _______e -x²/2 dx = 0.855651___0.000065,

Or using inequalities,

                   0.855586  ____e -x²/2dx 0.855716.

 

For comparison, a more accurate computation with a smaller Δ x shows that the actual value to six places is

                ____e -x²/2dx = 0.855624.

 

The Trapezoidal Rule for this integral and the same value of Δ x = 0.25 give an approximate value of 0.85246 for the integral and an error estimate of 0.00521.

 

PROOF OF THE LEMMA   The algebra is simpler if the y-axis is drawn through the second point, so that u+ h= 0, and the three points have coordinates

                        ( -h, r), (0, s), ( h, t).

 

Suppose the parabola has the equation y = ax² + bx + c. Then the area under the parabola is

 

                           A= __(ax ²+ bx + c) dx

                            ________

                            ______ ah3+ 2ch.

 

 

When we substitute the coordinates of the three points ( -h, r), (0, s), ( h, t)

into the equation for the parabola, we obtain the three equations

                  r = ah² - bh + c.

                  =c,

                  = ah2 +bh +c.

Add the first and third equations and solve for a:

                  + t = 2ah² + 2c

                     a= ________

Finally, substitute the above expression for aand s for c in the equation for the area:

                   = ___ah3 + 2ch

                     =_________+ 2ch

                     __________·h

                     =____( r + 4c + t).

                     ____ (r + 4s +t).

 

PROBLEMS FOR SECTION  4.6

Approximate the integrals in Problems 1-20 using (a) the Trapezoidal Rule and (b) Simpsons Rule. When possible, find error estimates. If a hand calculator is available, do the problems again with Δx = 0.1.

1___xdx Δ x = 0.5                   2 ___x3dx, Δ x = 0.5

 

5______dx Δ x = 0.25                4______ dx Δ x = 0.5

7___________dx Δ x = 0.5            8_________dx Δ x = ____

9___________dx Δ x =___            10 ________dx Δ x = 0.5

11__________dx Δ x =              12_________dx Δ x = 2

13__________dx Δ x = 3             14 __________dx Δ x = 1

15 ___ _________                     16__________

17____exdx  Δx=_____                  18  ____ex²dx  Δx =_____

19_____1n x dx, Δx=_____                   20 ____1n (1/x) dx, Δx =_____   

21 let f be continuous on the interval [a,b] and let Δx=(b-a)/nwhere n is a positive integer. Prove that the trapezoidal sum is equal to the Riemann sum plus __ (f(b) - f(a)) Δx, that is ,

 

 

 

Show that if f(a) = f(b)then the trapezoidal sum and Riemann sum are equal.

 

22 Prove that for a linear function f(x) = kx+c, the trapezoidal sum is exactly equal to the integral.

23 Show that if f(x)is concave downward,  f ''(x)>0, then the trapezoidal sum is less than the definite integral of f(x).

24 Show that for a quadratic function f(x)=ax2 + bx +c, Simpsons approximation is equal to the definite integral.

25 show that for a cubic function f(x)=ax3 + bx2+cx +d, Simpsons approximation is still equal to the definite integral.

 

EXTRA  PROBLEMS  FOR  CHAPTER 4

1 Evaluate _______Δx  Δ x = 1/4

2 Evaluate _______Δx  Δ x = 2

3 Evaluate _______Δx  Δ x = 1

4Evaluate ______x  Δ x = 1/2

5 If F '(x) = 1/(2x-1)²for all x 1/2, find F(2) - F(1).

6 If G '(t) = ___________ for all t >-1/4, find G(2) - G(0).

7 A particle moves with velocity v=(3+2___)². How far does it move from times t0=1 to t1=5?

8A particle moves with velocity v=__________.How far does it move from times t0=1 to t1=4?

9 A particle moves with velocity v=(t+1)(2t+3). If it has position y0=0 at time t=0, find its position at time t=10.

10A particle moves with acceleration a = 1/t4. If it has velocity v0=4 and position y0=2 at time t=1, find its position at time t=3 .

11 Find the area of the region under the curve y= 1/___, 1 x 4.

12 Find the area of the region under the curve y=____, 0 x 1.

   In Problems 13-30, evaluate the integral.

13 (1- x)(2+3x) dx                    14  (2+____) (2-___) dx

15  ______dx                     16  (4x+1)1/3dx

17  (u/_____) du                     18  x-2______dx

19  (_______) dt                 20 _______dx

21 y_______dy                   21 (1-___)-4dx

23 cos (__) dx                   24 ___sin___dx

 

25 e-tdt                          26 _______dt

27  ________dy                     28____________dx

29     _____ e4x dx                            30 ____x sin(x²)dx

31      Differentiate___                        32 Differentiate___(t²/t²-1)) dt

33      Differentiate_______dx                  34 Differentiate___(1/(x+_____)) dx

35    Find the function Fsuch that F'(x) = x -1for all x, and the minimum value of F(x) is b.

36    Find the function Fsuch that F''(x) = x for all x, F(0) =1, and F(1) =1

37    Find the function Fsuch that F''(x) = 6 for all x, F(x) has a minimum at x =1, and the 

      minimum value is 2.

38    Find all functions Fsuch that F''(x) = 1 + x-3for all positive x.

39  Find the functions Fsuch that                                         

 

 

                        

and F(0) =1.

40  Find the value of bsuch that the area of the region under the curve y= x(b-x),

      0 x b, is1.

41  Suppose f is increasing for a x b, and Δx = (b-a)/nwhere n is a positive integer.

 Show that

                

 

 

   

42  Suppose f is continuous for a x b. Show that

                   

 

 

 

43  Find the area of the top half of the ellipse x²/a²+ y²/b² =1 using the formula

       π=________du.

44  Evaluate __ (1-x)3/2(1+x)1/2dx using the formula π=________du.

45  Find dy/dx if y = __xf(t)dt.

46  Suppose f(t)is continuous for all tand let G(x) =__(x - t) f(t) dt.

      Prove that G''(x) = f(x).

 

47  Prove that for any continuous functions f and g,

 

 

 

48  Prove Schwartz'Inequality,

                 ____f(x) g(x) dx________.

     Hint: Use the preceding problem.

49  Suppose f is continuous and dx is positive infinitesimal. Show that

                       ____f(x+__dx) dx ____f(x)dx.

      Hint: for each positive real c,

                        F(x) - c < f (x+ __ dx)< f(x) + c.

      Use this to show that

                   ___f(x)dx - c(b - a) < ___f(x+ ____dx ) dx <</span>__f(x) dx + c(b-a).

 

50  Suppose f is continuous, nis an integer, and dxis positive infinitesimal. Prove that

                        ____ f(x+ ndx) dx ___ f(x)dx.

 

 

 

 

 

 

 

 

 

 

 

 


0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有