Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 30

https://graphsketch.

com/
Example 1

Easy for   0 :

sin 0  0
cos 0  1
What about   5 0?

Easy for    / 2  900


sin  / 2  1
y y
sin   

cos / 2  0
h x2
 y2

x x What about
cos   
h x2  y2  
 
2 60
1
Example 2

f ( x )  e x  x3

Easy for x0 : f (0) 1

What about x  0.1 ?

Easy for x 1 : f (1 )  e 1

What about x  0.9 or x  1.1 ?

2
f ( x )  sin x at x  0.1
The line tangent to f(x)=sin x at x=0 is f1(x)=?????

Seems to be OK up
for x<0.3
3
f ( x )  sin x at x  0.1
The line tangent to f(x)=sin x at x=0 is f1(x)=?????

What is the error of this approximation?

Can we do better?

How to approximate sin(x) at other points?

Seems to be OK up
for x<0.3
4
Example 2 f ( x )  e x  x3 at x  0.1
Let’s try linear approximation with a tangent line to f(x) at x0=0
Equation of the line tangent to f ( x )  e x  x3 at x=0 is ?????

x+1
f ( x )  e x  x3 x+1 f ( x )  ex  x3

0.1 0.2

5
Example 2 f ( x )  e x  x3 at x  0.1
Let’s try linear approximation with a tangent line to f(x) at x0=0
Equation of the line tangent to f ( x )  e x  x3 at x=0 is ?????

x+1
f ( x )  e x  x3 x+1 f ( x )  ex  x3

What is the error of this approximation?

Can we do better?

How to approximate sin(x) at other points?

0.1 0.2

6
Example 2 f ( x )  e x  x3 at x  0.1

Let’s try the same approach: linear approximation with a tangent line to f(x) at x0=0

The slope of the line tangent to f ( x )  e x  x3 at x=0 is equal to 1


Equation of the line tangent to f ( x )  e x  x3 at x=0 is f1(x)=x+1

x+1
f ( x )  e x  x3 x+1 f ( x )  e x  x3
What is the error of this approximation?

Can we do better?

How to approximate sin(x) at other


points?

0 0.1 0.2
7
Taylor’s theorem
Remainder!

lim hk ( x )( x  a )k  0
xa

8
Taylor’s theorem
Remainder ! (in the Peano form)

lim hk ( x )  0
xa

Taylor’s polynome

9
Taylor’s theorem
Remainder ! (in the Peano form)

lim hk ( x )  0
xa

Taylor’s polynome

Reminder
Rk ( x )  f ( x )  Pk ( x )

10
Again example 1!
f ( x )  sin x at x  0.1
Let’s try Taylor’s theorem at a point a=0

Derivatives Value at x0=0

11
f ( x )  sin x at x  0.1
Let’s try Taylor’s theorem at a point a=0

Derivatives Value at x0=0


f ( x )  sin x 0
f ' ( x )  cos x 1
f ' ' ( x )   sin x 0
f ( 3 )( x )   cos x 1
f ( 4 )( x )  sin x 0
f ( 5 )( x )  cos x 1

f ( x )  sin x  0  x  0  x  0  x  ....  hk x x k
1 3 1 5
3! 5! 12
Again example 1!
f ( x )  sin x at x  0.1
Let’s try Taylor’s theorem at a point a=0

1 3 1 5 1 7 1 9 1 11
f ( x )  sin x  x  x  x  x  x  x ...
3! 5! 7! 9! 11!

1 term 2 terms 3 terms

P1x   x P3  x   x  P5 x   x 
1 3 1 3 1 5
x x  x
3! 3! 5!

13
Again example 1!
f ( x )  sin x at x  0.1
Let’s try Taylor’s theorem at a point a=0

1 3 1 5 1 7 1 9 1 11
f ( x )  sin x  x  x  x  x  x  x ...
3! 5! 7! 9! 11!
1 term 2 terms 3 terms

4 terms 5 terms 6 terms

14
Again example 1!
f ( x )  sin x at x  0.1
Let’s try Taylor’s theorem at a point a=0

1 3 1 5 1 7 1 9 1 11
f ( x )  sin x  x  x  x  x  x  x ...
3! 5! 7! 9! 11!
1 term 2 terms 3 terms

What is the error of this approximation, i.e.


what is a remainder?

In which region around the point x=a the


4 terms approximation 6 terms
5 termsis « more or less » valid?

Can we do better?

15
Another example from
https://en.wikipedia.org/wiki/Taylor%27s_theorem#Statement_of_the_theorem)

1 Approximation of f(x) by its Taylor polynomials Pk of order k = 1, ..., 16


f ( x)  centered at x = 0 (red) and x = 1 (green). The approximations do not
1  x2 improve at all outside (-1,1) and (1-√2,1+√2), respectively.

16
Another example from
https://en.wikipedia.org/wiki/Taylor%27s_theorem#Statement_of_the_theorem)

1 Approximation of f(x) by its Taylor polynomials Pk of order k = 1, ..., 16


f ( x)  centered at x = 0 (red) and x = 1 (green). The approximations do not
1  x2 improve at all outside (-1,1) and (1-√2,1+√2), respectively.

What is the error of this approximation,


i.e. what is a remainder?

In which region around the point x=a the


approximation is « more or less » valid?

Can we do better?

17
Estimation of the remainder

Let’s approximate f ( x )  sin x with Blue line: f ( x )  sin x : r  x  r


a=0 with the error of approximation less
than 10-8 with k=7. For which interval
this will be valid?

-r r

18
Estimation of the remainder

Let’s approximate f ( x )  sin x with Blue line: f ( x )  sin x : r  x  r


a=0 with the error of approximation less
than 10-8 with k=7. For which interval
this will be valid?
1 3 1 5 1 7
sin x  x  x  x  x  ..R7 ( x)
3! 5! 7!
R7 ( x)  108
-r r

19
Estimation of the remainder

Let’s approximate f ( x )  sin x with Blue line: f ( x )  sin x : r  x  r


a=0 with the error of approximation less
than 10-8 with k=7. For which interval
this will be valid?
1 3 1 5 1 7
sin x  x  x  x  x  ..R7 ( x)
3! 5! 7!
R7 ( x)  108
-r r
Remainder is estimated as
f ( k 1) ( ) k 1  :  r, r 
Rk ( x)  x  where  is somewhere in
(k  1)!

20
Estimation of the remainder

Let’s approximate f ( x )  sin x with Blue line: f ( x )  sin x : r  x  r


a=0 with the error of approximation less
than 10-8 with k=7. For which interval
this will be valid?
1 3 1 5 1 7
sin x  x  x  x  x  ..R7 ( x)
3! 5! 7!
R7 ( x)  108
-r r

Check:
sin 0.38  0.3709204694
Taylor
P7 (k )  0.3709204690
21
Estimation of the remainder

Let’s approximate f ( x )  sin x with Blue line: f ( x )  sin x : r  x  r


a=0 with the error of approximation less
than 10-8 with k=7. For which interval
this will be valid?
1 3 1 5 1 7
sin x  x  x  x  x  ..R7 ( x)
3! 5! 7!
R7 ( x)  108
-r OK r
What is the error of this approximation, i.e.
Remainder is estimated as
what is a remainder?
f ( k 1) ( ) k 1
Rk ( x)  x  In which
where  is somewhere in  :  r, r 
(k  1)! region around the point x=a the
approximation is «Rmore
But we know that max( f ( x))  1 => k ( x )  or less r k 1
1 » valid?
(k  1)!
Check:
How better can we do?
sin 0.38  0.3709204694
So, the requirement is
1
r k 1  108 => r  8 108  8! r  0.3672029 Taylor
(k  1)! k 7 P7 (k )  0.3709204690
22
Estimation of the remainder

Let’s approximate f ( x )  sin x with Blue line: f ( x )  sin x : r  x  r


a=0 with the error of approximation less
than 10-8 with k=7. For which interval
this will be valid?
1 3 1 5 1 7
sin x  x  x  x  x  ..R7 ( x)
3! 5! 7!
R7 ( x)  108
-r OK r
What is the error of this approximation, i.e.
Remainder is estimated as
what is a remainder?
f ( k 1) ( ) k 1
Rk ( x)  x  In which
where  is somewhere in  :  r, r 
OK
(k  1)! region around the point x=a the
approximation is «Rmore
But we know that max( f ( x))  1 => k ( x )  or less r k 1
1 » valid?
(k  1)!
Check:
How better can we do?
sin 0.38  0.3709204694
So, the requirement is
1
r k 1  108 => r  8 108  8! r  0.3672029 Taylor
(k  1)! k 7 P7 (k )  0.3709204690
23
24
If continue to infinity (although not very practical)?
25
If continue to infinity (although not very practical)?
SERIES
 f k   x 
f ( x)  f a    x  a k Taylor series
k 1 k!

f k  0 k
f ( x)  f 0   x MacLaurin series
k 1 k!

26
SERIES
 f k   x 
f ( x)  f a    x  a k Taylor series
k 1 k!

f k  0 k
f ( x)  f 0   x MacLaurin series
k 1 k!

BUT
Is it possible that
the sum of infinite number of terms
is still finite?

27
Is it possible that
the sum of infinite number of terms
is still finite?

YES!
Examples for    x   MacLaurin series


sin x  
 1k x 2 k 1  x 
1 3 1 5 1 7
x  x  x  ...
k 0 2k  1! 3! 5! 7!

cos x 

 1 k x 2 x3
e   x  1 x 
x
  ...
k 0 k! 2 3!
28
Other examples
    1...  k  1 x2 x3
1  x 

  x  1  x     1     1  2  ...
k
k 0 k! 2! 3!

1  x  1


ln 1  x   
 1k 1 x k  x  x 2  x3  x 4 ... 1  x  1
k 1 k 2 3 4

How to check convergence/ define interval of convergence?

29
How to check convergence/ define interval of convergence?

D’Alembert’s ratio test

an1
Consider a series an  . It converges if a limit exist:   lim q
n an

and q 1


ln 1  x   
 1k 1 x k  x  x 2  x3  x 4 ...
k 1 k 2 3 4

 1k  2 k x k 1 k
  lim
k   1k 1 k  1 x k
 lim
k  k  1
x x 1  x  1

30

You might also like