R 1-无代写
时间:2024-05-06
Numerical Analysis Quiz 11 April 19th, 2024
1. Show that Consider the following quadrature formula to approximate
R 1
0 f(x) dx:
Q(f) := !f
✓
1
2
↵
◆
+ !f
✓
1
2
+
◆
.
(a) Derive values for !,↵, such that this quadrature formula is exact for polynomials to at
least up to degree 2.
(b) Recall that the composite trapezoidal rule on an interval [a, b] satisfies the error estimate
|E(f)| (b a)
3
12m2
max
x2[a,b]
|f 00(x)|,
where m is the number of subintervals. How many intervals m are necessary to guarantee
that the error for f(x) = log(cos(x2)) on the interval [0, 1] is bounded by 0.01? Hint: you
can use that for x 2 [0, 1] holds |f (n)(x)| (n+ 1)n+1 for all n 2 N.
2. We are interested in using a Gauss quadrature rule two nodes to approximate the integralZ 1
0
w(x)f(x) dx ⇡W0f(x0) +W1f(x1), (1)
given w(x) = x2.
(a) What quadrature nodes x0 and x1 should we use for this? (No need to compute the nodes,
just indicate what equation(s) they satisfy.)
(b) For what functions do we expect our quadrature rule in Eq 1 to be exact? Why?
(c) Describe a method to find the quadrature weights W0 and W1. (No need to compute these
weights.)
1
3. Consider the composite Trapezoidal ruleZ b
a
f(x) dx ⇡ Th(f) :=
mX
i=0
h
2
[f(xi1) + f(xi)],
where xi = a+ ih, i = 0, 1, · · · ,m, m = (b a)/h. Using a Taylor expansion, we can show that
Eh(f) :=
Z b
a
f(x) dx Th(f) = C1h2 + C2h4 + · · · (2)
for suciently small h and constants C1, C2 that are independent of h. Use Eq 2 to show that the
following numerical integration ruleZ b
a
f(x) dx ⇡ 4
3
Th/2(f) 13Th(f)
is 4th order accurate. That is, show thatZ b
a
f(x) dx 4
3
Th/2(f) +
1
3
Th(f) = ch
4 + · · ·
for suciently small h and a constant c that is independent of h.