Download Homework 6 - TTU Math Department

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

Generalized linear model wikipedia , lookup

Time value of money wikipedia , lookup

Computational electromagnetics wikipedia , lookup

Mathematical optimization wikipedia , lookup

Path integral formulation wikipedia , lookup

Delta-sigma modulation wikipedia , lookup

Confidence interval wikipedia , lookup

Transcript
Homework 6 - Math 1451-008 (Howle)
Due Monday 5/7/2012 in class
Name:
R Number:
This cover sheet must be attached as the top page of your homework.
See homework requirements in the syllabus.
1. Describe approximation of a denite integral by rectangles, the trapezoidal rule, and Simpson's
rule. Describe each method; what approximation is used by each?
2. Approximate the integral
ˆ
2
x cos x dx
0
using:
(a) the trapezoidal rule with n = 6
(b) Simpson's rule with n = 6
3. Determine how many subintervals are required to estimate the value of the integral
ˆ
2
p
1 + x2 dx
−1
with error less that 0.05 using the Trapezoidal Rule.
4. For each of the following functions over the given interval, determine if the Mean Value
Theorem for Integrals applies. If not, explain why not. If it does apply, nd a value x = c
guaranteed by the theorem.
(a) f (x) = 15x−2 on [1, 2]
(b) g(x) = 12x−3 on [−3, 3]
1
1. Describe approximation of a denite integral by rectangles, the trapezoidal rule,
and Simpson's rule. Describe each method; what approximation is used by each?
Solution:
approximating a denite integral with rectangles is just using function evaluations to get heights of rectangles, then using the area of rectangles to approximate the denite
integral. For a non-negative function, we are dividing the interval [a, b] into n equal width
intervals, and using f of some representative value in each interval (often the right end point)
to dene the height of the rectangle. The width of each rectangle is b−a
n .
Trapezoidal rule: for the trapezoidal rule, instead of using rectangles, we are using the area
of trapezoids to approximate the denite integral. Since we use two function values f (xk ) and
f (xx+1 ) to dene the trapezoid, more information about the function is used in each interval,
and we get a better approximation for a given number of intervals n.
Simpson's rule: if we have a even number of subintervals n, we can use even more information about the function and approximate with rectangular regions topped with a parabola.
This gives an even more accurate approximation to the denite integral for a given number
of subintervals n, but does require that n be an even number.
Rectangles:
2. Approximate the integral
ˆ
2
x cos x dx
0
using:
(a) the trapezoidal rule with n = 6
(b) Simpson's rule with n = 6
2−0
In either case, with n = 6, we will have ∆x = b−a
= 31 . Our
n =
6
function will need to be evaluated at the interval endpoints xk = a + k∆x = 0 + k3 = k3 .
So I'll calculate the values we'll need ahead of time:
Solution:
xk
x0
x1
x2
x3
x4
x5
x6
=a=0
= 13
= 23
= 33 = 1
= 43
= 53
= 63 = 2 = b
f (xk ) = xx cos xk
0 cos 0 = 0
1
1
3 cos 3 ≈ 0.3150
2
2
3 cos 3 ≈ 0.5239
1 cos 1 ≈ 0.5403
4
4
3 cos 3 ≈ 0.3137
5
5
3 cos 3 ≈ −0.1595
2 cos 2 ≈ −0.8323
For the Trapezoidal
, we have:
rule
1
(f (x0 ) + 2f (x1 ) + 2f (x2 ) + 2f (x3 ) + 2f (x4 ) + 2f (x5 ) + f (x6 )) ∆x
2
1
≈
(f (x0 ) + 2f (x1 ) + 2f (x2 ) + 2f (x3 ) + 2f (x4 ) + 2f (x5 ) + f (x6 ))
6
≈ 0.3724
A ≈
For
, we have:
Simpson's rule
1
(f (x0 ) + 4f (x1 ) + 2f (x2 ) + 4f (x3 ) + 2f (x4 ) + 4f (x5 ) + f (x6 )) ∆x
3
1
≈
(f (x0 ) + 4f (x1 ) + 2f (x2 ) + 4f (x3 ) + 2f (x4 ) + 4f (x5 ) + f (x6 ))
9
≈ 0.4029
A ≈
2
Note that the actual answer (according to wolframalpha.com) is approximately 0.4024
(so Simpson's rule has given us a much more accurate approximation for n = 6).
3. Determine how many subintervals are required to estimate the value of the integral
ˆ
2
p
1 + x2 dx
−1
with error less that 0.05 using the Trapezoidal Rule.
The error formula for the trapezoidal rule says that for n subintervals, the error
|En | in the approximation is given by
Solution:
|En | ≤
(b − a)3
M,
12n2
where M is the maximum value of |f 00 (x)| over the interval [a, b]. First, we'll need to gure
out M .
f (x)
p
=
f 0 (x) =
−1/2
1 + x2
x
√
1 + x2
1
1
2
=
f 00 (x)
1 + x2
=
(2x)
(1 + x2 )3/2
To nd the absolute max of a continuous function f 00 (x) over a closed and bounded interval,
recall that we need to nd critical numbers, and evaluate f 00 (x) at the critical numbers and
at the endpoints of the interval. To nd critical numbers, we take another derivative and look
for values of x where f 000 (x) = 0 or does not exist.
f 000 (x) =
−3x
(1 + x2 )5/2
There are no x values on the given interval where it won't exist, and the only point where
f 000 (x) can be 0 is at x = 0, so that is the only critical number. So we check that and the
endpoints:
f 00 (0) = 1
f 00 (−1) =
f 000 (2) =
So the absolute maximum of f (x) =
problem, we have
1
23/2
1
53/2
<1
<1
√
1 + x2 is f (0) = 1. In other words, M = 1. So for this
|En | ≤
(b − a)3
M
12n2
and to have the error less than 0.05, we need:
(b − a)3
M
12n2
< 0.05
3
(2 + 1)3 · 1
12n2
27
12n2
1
20
1
<
20
27 · 20
540
2
n >
=
= 45
12
12
√
n >
45 ≈ 6.7
<
Therefore, we need n = 7, or 7 subintervals for the specied accuracy.
4. For each of the following functions over the given interval, determine if the Mean
Value Theorem for Integrals applies. If not, explain why not. If it does apply,
nd a value x = c guaranteed by the theorem.
(a) f (x) = 15x−2 on [1, 2]
Solution: f (x) has no suspicious points and is continuous over the given interval. Therefore the Mean Value Theorem for Integrals does apply. So we need to nd the x = c such
that
ˆ
1
b−a
b
f (x) dx = f (c).
a
I'll calculate the left side rst, then we'll solve for x = c that the MVT for Integrals
guarrantees.
1
b−a
ˆ
b
f (x) dx =
a
=
=
=
1
2−1
ˆ
2
15x−2 dx
1
2
−1 −15x 1
−15 −15
−
2
1
15
2
So we need to nd x = c such that f (c) = 15/2:
15
15
=
2
x
2
1
1
=
x2
2
2
x = 2
√
x = ± 2
The c from the theorem that is in the interval [1, 2] is c =
(b) g(x) =
12x−3
on
√
2.
[−3, 3]
Solution: the function g(x) is not dened at x = 0, which is on the given interval. So the
function is not continuous over the given interval [−3, 3] and the Mean Value Theorem
for Integrals does not apply.
4