06.09.2021 Views

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 1. INTRODUCTION 7<br />

Notation: C n (A) denotes the set of all functions f such that f and its first n derivatives<br />

are cont<strong>in</strong>uous on A. If f is only cont<strong>in</strong>uous on A, then we write f ∈ C 0 (A). C ∞ (A)<br />

consists of functions that have derivatives of all orders, for example, f(x) =s<strong>in</strong>x or<br />

f(x) =e x .<br />

The follow<strong>in</strong>g well-known theorems of Calculus will often be used <strong>in</strong> the rema<strong>in</strong>der of the<br />

book.<br />

Theorem 4 (Mean value theorem). If f ∈ C 0 [a, b] and f is differentiable on (a, b), then<br />

there exists c ∈ (a, b) such that f ′ (c) = f(b)−f(a)<br />

b−a<br />

.<br />

Theorem 5 (Extreme value theorem). If f ∈ C 0 [a, b] then the function atta<strong>in</strong>s a m<strong>in</strong>imum<br />

and maximum value over [a, b]. If f is differentiable on (a, b), then the extreme values occur<br />

either at the endpo<strong>in</strong>ts a, b or where f ′ is zero.<br />

Theorem 6 (Intermediate value theorem). If f ∈ C 0 [a, b] and K is any number between<br />

f(a) and f(b), then there exists c ∈ (a, b) <strong>with</strong> f(c) =K.<br />

Theorem 7 (Taylor’s theorem). Suppose f ∈ C n [a, b] and f (n+1) exists on (a, b), and x 0 ∈<br />

(a, b). Then, for x ∈ (a, b)<br />

f(x) =P n (x)+R n (x)<br />

where P n is the nth order Taylor polynomial<br />

P n (x) =f(x 0 )+f ′ (x 0 )(x − x 0 )+f ′′ (x 0 ) (x − x 0) 2<br />

2!<br />

+ ... + f (n) (x 0 ) (x − x 0) n<br />

n!<br />

and R n is the rema<strong>in</strong>der term<br />

R n (x) =f (n+1) (ξ) (x − x 0) n+1<br />

(n +1)!<br />

for some ξ between x and x 0 .<br />

Example 8. Let f(x) =x cos x − x.<br />

1. F<strong>in</strong>d P 3 (x) about x 0 = π/2 and use it to approximate f(0.8).<br />

2. Compute the exact value for f(0.8), and the error |f(0.8) − P 3 (0.8)|.<br />

3. Use the rema<strong>in</strong>der term R 3 (x) to f<strong>in</strong>d an upper bound for the error |f(0.8) − P 3 (0.8)|.<br />

Compare the upper bound <strong>with</strong> the actual error found <strong>in</strong> part 2.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!