calculus review

46
Review of Calculus MATH 375 Numerical Analysis J. Robert Buchanan Department of Mathematics Fall 2010 J. Robert Buchanan Review of Calculus

Upload: moncy

Post on 27-Jan-2016

5 views

Category:

Documents


2 download

DESCRIPTION

A summarized version of the basic calculus.

TRANSCRIPT

Page 1: Calculus Review

Review of CalculusMATH 375 Numerical Analysis

J. Robert Buchanan

Department of Mathematics

Fall 2010

J. Robert Buchanan Review of Calculus

Page 2: Calculus Review

Motivation

The subject of this course is numerical analysis.

Numerical analysis includes, but is not limited to, a study ofnumerical methods.In addition to numerical methods we will use the tools ofcalculus (real analysis) to understand the limitations anderrors present in given numerical methods.We begin with a review of single variable calculus,particularly Taylor’s Theorem.

J. Robert Buchanan Review of Calculus

Page 3: Calculus Review

Motivation

The subject of this course is numerical analysis.Numerical analysis includes, but is not limited to, a study ofnumerical methods.

In addition to numerical methods we will use the tools ofcalculus (real analysis) to understand the limitations anderrors present in given numerical methods.We begin with a review of single variable calculus,particularly Taylor’s Theorem.

J. Robert Buchanan Review of Calculus

Page 4: Calculus Review

Motivation

The subject of this course is numerical analysis.Numerical analysis includes, but is not limited to, a study ofnumerical methods.In addition to numerical methods we will use the tools ofcalculus (real analysis) to understand the limitations anderrors present in given numerical methods.

We begin with a review of single variable calculus,particularly Taylor’s Theorem.

J. Robert Buchanan Review of Calculus

Page 5: Calculus Review

Motivation

The subject of this course is numerical analysis.Numerical analysis includes, but is not limited to, a study ofnumerical methods.In addition to numerical methods we will use the tools ofcalculus (real analysis) to understand the limitations anderrors present in given numerical methods.We begin with a review of single variable calculus,particularly Taylor’s Theorem.

J. Robert Buchanan Review of Calculus

Page 6: Calculus Review

Limits

DefinitionA function f defined on a set S of real numbers has a limit L atx0, denoted

limx→x0

f (x) = L,

if for every ε > 0, there exists a real number δ > 0 such that

|f (x)− L| < ε, whenever x ∈ S and 0 < |x − x0| < δ.

J. Robert Buchanan Review of Calculus

Page 7: Calculus Review

Graphical Interpretation

x0-∆ x0 x0+∆x

L-Ε

LL+Ε

fHxL

J. Robert Buchanan Review of Calculus

Page 8: Calculus Review

Limit of a Sequence

DefinitionLet {xn}∞n=1 be an infinite sequence of real numbers. Thesequence has the limit L (or is said to converge to L) if, forevery ε > 0 there exists a positive integer N(ε) such thatwhenever n > N(ε) then |xn − L| < ε.

The notations

limn→∞

xn = L, or

xn → L as n→∞

denote the convergence of {xn}∞n=1 to L.

J. Robert Buchanan Review of Calculus

Page 9: Calculus Review

Limit of a Sequence

DefinitionLet {xn}∞n=1 be an infinite sequence of real numbers. Thesequence has the limit L (or is said to converge to L) if, forevery ε > 0 there exists a positive integer N(ε) such thatwhenever n > N(ε) then |xn − L| < ε.

The notations

limn→∞

xn = L, or

xn → L as n→∞

denote the convergence of {xn}∞n=1 to L.

J. Robert Buchanan Review of Calculus

Page 10: Calculus Review

Graphical Interpretation

NHΕL

LL-Ε

L+Ε

J. Robert Buchanan Review of Calculus

Page 11: Calculus Review

Continuity

DefinitionLet function f be defined on a set S of real numbers andsuppose x0 ∈ S. We say that f is continuous at x0 if

limx→x0

f (x) = f (x0).

The function f is continuous on the set S if it is continuous ateach x ∈ S.

DefinitionThe set of functions continuous on set S will be denoted C(S).

J. Robert Buchanan Review of Calculus

Page 12: Calculus Review

Continuity

DefinitionLet function f be defined on a set S of real numbers andsuppose x0 ∈ S. We say that f is continuous at x0 if

limx→x0

f (x) = f (x0).

The function f is continuous on the set S if it is continuous ateach x ∈ S.

DefinitionThe set of functions continuous on set S will be denoted C(S).

J. Robert Buchanan Review of Calculus

Page 13: Calculus Review

Continuity and Sequences

TheoremLet f be a function defined on a set S and let x0 ∈ S, then thefollowing statements are equivalent.

1 Function f is continuous at x0.2 If {xn}∞n=1 is any sequence in S converging to x0, then

limn→∞

f (xn) = f (x0).

J. Robert Buchanan Review of Calculus

Page 14: Calculus Review

Differentiability

DefinitionLet f be a function defined in an open interval containing x0.Then f is differentiable at x0 if

limx→x0

f (x)− f (x0)

x − x0

exists. Provided the limit exists we denote it f ′(x0) and call it thederivative of f at x0. If function f has a derivative at each x in aset S, we say f is differentiable on S.

TheoremIf function f is differentiable at x0, then f is continuous at x0.

J. Robert Buchanan Review of Calculus

Page 15: Calculus Review

Differentiability

DefinitionLet f be a function defined in an open interval containing x0.Then f is differentiable at x0 if

limx→x0

f (x)− f (x0)

x − x0

exists. Provided the limit exists we denote it f ′(x0) and call it thederivative of f at x0. If function f has a derivative at each x in aset S, we say f is differentiable on S.

TheoremIf function f is differentiable at x0, then f is continuous at x0.

J. Robert Buchanan Review of Calculus

Page 16: Calculus Review

Graphical Interpretation

Hx0,fHx0LLslope: f'Hx0L

x0

x

fHx0L

fHxL

J. Robert Buchanan Review of Calculus

Page 17: Calculus Review

Sets of Differentiable Functions

We will frequently use the following notation.Cn(S): the set of all functions that have n continuous

derivatives on set S.C∞(S): the set of all functions that have derivatives of all

orders on set S.

Example1 If p(x) is a polynomial, then p ∈ C∞(R).2 If f (x) = ln x , then f ∈ C∞(0,∞).

3 If f (x) =

∫ x

0|t |dt , then f ∈ C1(R).

J. Robert Buchanan Review of Calculus

Page 18: Calculus Review

Sets of Differentiable Functions

We will frequently use the following notation.Cn(S): the set of all functions that have n continuous

derivatives on set S.C∞(S): the set of all functions that have derivatives of all

orders on set S.

Example1 If p(x) is a polynomial, then p ∈ C∞(R).2 If f (x) = ln x , then f ∈ C∞(0,∞).

3 If f (x) =

∫ x

0|t |dt , then f ∈ C1(R).

J. Robert Buchanan Review of Calculus

Page 19: Calculus Review

Rolle’s Theorem

TheoremSuppose f ∈ C[a,b] andf is differentiable on(a,b). If f (a) = f (b), thenthere exists c ∈ (a,b)such that f ′(c) = 0.

f'HcL=0

a bcx

fHaL=fHbL

y

J. Robert Buchanan Review of Calculus

Page 20: Calculus Review

Mean Value Theorem

TheoremSuppose f ∈ C[a,b] andf is differentiable on(a,b). There existsc ∈ (a,b) such that

f ′(c) =f (b)− f (a)

b − a.

slope: f'HcL

slope:f HbL - f HaL

b - a

a bcx

fHaL

fHbL

y

J. Robert Buchanan Review of Calculus

Page 21: Calculus Review

Extreme Value Theorem

TheoremIf f ∈ C[a,b] then there exist c1 ∈ [a,b] and c2 ∈ [a,b] such thatf (c1) ≤ f (x) ≤ f (c2) for all x ∈ [a,b]. If additionally f isdifferentiable on (a,b), then the numbers c1 and c2 occur eitherat the endpoints of [a,b] or where f ′(c) = 0.

In the definition above f (c1) and f (c2) are referred to as theabsolute minimum and absolute maximum of f on [a,b]respectively.

J. Robert Buchanan Review of Calculus

Page 22: Calculus Review

Extreme Value Theorem

TheoremIf f ∈ C[a,b] then there exist c1 ∈ [a,b] and c2 ∈ [a,b] such thatf (c1) ≤ f (x) ≤ f (c2) for all x ∈ [a,b]. If additionally f isdifferentiable on (a,b), then the numbers c1 and c2 occur eitherat the endpoints of [a,b] or where f ′(c) = 0.

In the definition above f (c1) and f (c2) are referred to as theabsolute minimum and absolute maximum of f on [a,b]respectively.

J. Robert Buchanan Review of Calculus

Page 23: Calculus Review

Intermediate Value Theorem

TheoremIf f ∈ C[a,b] and K isany number betweenf (a) and f (b), then thereexists a numberc ∈ (a,b) for whichf (c) = K .

Ha,fHaLL

Hb,fHbLL

a bcx

fHaL

fHbL

K

y

J. Robert Buchanan Review of Calculus

Page 24: Calculus Review

Example

Example

Show that p(x) = x5 − 3x3 + 2x − 1 has a root in the interval[0,2].

J. Robert Buchanan Review of Calculus

Page 25: Calculus Review

Generalized Rolle’s Theorem

On occasion we will need a stronger version of Rolle’sTheorem.

TheoremSuppose f ∈ C[a,b] is n times differentiable on (a,b). If f hasn + 1 distinct roots

a ≤ x0 < x1 < · · · < xn ≤ b,

then there exists c ∈ (x0, xn) ⊂ (a,b) such that f (n)(c) = 0.

J. Robert Buchanan Review of Calculus

Page 26: Calculus Review

Riemann Integrals (1 of 2)

DefinitionLet P = {x0, x1, . . . , xn} be a set of numbers in [a,b] such that

a = x0 ≤ x1 ≤ · · · ≤ xn = b.

Set P is called a partition of [a,b]. If ∆xi = xi − xi−1 then‖P‖ = max

i=1,...,n{∆xi} is called the norm of P.

J. Robert Buchanan Review of Calculus

Page 27: Calculus Review

Riemann Integrals (2 of 2)

DefinitionLet function f be defined on [a,b] and let P be any partition of[a,b]. If zi ∈ [xi−1, xi ] for i = 1, . . . ,n then the Riemannintegral of f on [a,b] is

lim‖P‖→0

n∑i=1

f (zi)∆xi ,

provided the limit exists and is the same for every partition andchoice of zi .

If the Riemann integral exists, it will be denoted∫ b

af (x) dx .

J. Robert Buchanan Review of Calculus

Page 28: Calculus Review

Riemann Integrals (2 of 2)

DefinitionLet function f be defined on [a,b] and let P be any partition of[a,b]. If zi ∈ [xi−1, xi ] for i = 1, . . . ,n then the Riemannintegral of f on [a,b] is

lim‖P‖→0

n∑i=1

f (zi)∆xi ,

provided the limit exists and is the same for every partition andchoice of zi .

If the Riemann integral exists, it will be denoted∫ b

af (x) dx .

J. Robert Buchanan Review of Calculus

Page 29: Calculus Review

Riemann Integral and Continuity

TheoremIf f ∈ C[a,b] then the Riemann integral of f on [a,b] exists andcan be evaluated as∫ b

af (x) dx = lim

n→∞

b − an

n∑i=1

f(

a +b − a

ni)

J. Robert Buchanan Review of Calculus

Page 30: Calculus Review

Graphical Interpretation

a=x0 xi b=xn

x

y

J. Robert Buchanan Review of Calculus

Page 31: Calculus Review

Weighted Mean Value Theorem for Integrals

TheoremSuppose function f ∈ C[a,b] and suppose function g isRiemann integrable on [a,b] and that g(x) does not changesign on [a,b]. There exists c ∈ (a,b) such that∫ b

af (x) g(x) dx = f (c)

∫ b

ag(x) dx .

If g(x) = 1 on [a,b] then f (c) can be called the average valueof f on [a,b].

J. Robert Buchanan Review of Calculus

Page 32: Calculus Review

Weighted Mean Value Theorem for Integrals

TheoremSuppose function f ∈ C[a,b] and suppose function g isRiemann integrable on [a,b] and that g(x) does not changesign on [a,b]. There exists c ∈ (a,b) such that∫ b

af (x) g(x) dx = f (c)

∫ b

ag(x) dx .

If g(x) = 1 on [a,b] then f (c) can be called the average valueof f on [a,b].

J. Robert Buchanan Review of Calculus

Page 33: Calculus Review

Average Value: Graphical Interpretation

a c bx

fHcL

y

J. Robert Buchanan Review of Calculus

Page 34: Calculus Review

Taylor’s Theorem

Theorem

Suppose function f ∈ Cn[a,b] and that f (n+1) exists on [a,b]and let x0 ∈ [a,b]. For every x ∈ [a,b], there exists a numberz(x) between x0 and x such that f (x) = Pn(x) + Rn(x), where

Pn(x) =n∑

k=0

f (k)(x0)

k !(x − x0)k

is called the nth Taylor polynomial for f about x0, and

Rn(x) =f (n+1)(z(x))

(n + 1)!(x − x0)n+1

is called the nth Taylor remainder.

In the case where x0 = 0 these are sometimes calledMaclaurin polynomials.

J. Robert Buchanan Review of Calculus

Page 35: Calculus Review

Taylor’s Theorem

Theorem

Suppose function f ∈ Cn[a,b] and that f (n+1) exists on [a,b]and let x0 ∈ [a,b]. For every x ∈ [a,b], there exists a numberz(x) between x0 and x such that f (x) = Pn(x) + Rn(x), where

Pn(x) =n∑

k=0

f (k)(x0)

k !(x − x0)k

is called the nth Taylor polynomial for f about x0, and

Rn(x) =f (n+1)(z(x))

(n + 1)!(x − x0)n+1

is called the nth Taylor remainder.

In the case where x0 = 0 these are sometimes calledMaclaurin polynomials.

J. Robert Buchanan Review of Calculus

Page 36: Calculus Review

Example

Example

Let f (x) = ln x and x0 = 1.1 Find the second Taylor polynomial and remainder for f

about x0. Use this polynomial to approximate ln 1.1 andestimate the error in the approximation from the remainder.

2 Find the third Taylor polynomial and remainder for f aboutx0. Use this polynomial to approximate ln 1.1 and estimatethe error in the approximation from the remainder.

J. Robert Buchanan Review of Calculus

Page 37: Calculus Review

Solution: n = 2

ln x = P2(x) + R2(x)

= 0 +1/11!

(x − 1)− 1/12

2!(x − 1)2 +

2/(z(x))3

3!(x − 1)3

= (x − 1)− 12

(x − 1)2 +1

3(z(x))3 (x − 1)3

If x = 1.1 then P2(1.1) = 0.095 and

| ln 1.1− P2(1.1)| = |R2(1.1)| = 0.00031

(z(1.1))3 ≤ 0.0003

since 1 ≤ z(1.1) ≤ 1.1.

J. Robert Buchanan Review of Calculus

Page 38: Calculus Review

Solution: n = 2

ln x = P2(x) + R2(x)

= 0 +1/11!

(x − 1)− 1/12

2!(x − 1)2 +

2/(z(x))3

3!(x − 1)3

= (x − 1)− 12

(x − 1)2 +1

3(z(x))3 (x − 1)3

If x = 1.1 then P2(1.1) = 0.095 and

| ln 1.1− P2(1.1)| = |R2(1.1)| = 0.00031

(z(1.1))3 ≤ 0.0003

since 1 ≤ z(1.1) ≤ 1.1.

J. Robert Buchanan Review of Calculus

Page 39: Calculus Review

Solution: n = 3

ln x = P3(x) + R3(x)

= 0 +1/11!

(x − 1)− 1/12

2!(x − 1)2 +

2/13

3!(x − 1)3

− 6/(z(x))4

4!(x − 1)4

= (x − 1)− 12

(x − 1)2 +13

(x − 1)3 − 14(z(x))4 (x − 1)4

If x = 1.1 then P3(1.1) = 0.0953 and

| ln 1.1−P3(1.1)| = |R3(1.1)| = 0.0000251

(z(1.1))4 ≤ 0.000025

since 1 ≤ z(1.1) ≤ 1.1.

J. Robert Buchanan Review of Calculus

Page 40: Calculus Review

Solution: n = 3

ln x = P3(x) + R3(x)

= 0 +1/11!

(x − 1)− 1/12

2!(x − 1)2 +

2/13

3!(x − 1)3

− 6/(z(x))4

4!(x − 1)4

= (x − 1)− 12

(x − 1)2 +13

(x − 1)3 − 14(z(x))4 (x − 1)4

If x = 1.1 then P3(1.1) = 0.0953 and

| ln 1.1−P3(1.1)| = |R3(1.1)| = 0.0000251

(z(1.1))4 ≤ 0.000025

since 1 ≤ z(1.1) ≤ 1.1.

J. Robert Buchanan Review of Calculus

Page 41: Calculus Review

Return to Course Objectives

Our use of Taylor’s Theorem illustrates two of the objectives ofNumerical Analysis.

1 Given a problem, find an approximation to the solution tothe problem.

2 Determine a bound for the accuracy of the approximatedsolution.

J. Robert Buchanan Review of Calculus

Page 42: Calculus Review

Example

Example

Use the third Taylor polynomial and remainder for f (x) = ln xabout x0 = 1 to approximate∫ 1.1

1ln x dx

and determine a bound for the error in the approximation.

J. Robert Buchanan Review of Calculus

Page 43: Calculus Review

Solution (1 of 2)

∫ 1.1

1ln x dx =

∫ 1.1

1P3(x) dx +

∫ 1.1

1R3(x) dx

=

∫ 1.1

1

[(x − 1)− 1

2(x − 1)2 +

13

(x − 1)3]

dx

−∫ 1.1

1

14(z(x))4 (x − 1)4 dx

=

[(x − 1)2

2− (x − 1)3

6+

(x − 1)4

12

]∣∣∣∣1.1

1

− 14

∫ 1.1

1

(x − 1)4

(z(x))4 dx

=(0.1)2

2− (0.1)3

6+

(0.1)4

12− 1

4

∫ 1.1

1

(x − 1)4

(z(x))4 dx

= 0.0048416− 14

∫ 1.1

1

(x − 1)4

(z(x))4 dxJ. Robert Buchanan Review of Calculus

Page 44: Calculus Review

Solution (2 of 2)

∫ 1.1

1ln x dx ≈ 0.0048416

and the error is∣∣∣∣∣∫ 1.1

1(ln x − P3(x)) dx

∣∣∣∣∣ =

∣∣∣∣∣∫ 1.1

1R3(x) dx

∣∣∣∣∣=

14

∣∣∣∣∣∫ 1.1

1

(x − 1)4

(z(x))4 dx

∣∣∣∣∣≤ 1

4

∫ 1.1

1

∣∣∣∣(x − 1)4

(z(x))4

∣∣∣∣ dx

≤ 14

∫ 1.1

1(x − 1)4 dx

= 5× 10−7.

J. Robert Buchanan Review of Calculus

Page 45: Calculus Review

Taylor Series

If function f ∈ C∞[a,b] and limn→∞

Rn(x) = 0 then we may call

limn→∞

Pn(x) =∞∑

k=0

f (k)(x0)

k !(x − x0)k

the Taylor series for f about x0 provided the infinite seriesconverges.

J. Robert Buchanan Review of Calculus

Page 46: Calculus Review

Homework

Read Section 1.1.Exercises: 1, 2, 5, 9, 14, 15, 19, 27

J. Robert Buchanan Review of Calculus