Upload
nguyendiep
View
215
Download
0
Embed Size (px)
Citation preview
MATH 101 - Section 210
Instructor: Avner Segal ([email protected])
February 9th 2017
Common course page:http://www.math.ubc.ca/~gerg/teaching/101-Winter2017/
Individual section page:http://www.math.ubc.ca/~avners/courses/math101-2017.html
Office hours: Thursdays 12:00-14:30 (LSK300)On Quiz Weeks: Tuesdays 12:00-13:00 (LSK300) - by appointment
only!Follow announcements on section web page in case of changes.
Quiz # 3 on Thursday(February 16th)
Material covers everything up to (and including) numericalintegration.
Don’t forget your UBC Card and a black pen!
Numerical Integration
Fix f (x) integrable on [a,b] and an integer n.
Trapezoidal Rule b−a2n (1,2,2,2, ...,2,2,1)
Tn = b−a2n
(f (a)+2f (a+∆x)+2f (a+2∆x)+·· ·+2f (a+ (n−1)∆x)+ f (b)
).
Simpson’s Rule b−a3n (1,4,2,4,2, ...,4,2,4,1)
Here n is even.
Sn = b−a3n
(f (a)+4f (a+∆x)+2f (a+2∆x)+4f (a+3∆x)+2f (a+4∆x)
+·· ·+4f (a+ (n−3)∆x)+2f (a+ (n−2)∆x)+4f (a+ (n−1)∆x)+ f (b))
Error BoundsDenote I =
∫ b
af (x)dx . Assume that |f ′(x)| ≤K for all a≤ x ≤ b,
|f ′′(x)| ≤M for all a≤ x ≤ b and that |f (4)(x)| ≤ L for all a≤ x ≤ b.
Method # points Error Bound
Left endpoint n |I −Ln| ≤ K2(b−a)2
n
Midpoint n |I −Mn| ≤ M24
(b−a)3
n2
Right endpoint n |I −Rn| ≤ K2(b−a)2
n
Trapezoidal rule n+1 |I −Tn| ≤ M12
(b−a)3
n2
Simpson’s rule n+1, n is even |I −Sn| ≤ L180
(b−a)5
n4
Question (Final 2012)
Let I =∫ 2
1
dxx.
(a) Write down Simpson’s rule approximation for I using 5 points,call it S4.
(b) Without computing I , find an upper bound for |I −S4|.
Solution
(a) We have f (x)= 1x , a= 1, b = 2 and n= 4. In particular, we have
S4 = 2−13 ·4
(f (1)+4f
(54
)+2f
(32
)+4f
(74
)+ f (2)
)
= 12
(1+ 16
5+ 43+ 16
7+ 12
).
Question (Final 2012)
Let I =∫ 2
1
dxx.
(a) Write down Simpson’s rule approximation for I using 5 points,call it S4.
(b) Without computing I , find an upper bound for |I −S4|.
Solution
(b) We first need to derive f (x)= 1x 4 times.
f ′(x)=− 1x2 , f ′′(x)= 2
x3 , f (3)(x)=− 6x4 , f (4)(x)= 24
x5 .
On the interval [1,2] the function∣∣∣f (4)(x)∣∣∣= 24
x5 is decreasingand hence it is bounded by L= f (1)= 24. Using the errorbound formula we get
|I −S4| ≤ 24180
· (2−1)5
44 = 11960
.
Important FactsRecall that
Ï |cos(x)|, |sin(x)| ≤ 1.Ï |a+b| ≤ |a|+ |b| (Called triangle inequality).Ï |a ·b| = |a| · |b|.
Question
Let I =∫ 6
4sin
(px)dx . Find n such that the estimate of I using the
midpoint rule will have an error of at most 13,000 .
SolutionÏ f ′(x)= 1
2p
x cos(p
x), f ′′(x)=− 14x3/2 cos(
px)− 1
4x sin(p
x).
Ï |f ′′(x)| ≤∣∣∣ 14x3/2 cos(
px)
∣∣∣+ ∣∣ 14x sin(
px)
∣∣ ≤∣∣∣ 14x3/2
∣∣∣ · |cos(px)|+ ∣∣ 14x
∣∣ · |sin(px)| ≤ 14x3/2 + 1
4x ≤ 14·43/2 + 1
16 = 110
Ï |I −Mn| ≤ 1/1024 · (6−4)3
n2 = 130·n2 .
Ï We want n such that 130·n2 ≤ 1
3,000 . This is the same asn2 ≥ 100 so n= 10 will do.
Question (Final 2008, enhanced)
Let∫ 1
0cos(x2)dx . Find the smallest positive integer n you can such
that the Simpson’s Rule approximation Sn for I has error less thenor equal to 0.001.
SolutionFirst, we derive f (x)= cos(x2):f ′(x)=−2x sin(x2),f ′′(x)=−2sin(x2)−4x2 cos(x2)f (3)(x)=−12x cos(x2)+8x3 sin(x2),f (4)(x)= (16x4−12)cos(x2)+48x2 sin(x2).Hence|f (4)(x)≤ |(16x4−12)cos(x2)|+ |48x2 sin(x2)| ≤|16x4−12|+48|x2| ≤ 4+48= 52 .In the original problem, it was given that 60 is a bound.
Question (Final 2008)
Let∫ 1
0cos(x2)dx . It can be shown that the 4th derivative of
cos(x2) has absolute value at most 60 on the interval [0.1]. Usingthis bound, find the smallest positive integer n you can such thatthe Simpson’s Rule approximation Sn for I has error less then orequal to 0.001.
SolutionIt is known that the error in the n-th is bounded by
En = 60180
(1−0)5
n4 = 13 ·n4 .
We want to find the smallest value of n so that 13·n4 ≤ 0.001, or
otherwise the smallest n so that n4 ≥ 1,0003 . One checks that
54 = 635> 10003 and 44 = 256< 1000
3 so n= 5.
Question (Final 2009, rephrased)
Give the Simpson’s rule approximation S4 to∫ 2
0sin(ex)dx .
Variant: Give an upper bound for the error in this approximation.
SolutionÏ f (x)= sin(ex), a= 0, b = 2, n= 4.
Ï S4 = 2−03·4
(sin(e0)+4sin
(e
12
)+2sin(e1)+4sin
(e
32
)+ sin(e2)
)= 1
6
(sin(e)+4sin(
pe)+2sin(e)+4sin
(pe3
)+ sin(e2)
)≈ 0.37 .
Ï f ′(x)= ex cos(ex), f ′′(x)= ex cos(ex)−e2x sin(ex),f ′′′(x)= ex cos(ex)−3e2x sin(ex)−e3x cos(ex),f (4)(x)= ex cos(ex)−7e2x cos(ex)−6e3x cos(ex)+e4x sin(ex).
Ï |f (4)(x)| ≤ |ex |+7|e2x |+6|e3x |+|e4x | ≤ e2+7e4+6e6+e8 ≤ 6,000.
Ï |I −S4| ≤ 6,000180 · (2−0)5
44 ≈ 4.1.
Ï More careful analysis will show that |f (4)(x)| ≤ 1300 whichimproves the bound to 0.89. Which is still larger than theapproximation. Actually, I ≈ 0.55.
Improper IntegralsWe wish to be able to talk about integrals of the form∫ 1
0
dxx
,∫ ∞
0
dx1+x2 ,
∫ 1
−1
dxx2
An integral having either an infinite limit of integration or anunbounded integrand is called an improper integral.
The idea: To approximate it by proper definite integrals.
Example
Determine∫ ∞
1
dxx2 ?
Ï For R > 1 we have∫ R
1
dxx2 =
[−1
x
]R
1=− 1
R+1.
Ï Taking the limit R →∞ yields∫ ∞
1
dxx2 = lim
R→∞
∫ R
1
dxx2 = 1.
We say that this improper integral converges.
Example
Determine∫ 1
0
dxpx?
Ï For T > 0 we have∫ 1
T
dxpx= [
2p
x]1T = 2
p1−2
pT .
Ï Taking the limit T → 0+ yields∫ 1
0
dxpx= lim
T→0+
∫ 1
T
dxpx= 2.
We say that this improper integral converges.
Example
Determine∫ 1
0
dxx?
Ï For T > 0 we have∫ 1
T
dxx
= [logx ]1T = log1− logT .
Ï Taking the limit T → 0+ yields∫ 1
0
dxx
= limT→0+
∫ 1
T
dxx
=∞.
We say that this improper integral diverges.
Improper Integral with Infinite Domain of IntegrationÏ If the integral
∫ R
af (x)dx exists for all R > a, then∫ ∞
af (x)dx = lim
R→∞
∫ R
af (x)dx
when the limit exists (and is finite).
Ï If the integral∫ b
rf (x)dx exists for all r < b, then∫ b
−∞f (x)dx = lim
r→−∞
∫ b
rf (x)dx
when the limit exists (and is finite).
Ï If the integral∫ R
rf (x)dx exists for all R > r , then∫ ∞
−∞f (x)dx = lim
r→−∞
∫ c
rf (x)dx + lim
R→∞
∫ R
cf (x)dx
when both limits exist (and are finite). Any c can be used.In this cases we say that the improper integral is convergent,otherwise it is divergent.
Improper Integral with Unbounded IntegrandÏ If the integral
∫ b
tf (x)dx exists for all a< t < b, then∫ b
af (x)dx = lim
t→a+
∫ b
tf (x)dx
when the limit exists (and is finite).
Ï If the integral∫ T
af (x)dx exists for all a<T < b, then∫ b
af (x)dx = lim
T→b−
∫ R
af (x)dx
when the limit exists (and is finite).
Ï Let a< c < b. If the integrals∫ T
af (x)dx and
∫ b
tf (x)dx exist
for all a<T < c and c < t < b, then∫ b
af (x)dx = lim
T→c−
∫ T
af (x)dx + lim
t→c+
∫ b
tf (x)dx
when both limits exist (and are finite).In this cases we say that the improper integral is convergent,otherwise it is divergent.
WarningConsider the integral
∫ ∞
−∞xdx . Since x is an odd function, for any
R one has∫ R
−Rxdx = 0.
It might be tempting to say that∫ ∞
∞xdx = 0 but always remember
that the definition required that we look at∫ 0
rxdx and
∫ R
0xdx
separately.
Since both∫ 0
−∞xdx and
∫ ∞
0xdx diverge then so does
∫ ∞
−∞xdx .
Basic Example (I)
Consider the improper integral∫ 1
0
dxxp for some p. For which values
of p will it converge and for which it will diverge?
SolutionÏ We first recall that∫ dx
xp ={ 1
(1−p)xp−1 +C , p 6= 1
log |x |+C , p = 1
Ï For p = 1, we have∫ 1
T
dxx
= [log |x |∣∣1T = log(1)− log(T )=− log(T ).
Ï Taking the limit T → 0+ we get
limT→0+
dxx
=− limT→0+ log(T )=∞,
so the improper integral is divergent.
Example Continued
Ï For p 6= 1 we have∫ 1
T
dxxp =
[1
(1−p)xp−1
∣∣∣∣1T
= 11−p
− 1(1−p)T p−1 .
Ï Taking the limit T → 0+ we get
limT→0+
∫ 1
T
dxxp = lim
T→0+
(1
1−p− 1(1−p)T p−1
)=
{∞, p > 1
11−p , p < 1
.
Ï Conclusion, the improper integral∫ 1
0
dxxp will converge if and
only if p < 1.Ï Note that for p ≤ 0 this is, in fact, a proper integral.
Basic Example (II)
Consider the improper integral∫ ∞
1
dxxp for some p. For which
values of p will it converge and for which it will diverge?
SolutionÏ Recall, again, that
∫ dxxp =
{ 1(1−p)xp−1 +C , p 6= 1
log |x |+C , p = 1
Ï For p = 1, we have∫ R
1
dxx
= [log |x |∣∣R1 = log(R)− log(1)= log(R).
Ï Taking the limit R →∞ we get
limR→∞
dxx
= limR→∞
log(R)=∞,
so the improper integral is divergent.
Example Continued
Ï For p 6= 1 we have∫ R
1
dxxp =
[1
(1−p)xp−1
∣∣∣∣R1= 1(1−p)Rp−1 − 1
1−p.
Ï Taking the limit R →∞ we get
limR→∞
∫ 1
R
dxxp = lim
R→∞
(1
(1−p)Rp−1 − 11−p
)=
{∞, p < 1
1p−1 , p > 1
.
Ï Conclusion, the improper integral∫ ∞
1
dxxp will converge if and
only if p > 1.
Question (Final 2010)
Evaluate∫ −1
−∞e2xdx . Simplify your answer as much as possible.
Solution
Ï∫ −1
re2xdx =
[e2x
2
∣∣∣∣−1
r= e−2−er
2.
Ï Taking the limit r →−∞ yields
∫ −1
−∞e2xdx = lim
r→−∞e−2−er
2= e−2
2.
QuestionFind a constant C such that
∫ ∞
−∞Cdx1+x2 = 1.
Solution
Ï Recall that∫ dx
1+x2 = arctan(x)+C .
Ï∫ R
0
Cdx1+x2 =C arctan(R)−C arctan(0)=C arctan(R) −→
R→∞Cπ2
.
Ï Similarly, limr→−∞
∫ 0
r
Cdx1+x2 = Cπ
2.
Ï It follows that∫ ∞
−∞Cdx1+x2 =Cπ.
Ï We need to take C = 1π
.
Question (Final 2009)
For what values of p does∫ ∞
e
dxx (logx)p
converge?
Ï For R > e we make the substitution u(x)= log(x),∫ R
e
dxx (logx)p
=∫ log(R)
1
duup
Since limR→∞ log(R)=∞ the left hand side converge if and
only if∫ ∞
1
duup converges, which happens if and only if p > 1.
Question (Math 103 Final, 2013)Evaluate the integral if it exists, otherwise show that it doesn’t:
I =∫ 2
0
dx1−x2 .
SolutionsÏ The function 1
1−x2 is discontinuous at x = 1.Ï Recall that
11−x2 = 1
2
(1
1−x+ 11+x
).
Since 11+x is continuous on [0,2] it is integrable there so we
start by checking whether∫ 2
0
dx1−x
is convergent or divergent.
Ï In order for∫ 2
0
dx1−x
to be convergent, both∫ 1
0
dx1−x
and∫ 2
1
dx1−x
needs to be convergent.
Solutions ContinuedWe consider
∫ 1
0
dx1−x
and make the substitution u = 1−x . We have
∫ 1
0
dx1−x
=∫ 1
0
duu
which is divergent. Hence, so does I =∫ 2
0
dx1−x2 .
Convergence Tests for ImproperIntegrals
Sometimes, we only want to check whether an integral isconvergent or not.
Comparison Test
Let a be a real number. Let f and g be functions that are definedand continuous for all x ≥ a and assume that g(x)≥ for all x ≥ 0.
1. If |f (x)| ≤ g(x) for all x ≥ a and if∫ ∞
ag(x)dx converges then∫ ∞
af (x)dx also converges.
2. If f (x)≥ g(x) for all x ≥ a and if∫ ∞
ag(x)dx diverges then so
does∫ ∞
af (x)dx .
Similarly for a bounded domain with unbounded integrand.
Example
Determine whether the improper integral∫ ∞
1
dxx2+1
is convergentor not.
SolutionÏ We note that for any x we have x2+1> x2 and hence
1x2+1 < 1
x2 .
Ï Recall that∫ ∞
1
dxx2+1
is convergent.
Ï By the comparison test,∫ ∞
1
dxx2+1
is convergent.
Example
Determine whether the improper integral∫ ∞
2
dxx2−1
is convergentor not.
SolutionÏ It is not true that 1
x2−1 < 1x2 so the simple minded comparison
will not help here.Ï Warning: The fact that 1
x2−1 > 1x2 doesn’t men that the
integral is divergent. More generally, being smaller than adivergent integral doesn’t mean anything and being biggerthan a convergent integral doesn’t mean anything (a dogwhich is tamer than a wild dog can still bite and a dog whichis wilder than a tamed dog doesn’t have to bite).
Ï Heuristically, 1x2−1 should behave similarly to 1
x2 so the integralshould converge.
Example
Determine whether the improper integral∫ ∞
2
dxx2−1
is convergentor not.
SolutionÏ We still have x2−1> x2−2x +1= (x −1)2. Indeed
x2−1> x2−2x +1⇔ 2x > 2⇔ x > 1.
Ï By the comparison test, if we’ll show that∫ ∞
2
dx(x −1)2
is
convergent it will follow that so does∫ ∞
2
dxx2−1
.
Ï Indeed, ∫ R
2
dx(x −1)2
=[− 1
x −1
]R
2= 1− 1
R −1−→
R→∞1
and hence∫ ∞
2
dx(x −1)2
is convergent.
ExampleDetermine whether the improper integral
∫ ∞
1
1+ sinxx2 dx is
convergent or not.
SolutionÏ Note that
∣∣∣1+sinxx2
∣∣∣≤ 2x2 for x ≥ 1.
Ï∫ ∞
1
dxx2 converges.
Ï By the comparison test, so is∫ ∞
1
1+ sinxx2 dx .