Download HW 4.3, 4.4

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Clenshaw–Curtis quadrature wikipedia , lookup

Transcript
202
C H A PT ER 4
Numerical Differentiation and Integration
E X E R C I S E S E T 4.3
1.
Approximate the following integrals using the Trapezoidal rule.
2
0.5
a.
2.
x4 dx
ak
JO
JO
Approximate the following integrals using the Trapezoidal rule.
a.
c.
/0'25
1
(cosx)' cix
((sinx)' - Zr sinx
+ 1) ak
b.
/O'
d.
Ie
0.75
xln(x+l)cix
' d x
X
i
Find a bound for the error in Exercise 1 using the error formula, and compare this to the actual error.
Find a bound for the error in Exercise 2 using the error formula, and compare this to the actual error.
Repeat Exercise 1 using Simpson's rule.
Repeat Exercise 2 using Simpson's rule.
Repeat Exercise 3 using Simpson's rule and the results of Exercise 5.
Repeat Exercise 4 using Simpson's rule and the results of Exercise 6.
Repeat Exercise 1 using the Midpoint rule.
Repeat Exercise 2 using the Midpoint rule.
Repeat Exercise 3 using the Midpoint rule and the results of Exercise 9.
Repeat Exercise 4 using the Midpoint rule and the results of Exercise 10.
The Trapezoidal rule applied to f: f (x) dx gives the value 4, and Simpson's rule gives the value 2.
What is f (l)?
The Trapezoidal rule applied to f: f (x) ak gives the value 5, and the Midpoint rule gives the value 4.
What value does Simpson's rule give?
Find the degree of precision of the quadrature formula
Let h = (b - a)/3, xo = a, xl = a
formula
+ h, and xz = b. Find the degree of precision of the quadrature
+
+
The quadrature formula J:, f (x) dx = cof (-I)
c; f (0) c2f (1) is exact for all polynomials of
degree less than or equal to 2. Determine co, c,, and c2.
The quadrature formula J: f (x) ak = c0f (0) cl f (I) c2f (2) is exact for all polynomials of
degree less than or equal to 2. Determine co, cl, and c2.
Find the constants co, cl, and xl so that the quadrature formula
+
+
I-1
has the highest possible degree of precision.
Find the constants xo, xl, and cl so that the quadrature formula
has the highest possible degree of precision.
203
4.4 Composite Numerical Integration
21.
Approximate the following integrals using formulas (4.25) through (4.32). Are the accuracies of
the approximations consistent with the error formulas? Which of parts (d) and (e) give the better
approximation?
22.
Given the function f at the following values,
approximate
23.
x
1.8
2.0
2.2
2.4
2.6
f (x)
3.12014
4.42569
6.04241
8.03014
10.46675
J:; f (x) dr using all the appropriate quadrature formulas of this section.
Suppose that the data of Exercise 22 have round-off errors given by the following table.
Error in f (x)
1
2x
1
-2 x 1 0 - 6 -0.9 x 10-"
-0.9 x
1
2x
Calculate the errors due to round-off in Exercise 22.
24.
Derive Simpson's rule with error term by using
Find ao,al,and nz from the fact that Simpson's rille is exact for f (x) = xu when n = 1.2. 5:: I
Then find k by applying the integration formula with f (x) = x4.
25.
Prove the statement following Definition 4.1; that is, show that a quadrature formula he: it-?!
precision rz if and only if the error E ( P ( x ) ) = 0 for all polynomials P(x) of degree k =
but E(P(x)) # 0 for some polynomial P(x) of degree 11 $ 1.
Derive Simpson's three-eighths rule (the closed rule with n = 3) with e7:: -5Theorem 4.2.
~
26.
27.
Derive the open rule with n = 1 with error term by using Theorem 4.3.
210
C HAPT ER 4
0
Numerical Differentiation and Integration
a bound independent of h (and n). This means that, even though we may need to divide
an interval into more parts to ensure accuracy, the increased computation that is required
does not increase the round-off error. This result implies that the procedure is stable as h
approaches zero. Recall that this was not true of the numerical differentiation procedures
considered at the beginning of this chapter.
1.
Use the Composite Trapezoidal rule with the indicated values of n to approximate the following
integrals.
c*
e.
l3&
In8
ah,
sin 3x dx,
n=8
n =8
f.
I
0
Z d r ,
x2+4
n=6
Use the Composite Trapezoidal rule with the indicated values of n to approximate the following
integrals.
0.5
a.
c.
cos2x dx,
1:"
(sin2x
n =4
- 2x sin x + 1) dr,
b.
n =8
d.
xlnx
dr,
n=8
0.5
~ o ~ 5 x l n ( x + l ) d r n. = 6
Use the Composite Simpson's rule to approximate the integrals in Exercise 1.
Use the Composite Simpson's rule to approximate the integrals in Exercise 2.
Use the Composite Midpoint rule with n + 2 subintervals to approximate the integrals in Exercise 1.
Use the Composite Midpoint rule with n 2 subintervals to approximate the integrals in Exercise 2.
Approximate x2 ln(x2 1) dx using h = 0.25. Use
a. Composite Trapezoidal rule.
b. Composite Simpson's rule.
c. Composite Midpoint rule.
Approximate fo2x2e-x2dx using h = 0.25. Use
a. Composite Trapezoidal rule.
b. Composite Simpson's rule.
c. Composite Midpoint rule.
Suppose that f (0) = 1, f (0.5) = 2.5, f (1) = 2, and f (0.25) = f (0.75) = a. Find a if the
Composite Trapezoidal rule with n = 4 gives the value 1.75 for f (x) dr.
fi
+
+
fd
The Midpoint rule for approximating f!, f (x) d r gives the value 12, the Composite Midpoint rule
with n = 2 gives 5, and Composite Simpson's rule gives 6. Use the fact that f (-1) = f (1) and
f (-0.5) = f (0.5) - 1 to determine f (-1), f (-0.5), f (0), f (0.5), and f (1).
Determine the values of n and h required to approximate
l2
eb sin TXd r
to within
Use
a. Composite Trapezoidal rule.
b. Composite Simpson's rule.
c. Composite Midpoint rule.
Composite Numerical Integration
4.4
211
Repeat Exercise 11 for the integral 1
; x2 cos x dx.
Determine the values of n and h required to approximate
to within lo-' and compute the approximation. Use
a. Composite Trapezoidal rule.
b. Composite Simpson's rule.
c. Composite Midpoint rule.
Repeat Exercise 13 for the integral f: x lnx dx.
Let f be defined by
a.
b.
c.
Investigate the continuity of the derivatives of f .
Use the Composite Trapezoidal rule with n = 6 to approximate J ~f (x)
~ ak,
' ~and estimate the
error using the error bound.
Use the Composite Simpson's rule with n = 6 to approximate
f ( x ) &.Are the results more
accurate than in part (b)?
Show that the error E( f ) for Composite Simpson's rule can be approximated by
~,~l:
[Hint:
f (4) (ej)(212) is a Riemann Sum for jobf (4) (x) &.I
Derive an estimate for E( f ) in the Composite Trapezoidal rule using the method in Exercise 16.
b. Repeat part (a) for the Composite Midpoint rule.
Use the error estimates of Exercises 16 and 17 to estimate the errors in Exercise 12.
Use the error estimates of Exercises 16 and 17 to estimate the errors in Exercise 14.
In multivariable calculus and in statistics courses it is shown that
a.
for any positive a . The function
is the normal densityfitnction with mean L,L = 0 and standard deviation a . The probability that a
randomly chosen value described by this distribution lies in [a, b] is given by jobf (x) ak.Approximate
to within lop5 the probability that a randomly chosen value described by this distribution will lie in
a. [-a,a]
b. [-20,201
c. [-3a,3a]
Determine to within
the length of the graph of the ellipse with equation 4x2 gy2 = 36.
A car laps a race track in 84 seconds. The speed of the car at each 6-second interval is determined
by using a radar gun and is given from the beginning of the lap, in feedsecond, by the entries in the
following table.
+
Time
0 16
Speed
124
12
I 134
How long is the track?
148
18 2I 4 3 0
~
~
36
42
148 54
~
60
6 6 1 7 2 178 1 8 4
/
104
116
1123
3