TAYLORS FORMEL FÖR FUNKTIONER AV EN VARIABEL
Taylors formel används bl. a. vid i) numeriska beräkningar ii) optimering och iii) härledningar inom olika tekniska och matematiska områden.
a) Taylors formel kring punkten a
. och a mellan ligger som ett tal är och ) )! (
1 (
) där (
)
! ( ) ... (
)
! ( 3
) ) (
! ( 2
) ) (
)(
( ) ( ) (
1 )
1 (
) ( 3
2
x c
a n x
c R f
R a n x
a a f
a x a f
a x a f
x a f a f x f
n n
n n
+ +
+ −
=
+
− +
+
′′′ − +
′′ − +
′ − +
=
Resttermen R kallas Lagranges restterm av ordning n+1.
b) Taylors polynom av ordning n
n n
n x a
n a a f
a x a f
a x a f
x a f a f x
T ( )
! ) ... (
)
! ( 3
) ) (
! ( 2
) ) (
)(
( ) ( ) (
) ( 3
2 ′′′ − + + −
+
′′ − +
′ − +
=
c) Taylors serie
∑
∞∞ =
∞
−
=
+
′′′ − +
′′ − +
′ − +
=
0 ) (
3 2
)
! ( ) ) (
(
kortare eller
...
)
! ( 3
) ) (
! ( 2
) ) (
)(
( ) ( ) (
n
n n
a n x
a x f
T
a a x
a f a x
a f x a f a f x T
Speciellt fall då a=0 kallas ofta för Maclaurins formel (polynom, serie).
a) Maclaurins formel
. och 0 mellan ligger som är tal och
)!
1 (
) där (
! ) 0 ... (
! 3
) 0 (
! 2
) 0 ) (
0 ( ) 0 ( ) (
1 )
1 (
) ( 3
2
x c
n x c R f
R n x
x f x f
x f f f
x f
n n
n n
+ +
= +
+ +
′′′ +
′′ +
′ + +
=
b) Maclaurins polynom av ordning n
n n
n x
n x f
x f x f
f f
x
M !
) 0 ... (
! 3
) 0 (
! 2
) 0 ) (
0 ( ) 0 ( ) (
) ( 3
2 + ′′′ + +
+ ′′
+ ′
=
c) Maclaurins serie
Armin Halilovic: EXTRA ÖVNINGAR Taylors formelför envariabelfunktioner
∑
∞∞ =
∞
=
′′′ +
′′ +
′ + +
=
0 ) (
3 2
! ) 0 ) (
(
kortare eller
! ...
3 ) 0 (
! 2
) 0 ) (
0 ( ) 0 ( ) (
n
n n
n x x f
M
f x f x
x f f
x M
--- INTRESANT. Notera att Taylors polynom av ordning n
n n
n x a
n a a f
a x a f
a x a f
x a f a f x
T ( )
! ) ... (
)
! ( 3
) ) (
! ( 2
) ) (
)(
( ) ( ) (
) ( 3
2 + ′′′ − + + −
′′ − +
′ − +
=
har grad ≤ n och att graden blir < n om f(n)(a)=0. Alltså
grad(Taylorpolynom) ≤ ordning(Taylorpolynom) --- Viktiga Maclaurinutvecklingar:
n R x x
x e x
n
x = + + + + + +
!
! 3
! 2
! 1 1
3 2
L
n R x x
x x x
n
n +
− + +
− +
−
= +
)!
1 2 ) ( 1
! ( 5
! 3
! sin 1
1 2 5
3
L
n R x x
x x
n +
+
− +
−
=1 2! 4! (2 )!
cos
2 4
2
L
n R x x
x x x
n
n +
− +
− +
−
=
+ −1
3 2
) 1 3 (
2 ) 1
1
ln( L
R n x
n p p
x p p p x p
p x p
x p = + p + − + − − + + − − − n +
+ !
)) 1 ( ( ) 1 (
! 3
) 2 )(
1 (
! 2
) 1 (
! 1 1 ) 1
( 2 3 L L
n R x x
x x x
x
n
n +
− − +
− +
−
= − −
1 ) 2
1 7 (
5 arctan 3
1 2 1 7
5 3
L
Anmärkning: Inom härledningar i olika tekniska område används oftast linjära
approximationer (Maclaurinpolynom av ordning 1). Om x är litet tal, dvs om x går mot 0, då gäller följande linjära approximationer:
x ex ≈ 1+ ,
x x≈ sin
x x ≈ + ) 1 ln(
px x p ≈ +
+ ) 1
1 (
x x≈ arctan .
Exempel 1.
Bestäm Taylorpolynomet av ordning fyra till funktionen f(x)=ln(2x), kring punkten a=1.
Lösning:
Vi beräknar funktionen och derivator i punkten 1.
6 ) 1 ( 6
) (
2 ) 1 ( 2
) (
1 ) 1 ( )
(
1 ) 1 1 (
2 2 ) 1 (
2 ln ) 1 ( )
2 ln(
) (
) 4 ( 4
) 4 (
3 2
−
=
−
=
′′′ =
′′′ =
−
′′ =
−
′′ =
′ =
=
⋅
′ =
=
=
−
−
−
f x
x f
f x
x f
f x
x f
x f x x
f
f x
x f
Värdena substituerar vi i formeln för Taylors polynom (av ordning 4)
)
! ( 4
) ) (
! ( 3
) ) (
! ( 2
) ) (
( ) ( ) ( )
( (4)
4 3
2
4 x a f a
a a f
a x a f
a x f a x a f x
T = + − ′ + − ′′ + − ′′′ + −
och får
) 6
! ( 4
) 1 2 (
! 3
) 1 ) (
1
! ( 2
) 1 1 (
) 1 ( 2 ln ) (
4 3
2
4
= + − ⋅ + x − ⋅ − + x − ⋅ + x − ⋅ −
x x
T
.Detta ger
4 ) 1 ( 3
) 1 ( 2
) 1 ) (
1 ( 2 ln ) (
4 3
2 4
− − + −
− −
− +
= x x x
x x
T .
Svar:
4 ) 1 ( 3
) 1 ( 2
) 1 ) (
1 ( 2 ln ) (
4 3
2 4
− − + −
− −
− +
= x x x
x x
T
=================================================
ÖVNINGAR
Uppgift 1.
Bestäm Taylorpolynomet av ordning 3 kring punkten a =8 för funktionen y=3 x. Lösning:
) 3
(x x
f = , f(8)= 8 =2
3 / 2
3 ) 1
( = −
′ x x
f ,
12 ) 1 8 ( =
′ f
3 / 5
9 ) 2
( = − −
′′ x x
f ,
144 ) 1 8 ( = −
′′
f
Armin Halilovic: EXTRA ÖVNINGAR Taylors formelför envariabelfunktioner
3 / 8
27 ) 10
( = −
′′′ x x
f ,
3456 ) 5
8 ( =
′′′
f
Taylors polynom av ordning 3:
3 2
3 2
3
) 8 20736( ) 5
8 288( ) 1 8 12( 2 1
)
! ( 3
) ) (
! ( 2
) ) (
)(
( ) ( ) (
− +
−
−
− +
=
′′′ − +
′′ − +
′ − +
=
x x
x
a a x
a f a x
a f x a f a f x T
Svar:
3 2
3 ( 8)
20736 ) 5
8 288( ) 1 8 12( 2 1 )
(x = + x− − x− + x−
T
Uppgift 2.
a) Visa med Maclaurins formel av ordning 3 att x x R
x= − +
! 3
! sin 1
3
b) Använd resultat i a) för att bestämma Maclaurinpolynomet av ordning 6 för funktionen y=sin(x2).
Lösning:
a) f(x)=sinx, f(0)=0 x
x
f′( )=cos , f′(0)=1 x
x
f ′′( )=−sin , f ′′(0)=0 x
x
f ′′′( )=−cos , f ′′′(0)=−1 Enligt Maclaurins formel har vi
x R x R f x
f x x f f
x
f = + ′ + ′′ + ′′′ + = − +
! 3
! 3
) 0 (
! 2
) 0 ) (
0 ( ) 0 ( ) (
3 3
2
b) Eftersom t t R
t= − +
! 3
! sin 1
3
, substitution t =x2ger x R
x x R
x = x − + = − +
6
! 3
) (
! ) 1 sin(
6 2 3
2 2 2
Svar: b) Maclaurinpolynomet av ordning 6 för funktionen y=sin(x2) är 6
6 2 6
x x
P = − .
Uppgift 3. Använd formel n R x x
x e x
n
x = + + + + + +
... !
! 3
! 2
! 1 1
3 2
för att bestämma Maclaurinpolynomet av ordning 3 för funktionen y=e3x. Lösning:
Eftersom t t t R
et = + + + +
! 3
! 2
! 1 1
3 2
, substitution t =3xger x R
x
e x = + x + + +
! 3
) 3 (
! 2
) 3 (
! 1 1 3
3 2
3 = x x R
x+ + +
+ 2
9 2 3 9 1
3 2
Svar: Maclaurinpolynomet av ordning 3 för funktionen y=e3x är
2 9 2 3 9 1
3
2 x
x+ x + +
Uppgift 4.
a) Bestäm Maclaurinpolynomet (=Taylorpolynomet kring punkten 0) av ordning 4 för funktionen y =cosx.
b) Använd polynomet i a ) för att beräkna 4
2
0
1 2 cos
lim x
x x
x
+
−
>
− .
c) Beräkna samma gränsvärde 4
2
0
1 2 cos
lim x
x x
x
+
−
>
− med hjälp av L’ Hospitals regel.
Lösning a)
x x
f( )=cos , f(0)=1 x
x
f′( )=−sin , f′(0)=0 x
x
f ′′( )=−cos , f ′′(0)=−1 x
x
f ′′′( )=sin , f ′′′(0)=0 x
x
f (4)( )=cos , f(4)(0)=1.
4 ) 4 ( 3 2
4 4!
) 0 (
! 3
) 0 (
! 2
) 0 (
! 1
) 0 ) (
0 ( )
( f x
f x f x
f x f
x
M = + ′ + ′′ + ′′′ + ⇒
4 2
4 4!
1
! 2 1 1 )
(x x x
M = − +
4 2
4 24
1 2
1 1 )
(x x x
M = − + .
b) Metod 1. Vi använder Maclaurins serie för cos(x).
4 2
0
1 2 cos
lim x
x x
x
+
−
>
− = 4
2 6
4 2
0
2 ) 1 (
! ) 6 24
1 2
1 1 (
lim x
x x x
x
x
+
− + +
− +
−
>
−
L
24 1 1
) 0 24 0
( 1
1
! ) 6 24 ( 1 lim 24 )
( 1 lim
2
4 0 4
0 − + =
+ =
= −
= +
>
−
>
−
L L
L x
x x
x
x .
Metod 2: Vi använder Maclaurins formel. (Samma ide som i metod 1 med skillnaden i beteckning)
4 2
0
1 2 cos
lim x
x x
x
+
−
>
− = 4
2 5
) 5 ( 4 2
0
2 ) 1 (
! ) 5
) ( 24
1 2
1 1 (
lim x
x x c x f
x
x
+
− + +
+
−
>
−
Armin Halilovic: EXTRA ÖVNINGAR Taylors formelför envariabelfunktioner
24 1 1
! ) 5
) ( 24
( 1 lim
! ) 5
) ( 24
( 1 lim
) 5 (
4 0
5 ) 5 ( 4
0 + =
+ =
= −> −>
c x f x
c x x f
x
x .
c)
4 2
0
1 2 cos
lim x
x x
x
+
−
>
− = ⎥
⎦
⎢ ⎤
⎣
⎡ "
0
"0
[L’Hospital ]
= 3
0 4
lim sin x
x x
x
+
−
>
− = ⎥
⎦
⎢ ⎤
⎣
⎡ "
0
"0
[L’Hospital ]
= 2
0 12
1 lim cos
x x
x
+
−
>
− = ⎥
⎦
⎢ ⎤
⎣
⎡ "
0
"0
[L’Hospital ]
= x
x
x 24
limsin
>0
− = ⎥
⎦
⎢ ⎤
⎣
⎡ "
0
"0
[L’Hospital ]
= 24
limcos
0
x
x−> = 24
1 .
Svar: a) 4 2 4
24 1 2
1 1 )
(x x x
M = − + b)
24 1 c)
24 1
Uppgift 5.
a) Bestäm Maclaurinpolynomet (=Taylorpolynomet kring x0 =0) av ordning 3 för funktionen y = . ex
b) Bestäm Maclaurinserie för funktionen y= . ex
c) Använd Maclaurinpolynomet (eller Maclaurinserie) för att beräkna
3 2
0
2 ) 1
(
lim x
x x ex
x
+ +
−
>
− .
d) Beräkna samma gränsvärde 3
2
0
2 ) 1
(
lim x
x x ex
x
+ +
−
>
− med hjälp av
l’ Hospitals regel.
Lösning a)
ex
x
f( )= , f(0)=1 ex
x
f′ )( = , f′(0)=1 ex
x
f ′′ )( = , f ′′(0)=1 ex
x
f ′′′ )( = , f′(0)=1
3 2
3 3!
) 0 (
! 2
) 0 (
! 1
) 0 ) (
0 ( )
( f x
f x f x
f x
M = + ′ + ′′ + ′′′ ⇒
3 2
3 3!
1
! 2
1
! 1 1 1 )
(x x x x
M = + + + ⇒
3 2
3 6
1 2 1 1 1 1 )
(x x x x
M = + + +
Svar a) 3 2 3
6 1 2 1 1 1 1 )
(x x x x
M = + + +
b)
! ...
3 ) 0 (
! 2
) 0 (
! 1
) 0 ) (
0 ( )
( 2 ′′′ 3+
′′ +
′ + +
∞ = f x
f x f x
f x M
6 ...
1 2 1 1 1 1 )
( = + + 2 + 3 +
∞ x x x x
M =
∑
∞=0 !
n n
n x
Svar b) ...
6 1 2 1 1 1 1 )
( = + + 2 + 3 +
∞ x x x x
M =
∑
∞=0 !
n n
n x
c)
3 2
0
2) 1
(
lim x
x x ex
x
+ +
−
>
− =
3
2 5
4 3
2
0
2 ) 1
( 120 ...)
1 24
1 6
1 2 1 1 1 1 (
lim x
x x x
x x
x x
x
+ +
− + +
+ + + +
>
−
6 1 1
0 6 0
1 1
120 1 24
1 6 1 24 lim
1 6
1 lim
2 2
3 0 4 3
0 + + + =
+ =
= + + +
>
−
>
−
L L
L x x
x x x
x
x .
Svar c) 6 1
d) 3
2
0
2 ) 1
(
lim x
x x ex
x
+ +
−
>
− = ⎥
⎦
⎢ ⎤
⎣
⎡ "
0
"0
[L’Hospital ]
= 2
0 3
) 1 lim (
x x ex
x
+
−
>
− = ⎥
⎦
⎢ ⎤
⎣
⎡ "
0
"0
[L’Hospital ]
= x
ex
x 6
lim 1
0
−
>
− = ⎥
⎦
⎢ ⎤
⎣
⎡ "
0
"0
[L’Hospital ] =lim 6
0 x x
e
>
− =
6 1 Svar d)
6 1
Svar: a) 3 2 3
6 1 2 1 1 1 1 )
(x x x x
M = + + + b)
∑
∞=0 !
n n
n
x c) 6
1 d) 6 1
Armin Halilovic: EXTRA ÖVNINGAR Taylors formelför envariabelfunktioner
Uppgift 6.
a) Bestäm Maclaurinpolynomet (=Taylorpolynomet kring punkten a=0) av ordning 2 för funktionen y = x+1
b) Beräkna approximativt 1.2 med hjälp av Taylorpolynomet.
c) Uppskatta felet med hjälp av formeln för restterm: R= 1
) 1 (
) )! (
1 (
)
( + +
+ −
n n
a n x
c
f , där c
är ett tal mellan a och x. Lösning:
a)
1 )
(x = x+
f , ( 1) 1/2
2 ) 1
( = + −
′ x x
f , ( 1) 3/2
4 ) 1
( =− + −
′′ x x
f , ( 1) 5/2
8 ) 3
( = + −
′′′ x x f
1 ) 0 ( =
f ,
2 ) 1 0 ( =
′
f ,
4 ) 1 0 ( =−
′′
f , ( 1) 5/2
8 ) 3
( = + −
′′′ c c
f .
Enligt Taylors formel kring x0 =0 gäller R f x
f x f
x
f ′′ +
′ + +
= 2
! 2
) 0 (
! 1
) 0 ) (
0 ( ) (
där 3
! 3
) (c x
R= f ′′′ , c är ett tal mellan 0 och x
2
2 2!
) 0 (
! 1
) 0 ) (
0 ( )
( f x
f x f
x
P ′′
′ + +
= = 2
8 1 2
1+1x− x .
Svar a) 2 2
8 1 2 1 1 )
(x x x
P = + −
b) För att beräkna 1.2 substituerar vi x =0.2 i funktionen y = x+1, som vi approximerar med polynomet 2 2
8 1 2 1 1 )
(x x x
P = + − :
≈ +
= 0.2 1 2
.
1 0.2 1.095
8 2 1 . 2 0 1 1 ) 2 . 0
( 2
2 = + ⋅ − ⋅ =
P .
Svar b) 1.2 ≈1.095
c) För felet gäller
|R|= |
! 3
)
| f ′′′(c x3
= 3
2 / 5
2 . )! 0 3 (
) 1 8(
3 −
+ c
= <
+
3 2 / 5 0.2 ) 1 (
1 16
1
c 0.2 0.0005
16
1 3 = .
Svar c) |R|<0.0005