• Aucun résultat trouvé

Méthodes numériques II : Calcul différentiel INFO1 - Semaines 7 & 8 Guillaume CONNAN

N/A
N/A
Protected

Academic year: 2022

Partager "Méthodes numériques II : Calcul différentiel INFO1 - Semaines 7 & 8 Guillaume CONNAN"

Copied!
94
0
0

Texte intégral

(1)

Méthodes numériques II : Calcul différentiel

INFO1 - Semaines 7 & 8

Guillaume CONNAN

IUT de Nantes - Dpt d’informatique

Dernière mise à jour : 18 février 2014 à 23:29

(IUT de Nantes - Dpt d’informatique ) 1 / 57

(2)

Sommaire

1 Le calcul infinitésimal

2 Comment calculer un logarithme sur machine..au XVII

e

siècle ?

3 Polynômes et erreurs 4 Série de Taylor 5 Développements limités

(IUT de Nantes - Dpt d’informatique ) 2 / 57

(3)

Le calcul infinitésimal

Sommaire

1 Le calcul infinitésimal

2 Comment calculer un logarithme sur machine..au XVII

e

siècle ?

3 Polynômes et erreurs 4 Série de Taylor 5 Développements limités

(IUT de Nantes - Dpt d’informatique ) 3 / 57

(4)

Le calcul infinitésimal Infiniment petits

Jean Bernoulli (1691), les infiniment petits sont des quantités qui peuvent être ajoutées à des quantités finies sans changer leurs valeurs. Les courbes sont des polygones à côtés infiniment courts.

x y

0

A

a f(a)

M

h

a + h f(a + h)

y

x

(IUT de Nantes - Dpt d’informatique ) 4 / 57

(5)

Le calcul infinitésimal Infiniment petits

Jean Bernoulli (1691), les infiniment petits sont des quantités qui peuvent être ajoutées à des quantités finies sans changer leurs valeurs. Les courbes sont des polygones à côtés infiniment courts.

x y

0

A

a f(a)

M

h

a + h f(a + h)

y

x

(IUT de Nantes - Dpt d’informatique ) 4 / 57

(6)

Le calcul infinitésimal Règles de dérivation

Théorème 1 (Dérivation d’une combinaison linéaire) y = au + bv =⇒ d y

d x = a · d u

d x + b · d v

d x ou bien y 0 = a · u 0 + b · v 0

(IUT de Nantes - Dpt d’informatique ) 5 / 57

(7)

Le calcul infinitésimal Dérivée d’un produit

Théorème 2 (Dérivation d’un produit) y = u · v =⇒

(IUT de Nantes - Dpt d’informatique ) 6 / 57

(8)

Le calcul infinitésimal Dérivée d’un produit

1

1 10 −5 1 , 0000100001 = 1 + 10 5 + 10 10 1

1 x = 1 1 = 1 x + δ (1 x)

δ = x + δ x

1

1 x 1 + x

(IUT de Nantes - Dpt d’informatique ) 7 / 57

(9)

Le calcul infinitésimal Dérivée d’un produit

1

1 10 −5 1 , 0000100001 = 1 + 10 5 + 10 10 1

1 x = 1 1 = 1 x + δ (1 x)

δ = x + δ x

1

1 x 1 + x

(IUT de Nantes - Dpt d’informatique ) 7 / 57

(10)

Le calcul infinitésimal Dérivée d’un produit

1

1 10 −5 1 , 0000100001 = 1 + 10 5 + 10 10 1

1 x = 1 1 = 1 x + δ (1 x)

δ = x + δ x

1

1 x 1 + x

(IUT de Nantes - Dpt d’informatique ) 7 / 57

(11)

Le calcul infinitésimal Dérivée d’un produit

1

1 10 −5 1 , 0000100001 = 1 + 10 5 + 10 10 1

1 x = 1 1 = 1 x + δ (1 x)

δ = x + δ x

1

1 x 1 + x

(IUT de Nantes - Dpt d’informatique ) 7 / 57

(12)

Le calcul infinitésimal Dérivée d’un produit

1

1 10 −5 1 , 0000100001 = 1 + 10 5 + 10 10 1

1 x = 1 1 = 1 x + δ (1 x)

δ = x + δ x 1

1 x 1 + x

(IUT de Nantes - Dpt d’informatique ) 7 / 57

(13)

Le calcul infinitésimal Dérivée d’un produit

En 1593, François Viète établit avec une méthode similaire que, pour tout réel x tel que | x | < 1, on a :

1

1 x = 1 + x + x 2 + x 3 + x 4 + x 5 + · · ·

(IUT de Nantes - Dpt d’informatique ) 8 / 57

(14)

Le calcul infinitésimal Dérivée d’un produit

Théorème 3 (Dérivation d’un quotient) y = u

v =⇒

(IUT de Nantes - Dpt d’informatique ) 9 / 57

(15)

Le calcul infinitésimal Dérivée d’un produit

Théorème 4 (Dérivation de fonctions composées) d y

d x = d y d z ·

d z

d x ou h 0 (x ) = f 0 ¡ g (x) ¢ · g 0 (x)

(IUT de Nantes - Dpt d’informatique ) 10 / 57

(16)

Comment calculer un logarithme sur machine..au XVIIe siècle ?

Sommaire

1 Le calcul infinitésimal

2 Comment calculer un logarithme sur machine..au XVII

e

siècle ?

3 Polynômes et erreurs 4 Série de Taylor 5 Développements limités

(IUT de Nantes - Dpt d’informatique ) 11 / 57

(17)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation d’une racine carrée par la méthode de Héron

Si x n est une approximation strictement positive par défaut de p a, alors a/x n est une approximation par excès de p a (pourquoi ?) et vice-versa.

La moyenne arithmétique de ces deux approximations est 1 2 ³ x n + x a

n

´ et constitue une meilleure approximation que les deux précédentes.

On peut montrer c’est une approximation par excès (en développant (x n − p

a) 2 par exemple).

(IUT de Nantes - Dpt d’informatique ) 12 / 57

(18)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation d’une racine carrée par la méthode de Héron

Si x n est une approximation strictement positive par défaut de p a, alors a/x n est une approximation par excès de p a (pourquoi ?) et vice-versa.

La moyenne arithmétique de ces deux approximations est 1 2 ³ x n + x a

n

´ et constitue une meilleure approximation que les deux précédentes.

On peut montrer c’est une approximation par excès (en développant (x n − p

a) 2 par exemple).

(IUT de Nantes - Dpt d’informatique ) 12 / 57

(19)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation d’une racine carrée par la méthode de Héron

Si x n est une approximation strictement positive par défaut de p a, alors a/x n est une approximation par excès de p a (pourquoi ?) et vice-versa.

La moyenne arithmétique de ces deux approximations est 1 2 ³ x n + x a

n

´ et constitue une meilleure approximation que les deux précédentes.

On peut montrer c’est une approximation par excès (en développant (x n − p

a) 2 par exemple).

(IUT de Nantes - Dpt d’informatique ) 12 / 57

(20)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation d’une racine carrée par la méthode de Héron

heron a x n

| n == 0 = x

| otherwise = heron a ((x + a / x) / 2) (n - 1)

* Main > heron 2 1 5 1.414213562373095

* Main > sqrt 2 1.4142135623730951

(IUT de Nantes - Dpt d’informatique ) 13 / 57

(21)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation d’une racine carrée par la méthode de Héron

heron a x n

| n == 0 = x

| otherwise = heron a ((x + a / x) / 2) (n - 1)

* Main > heron 2 1 5 1.414213562373095

* Main > sqrt 2 1.4142135623730951

(IUT de Nantes - Dpt d’informatique ) 13 / 57

(22)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation d’une racine carrée par la méthode de Héron

(IUT de Nantes - Dpt d’informatique ) 14 / 57

(23)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation d’une racine carrée par la méthode de Héron

(IUT de Nantes - Dpt d’informatique ) 15 / 57

(24)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation d’une racine carrée par la méthode de Héron

(IUT de Nantes - Dpt d’informatique ) 16 / 57

(25)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation d’une racine carrée par la méthode de Héron

(IUT de Nantes - Dpt d’informatique ) 17 / 57

(26)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation d’une racine carrée par la méthode de Héron

(IUT de Nantes - Dpt d’informatique ) 18 / 57

(27)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

log 10 ³ p 10 ´ = 1 2 , log 10 ³p p 10 ´ = 1 4 , etc.

Nombres 10,0000 3,1623 1,7783 1,3335 1,0000

Logarithmes 1 0,5 0,25 0,125 0

(IUT de Nantes - Dpt d’informatique ) 19 / 57

(28)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

log 10 ³ p 10 ´ = 1 2 , log 10 ³p p 10 ´ = 1 4 , etc.

Nombres 10,0000 3,1623 1,7783 1,3335 1,0000

Logarithmes 1 0,5 0,25 0,125 0

(IUT de Nantes - Dpt d’informatique ) 19 / 57

(29)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

log 10 ³ p 10 ´ = 1 2 , log 10 ³p p 10 ´ = 1 4 , etc.

Nombres 10,0000 3,1623 1,7783 1,3335 1,0000

Logarithmes 1 0,5 0,25 0,125 0

(IUT de Nantes - Dpt d’informatique ) 19 / 57

(30)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

log 10 ³ p 10 ´ = 1 2 , log 10 ³p p 10 ´ = 1 4 , etc.

Nombres 10,0000 3,1623 1,7783 1,3335 1,0000

Logarithmes 1 0,5 0,25 0,125 0

(IUT de Nantes - Dpt d’informatique ) 19 / 57

(31)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

p 10 = 10

12

p 2 = 2

12

p p

10 = 10

221

p p 2 = 2

221

q p p

10 = 10

231

q p p 2 = 2

231

.. . .. .

q p

· · · p

10 = 10

2541

q p

· · · p 2 = 2

2541

10

2541

1 , 000 000 000 000 000 127 819 149 320 032 35

| {z }

1 + a

2

2541

1 , 000 000 000 000 000 038 477 397 965 583 10

| {z }

1+ b

x = log(2) 10 x = 2

log(2) = x b a =

3 847 739 796 558 310 12 781 914 932 003 235

(IUT de Nantes - Dpt d’informatique ) 20 / 57

(32)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

p 10 = 10

12

p 2 = 2

12

p p

10 = 10

221

p p 2 = 2

221

q p p

10 = 10

231

q p p 2 = 2

231

.. . .. .

q p

· · · p

10 = 10

2541

q p

· · · p 2 = 2

2541

10

2541

1 , 000 000 000 000 000 127 819 149 320 032 35

| {z }

1 + a

2

2541

1 , 000 000 000 000 000 038 477 397 965 583 10

| {z }

1+ b

x = log(2) 10 x = 2

log(2) = x b a =

3 847 739 796 558 310 12 781 914 932 003 235

(IUT de Nantes - Dpt d’informatique ) 20 / 57

(33)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

p 10 = 10

12

p 2 = 2

12

p p

10 = 10

221

p p 2 = 2

221

q p p

10 = 10

231

q p p 2 = 2

231

.. . .. .

q p

· · · p

10 = 10

2541

q p

· · · p 2 = 2

2541

10

2541

1 , 000 000 000 000 000 127 819 149 320 032 35

| {z }

1 + a

2

2541

1 , 000 000 000 000 000 038 477 397 965 583 10

| {z }

1+ b

x = log(2) 10 x = 2 log(2) = x b

a =

3 847 739 796 558 310 12 781 914 932 003 235

(IUT de Nantes - Dpt d’informatique ) 20 / 57

(34)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

p 10 = 10

12

p 2 = 2

12

p p

10 = 10

221

p p 2 = 2

221

q p p

10 = 10

231

q p p 2 = 2

231

.. . .. .

q p

· · · p

10 = 10

2541

q p

· · · p 2 = 2

2541

10

2541

1 , 000 000 000 000 000 127 819 149 320 032 35

| {z }

1 + a

2

2541

1 , 000 000 000 000 000 038 477 397 965 583 10

| {z }

1+ b

x = log(2) 10 x = 2 log(2) = x b

a =

3 847 739 796 558 310 12 781 914 932 003 235

(IUT de Nantes - Dpt d’informatique ) 20 / 57

(35)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

(1 + a) x 1 + ax 1 + b 1 + ax log(2) = x b

a =

3 847 739 796 558 310 12 781 914 932 003 235

log(2) 0 , 301 029 995 663 981 14

(IUT de Nantes - Dpt d’informatique ) 21 / 57

(36)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

(1 + a) x 1 + ax 1 + b 1 + ax log(2) = x b

a =

3 847 739 796 558 310 12 781 914 932 003 235

log(2) 0 , 301 029 995 663 981 14

(IUT de Nantes - Dpt d’informatique ) 21 / 57

(37)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

(1 + a) x 1 + ax 1 + b 1 + ax log(2) = x b

a =

3 847 739 796 558 310 12 781 914 932 003 235 log(2) 0 , 301 029 995 663 981 14

(IUT de Nantes - Dpt d’informatique ) 21 / 57

(38)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

(1 + a) x 1 + ax 1 + b 1 + ax log(2) = x b

a =

3 847 739 796 558 310 12 781 914 932 003 235 log(2) 0 , 301 029 995 663 981 14

(IUT de Nantes - Dpt d’informatique ) 21 / 57

(39)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

(IUT de Nantes - Dpt d’informatique ) 22 / 57

(40)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

Avec MPFR

R = RealField(113) def racine(a,x,n) :

if n == 0 : return R(x) else:

return racine(R(a), (R(x) + R(a)/R(x)) * R(0 . 5), n - 1)

def sqrn(a,n) : if n == 0 :

return R(a) else:

return sqrn(racine(R(a),1 . 0,10), n - 1)

(IUT de Nantes - Dpt d’informatique ) 23 / 57

(41)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

a = sqrn(10,54) - R(1) b = sqrn(2,54) - R(1)

logDeux = RealField(53)(b / a)

diffLog = logDeux - ( log (2.)) / log (10.)

sage: logDeux

0.301029995663981182 sage: diffLog

5.55111512312578e-17

(IUT de Nantes - Dpt d’informatique ) 24 / 57

(42)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Calcul d’une approximation de log 2 par la méthode de Briggs

a = sqrn(10,54) - R(1) b = sqrn(2,54) - R(1)

logDeux = RealField(53)(b / a)

diffLog = logDeux - ( log (2.)) / log (10.)

sage: logDeux

0.301029995663981182 sage: diffLog

5.55111512312578e-17

(IUT de Nantes - Dpt d’informatique ) 24 / 57

(43)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

p : x 7→ p(x) = a n x n + a n 1 x n 1 + · · · + a 0

P = [a n , a n −1 , ..., a 0 ]

(IUT de Nantes - Dpt d’informatique ) 25 / 57

(44)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

p : x 7→ p(x) = a n x n + a n 1 x n 1 + · · · + a 0

P = [a n , a n −1 , ..., a 0 ]

(IUT de Nantes - Dpt d’informatique ) 25 / 57

(45)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

( p(x) = a + bx + cx 2 + dx 3

map p [1 , 2 , 3 , 4] = map log [1 , 2 , 3 , 4]

(IUT de Nantes - Dpt d’informatique ) 26 / 57

(46)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

Problème d’interpolation dans Methodus Differentialis publié par Newton en 1676

(IUT de Nantes - Dpt d’informatique ) 27 / 57

(47)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

[y 1 , y 2 , y 3 , y 4 ] = map log [1 , 2 , 3 , 4]

(IUT de Nantes - Dpt d’informatique ) 28 / 57

(48)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

x = 1 p(x) = a + b + c + d = y 1

x = 2 p(x) = a + 2b + 4c + 8d = y 2 x = 3 p(x) = a + 3b + 9c + 27d = y 3

x = 4 p(x) = a + 4b + 16c + 64d = y 4

y 2 − y 1 = b + 3c + 7d = y 1

y 3 − y 2 = b + 5c + 19d = y 2

y 4 y 3 = b + 7c + 37d = y 3

∆ y 2 y 1 = 2c + 12d = 2 y 1

∆ y 3 − ∆ y 2 = 2c + 18d = 2 y 2

2 y 2 − ∆ 2 y 1 = 6d = 3 y 1

(IUT de Nantes - Dpt d’informatique ) 29 / 57

(49)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

x = 1 p(x) = a + b + c + d = y 1

x = 2 p(x) = a + 2b + 4c + 8d = y 2 x = 3 p(x) = a + 3b + 9c + 27d = y 3

x = 4 p(x) = a + 4b + 16c + 64d = y 4

y 2 − y 1 = b + 3c + 7d = y 1

y 3 − y 2 = b + 5c + 19d = y 2

y 4 y 3 = b + 7c + 37d = y 3

∆ y 2 y 1 = 2c + 12d = 2 y 1

∆ y 3 − ∆ y 2 = 2c + 18d = 2 y 2

2 y 2 − ∆ 2 y 1 = 6d = 3 y 1

(IUT de Nantes - Dpt d’informatique ) 29 / 57

(50)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

x = 1 p(x) = a + b + c + d = y 1

x = 2 p(x) = a + 2b + 4c + 8d = y 2 x = 3 p(x) = a + 3b + 9c + 27d = y 3

x = 4 p(x) = a + 4b + 16c + 64d = y 4

y 2 − y 1 = b + 3c + 7d = y 1

y 3 − y 2 = b + 5c + 19d = y 2

y 4 y 3 = b + 7c + 37d = y 3

∆ y 2 y 1 = 2c + 12d = 2 y 1

∆ y 3 − ∆ y 2 = 2c + 18d = 2 y 2

2 y 2 − ∆ 2 y 1 = 6d = 3 y 1

(IUT de Nantes - Dpt d’informatique ) 29 / 57

(51)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

x = 1 p(x) = a + b + c + d = y 1

x = 2 p(x) = a + 2b + 4c + 8d = y 2 x = 3 p(x) = a + 3b + 9c + 27d = y 3

x = 4 p(x) = a + 4b + 16c + 64d = y 4

y 2 − y 1 = b + 3c + 7d = y 1

y 3 − y 2 = b + 5c + 19d = y 2

y 4 y 3 = b + 7c + 37d = y 3

∆ y 2 y 1 = 2c + 12d = 2 y 1

∆ y 3 − ∆ y 2 = 2c + 18d = 2 y 2

2 y 2 − ∆ 2 y 1 = 6d = 3 y 1

(IUT de Nantes - Dpt d’informatique ) 29 / 57

(52)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

d = 1 6 3 y 1

c = 1 2 2 y 1 − ∆ 3 y 1

b = y 1 3 2 2 y 1 + 3 3 y 1 7 6 3 y 1 = y 1 3 2 2 y 1 + 11 6 3 y 1

a = y 1 −∆ y 1 + 3 22 y 1 − 11 63 y 1 − 1 22 y 1 +∆ 3 y 1 − 1 63 y 1 = y 1 −∆ y 1 +∆ 2 y 1 −∆ 3 y 1

Finalement :

P (x) = y 1 + (x 1) y 1 + 1

2 (x 1)(x 2) 2 y 1 + 1

6 (x 1)(x 2)(x 3) 3 y 1

(IUT de Nantes - Dpt d’informatique ) 30 / 57

(53)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

d = 1 6 3 y 1

c = 1 2 2 y 1 − ∆ 3 y 1

b = y 1 3 2 2 y 1 + 3 3 y 1 7 6 3 y 1 = y 1 3 2 2 y 1 + 11 6 3 y 1

a = y 1 −∆ y 1 + 3 22 y 1 − 11 63 y 1 − 1 22 y 1 +∆ 3 y 1 − 1 63 y 1 = y 1 −∆ y 1 +∆ 2 y 1 −∆ 3 y 1

Finalement :

P (x) = y 1 + (x 1) y 1 + 1

2 (x 1)(x 2) 2 y 1 + 1

6 (x 1)(x 2)(x 3) 3 y 1

(IUT de Nantes - Dpt d’informatique ) 30 / 57

(54)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

d = 1 6 3 y 1

c = 1 2 2 y 1 − ∆ 3 y 1

b = y 1 3 2 2 y 1 + 3 3 y 1 7 6 3 y 1 = y 1 3 2 2 y 1 + 11 6 3 y 1

a = y 1 −∆ y 1 + 3 22 y 1 − 11 63 y 1 − 1 22 y 1 +∆ 3 y 1 − 1 63 y 1 = y 1 −∆ y 1 +∆ 2 y 1 −∆ 3 y 1

Finalement :

P (x) = y 1 + (x 1) y 1 + 1

2 (x 1)(x 2) 2 y 1 + 1

6 (x 1)(x 2)(x 3) 3 y 1

(IUT de Nantes - Dpt d’informatique ) 30 / 57

(55)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

d = 1 6 3 y 1

c = 1 2 2 y 1 − ∆ 3 y 1

b = y 1 3 2 2 y 1 + 3 3 y 1 7 6 3 y 1 = y 1 3 2 2 y 1 + 11 6 3 y 1

a = y 1 −∆ y 1 + 3 22 y 1 − 11 63 y 1 − 1 22 y 1 +∆ 3 y 1 − 1 63 y 1 = y 1 −∆ y 1 +∆ 2 y 1 −∆ 3 y 1

Finalement :

P (x) = y 1 + (x 1) y 1 + 1

2 (x 1)(x 2) 2 y 1 + 1

6 (x 1)(x 2)(x 3) 3 y 1

(IUT de Nantes - Dpt d’informatique ) 30 / 57

(56)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

d = 1 6 3 y 1

c = 1 2 2 y 1 − ∆ 3 y 1

b = y 1 3 2 2 y 1 + 3 3 y 1 7 6 3 y 1 = y 1 3 2 2 y 1 + 11 6 3 y 1

a = y 1 −∆ y 1 + 3 22 y 1 − 11 63 y 1 − 1 22 y 1 +∆ 3 y 1 − 1 63 y 1 = y 1 −∆ y 1 +∆ 2 y 1 −∆ 3 y 1

Finalement :

P (x) = y 1 + (x 1) y 1 + 1

2 (x 1)(x 2) 2 y 1 + 1

6 (x 1)(x 2)(x 3) 3 y 1

(IUT de Nantes - Dpt d’informatique ) 30 / 57

(57)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

y 1

y 1

y 2 2 y 1

∆ y 2 3 y 1 y 3 ∆ 2 y 2

∆ y 3 y 4

avec y i = y i +1 y i , 2 y i = y i +1 y i et 3 y i = 2 y i +1 −∆ 2 y i .

(IUT de Nantes - Dpt d’informatique ) 31 / 57

(58)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

Théorème 5 (Interpolation de Newton passant par les points (1 , y 1 ), (2 , y 2 ),..., (n , y n ))

y 1 + (x 1) y 1 + 1

2! (x 1)(x 2) 2 y 1 + · · · + 1

n! (x 1) · · · (x n) n y 1 Théorème 6 (Interpolation de Newton passant par les points ( α, y 1 ), ( α + 1 , y 2 ),..., ( α + n − 1 , y n ))

y 1 + (x −α ) y 1 + 1

2! (x −α )(x −α− 1) 2 y 1 +· · ·+ 1

n! (x −α ) · · · (x −α− (n 1)) n y 1

(IUT de Nantes - Dpt d’informatique ) 32 / 57

(59)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

Théorème 5 (Interpolation de Newton passant par les points (1 , y 1 ), (2 , y 2 ),..., (n , y n ))

y 1 + (x 1) y 1 + 1

2! (x 1)(x 2) 2 y 1 + · · · + 1

n! (x 1) · · · (x n) n y 1 Théorème 6 (Interpolation de Newton passant par les points ( α, y 1 ), ( α + 1 , y 2 ),..., ( α + n − 1 , y n ))

y 1 + (x −α ) y 1 + 1

2! (x −α )(x −α− 1) 2 y 1 +· · ·+ 1

n! (x −α ) · · · (x −α− (n 1)) n y 1

(IUT de Nantes - Dpt d’informatique ) 32 / 57

(60)

Comment calculer un logarithme sur machine..au XVIIe

siècle ? Polynômes interpolateurs

Théorème 5 (Interpolation de Newton passant par les points (1 , y 1 ), (2 , y 2 ),..., (n , y n ))

y 1 + (x 1) y 1 + 1

2! (x 1)(x 2) 2 y 1 + · · · + 1

n! (x 1) · · · (x n) n y 1 Théorème 6 (Interpolation de Newton passant par les points ( α, y 1 ), ( α + 1 , y 2 ),..., ( α + n − 1 , y n ))

y 1 + (x −α ) y 1 + 1

2! (x −α )(x −α− 1) 2 y 1 +· · ·+ 1

n! (x −α ) · · · (x −α− (n 1)) n y 1

(IUT de Nantes - Dpt d’informatique ) 32 / 57

(61)

Polynômes et erreurs

Sommaire

1 Le calcul infinitésimal

2 Comment calculer un logarithme sur machine..au XVII

e

siècle ?

3 Polynômes et erreurs 4 Série de Taylor 5 Développements limités

(IUT de Nantes - Dpt d’informatique ) 33 / 57

(62)

Polynômes et erreurs

comparePoly = plot X11 [

Data2D [Title "Schéma Horner", Color Blue, Style Lines] [] [(x, exHorn x) | x <- [1.94, 1.940125 .. 2.06]],

Function2D [Title "Forme factorisée", Color Green] [Range 1.94 2.06, Step 0.000125] (\x -> exFac x)

]

(IUT de Nantes - Dpt d’informatique ) 34 / 57

(63)

Polynômes et erreurs

-0.00000000002 -0.00000000001 -0.00000000001 -0.00000000001 0.00000000000 0.00000000000 0.00000000001 0.00000000001 0.00000000002

1.92 1.94 1.96 1.98 2 2.02 2.04 2.06 2.08 Schéma Horner

Forme factorisée

(IUT de Nantes - Dpt d’informatique ) 35 / 57

(64)

Polynômes et erreurs

(IUT de Nantes - Dpt d’informatique ) 36 / 57

(65)

Série de Taylor

Sommaire

1 Le calcul infinitésimal

2 Comment calculer un logarithme sur machine..au XVII

e

siècle ?

3 Polynômes et erreurs 4 Série de Taylor 5 Développements limités

(IUT de Nantes - Dpt d’informatique ) 37 / 57

(66)

Série de Taylor Dérivées d’ordre supérieur

Définition 7 (Dérivabilité)

Soit f une fonction numérique définie sur un intervalle I de R .

Soit a I . On dit que f est dérivable en a si, et seulement si, le rapport : τ a (h) = f (a + h) f (a)

h admet une limite finie lorsque a tend vers 0.

Dans ce cas on note f 0 (a) cette limite.

(IUT de Nantes - Dpt d’informatique ) 38 / 57

(67)

Série de Taylor Dérivées d’ordre supérieur

Définition 8 (Dérivée k eme Γ )

Si f 0 est dérivable sur I on note f 00 ou f (2) la dérivée de f 0 et on l’appelle la dérivée seconde de f . De même si f 00 est dérivable sur I , f 000 ou f (3) , la dérivée de f 00 , est la dérivée troisième de f . Plus généralement on note f ( k ) la dérivée k i eme Γ de f avec la convention f (0) = f , f ( k +1) = ³

f ( k ) ´ 0 .

(IUT de Nantes - Dpt d’informatique ) 39 / 57

(68)

Série de Taylor Dérivées d’ordre supérieur

Définition 9 (Fonctions de classe C n , de classe C )

On dit que f est de classe C n , n N , sur I ssi f est n fois dérivable et ses n dérivées sont continues sur I . On remarquera que si f ( n + 1) existe sur I alors f est de classe C n sur I qui s’écrit f ∈ C n (I) . On dit que f est de classe C sur I pour exprimer que f est indéfiniment dérivable et, a fortiori, que toutes ses dérivées sont continues.

(IUT de Nantes - Dpt d’informatique ) 40 / 57

(69)

Série de Taylor Relations de domination

Brooks’s Law [prov.]

« Adding manpower to a late software project makes it later » – a result of the fact that the expected advantage from splitting work among N programmers is O(N), but the complexity and

communications cost associated with coordinating and then merging their work is O(N 2 )

in « The New Hacker’s Dictionnary » http://outpost9.com/reference/jargon/jargon_17.html#SEC24

(IUT de Nantes - Dpt d’informatique ) 41 / 57

(70)

Série de Taylor Relations de domination

Définition 10 (« Grand O »)

Soit f et g deux fonctions de N dans R . On dit que f est un « grand O » de g et on note f = O(g ) ou f (n) = O (g (n)) si, et seulement si, il existe une constante strictement positive C telle que

| f (n) | É C | g (n) | pour tout n ∈ N .

(IUT de Nantes - Dpt d’informatique ) 42 / 57

(71)

Série de Taylor Relations de domination

Définition 11 (« Grand Oméga »)

Soit f et g deux fonctions de R dans lui-même. On dit que f est un

« grand Oméga » de g et on note f = (g ) ou f (n) = (g (n)) si, et seulement si, il existe une constante strictement positive C telle que

| f (n) | Ê C | g (n) | pour tout n ∈ N .

(IUT de Nantes - Dpt d’informatique ) 43 / 57

(72)

Série de Taylor Relations de domination

Définition 12 (« Grand Théta ») f = Θ (g ) ⇐⇒

 

 

f = O(g ) f = Ω (g)

(IUT de Nantes - Dpt d’informatique ) 44 / 57

(73)

Série de Taylor Relations de domination

H H H

H H H coût

n 100 1 000 10 6 10 9

log 2 (n) 7 10 20 30

n log 2 (n) 665 10 000 2 · 10 7 3 · 10 10

n 2 10 4 10 6 10 12 10 18

n 3 10 6 10 9 10 18 10 27

2 n 10 30 > 10 300 > 10 10

5

> 10 10

8

(IUT de Nantes - Dpt d’informatique ) 45 / 57

(74)

Série de Taylor Relations de domination

Définition 13 (« Petit o »)

f = o(g ) si, et seulement si, pour toute constante positive ε , il existe un entier n 0 tel que, pour tout n Ê n 0 ,

¯

¯ f (n) ¯ ¯ É ε ¯ ¯ g (n) ¯ ¯

(IUT de Nantes - Dpt d’informatique ) 46 / 57

(75)

Série de Taylor Relations de domination

Théorème 14 (Manipulation des O) O(f ) + O(g ) = O (f + g ) ;

f = O(f ) ;

k · O (f ) = O(f ) si k est une constante ; O (O(f )) = O (f ) ;

O(f ) · O (g ) = O(f · g ) ; O(f · g ) = f · O(g ).

(IUT de Nantes - Dpt d’informatique ) 47 / 57

(76)

Série de Taylor Relations de domination

Théorème 14 (Manipulation des O) O(f ) + O(g ) = O (f + g ) ;

f = O(f ) ;

k · O (f ) = O(f ) si k est une constante ; O (O(f )) = O (f ) ;

O(f ) · O (g ) = O(f · g ) ; O(f · g ) = f · O(g ).

(IUT de Nantes - Dpt d’informatique ) 47 / 57

(77)

Série de Taylor Relations de domination

Théorème 14 (Manipulation des O) O(f ) + O(g ) = O (f + g ) ;

f = O(f ) ;

k · O (f ) = O(f ) si k est une constante ; O (O(f )) = O (f ) ;

O(f ) · O (g ) = O(f · g ) ; O(f · g ) = f · O(g ).

(IUT de Nantes - Dpt d’informatique ) 47 / 57

(78)

Série de Taylor Relations de domination

Théorème 14 (Manipulation des O) O(f ) + O(g ) = O (f + g ) ;

f = O(f ) ;

k · O (f ) = O(f ) si k est une constante ; O (O(f )) = O (f ) ;

O(f ) · O (g ) = O(f · g ) ; O(f · g ) = f · O(g ).

(IUT de Nantes - Dpt d’informatique ) 47 / 57

(79)

Série de Taylor Relations de domination

Théorème 14 (Manipulation des O) O(f ) + O(g ) = O (f + g ) ;

f = O(f ) ;

k · O (f ) = O(f ) si k est une constante ; O (O(f )) = O (f ) ;

O(f ) · O (g ) = O(f · g ) ; O(f · g ) = f · O(g ).

(IUT de Nantes - Dpt d’informatique ) 47 / 57

(80)

Série de Taylor Relations de domination

Théorème 14 (Manipulation des O) O(f ) + O(g ) = O (f + g ) ;

f = O(f ) ;

k · O (f ) = O(f ) si k est une constante ; O (O(f )) = O (f ) ;

O(f ) · O (g ) = O(f · g ) ; O(f · g ) = f · O(g ).

(IUT de Nantes - Dpt d’informatique ) 47 / 57

(81)

Série de Taylor Relations de domination

Théorème 14 (Manipulation des O) O(f ) + O(g ) = O (f + g ) ;

f = O(f ) ;

k · O (f ) = O(f ) si k est une constante ; O (O(f )) = O (f ) ;

O(f ) · O (g ) = O(f · g ) ; O(f · g ) = f · O(g ).

(IUT de Nantes - Dpt d’informatique ) 47 / 57

(82)

Série de Taylor Polynôme de Taylor

Théorème 15 (Polynôme de Taylor)

Soit I un intervalle, soit f une fonction de I vers R de classe C n avec n N et soit a un élément de I. Il existe alors un unique polynôme T n , a de degré au plus n dont les dérivées jusqu’à l’ordre n coïncident en a avec celles de f . De plus :

T n , a (x) = f (a) + (x a)f 0 (a) + (x a) 2

2! f 00 (a) + (x a) 3

3! f (3) (a) +· · ·+ (x a) n n! f ( n ) (a)

T n ( k , a ) (a) = f ( k ) (a)

(IUT de Nantes - Dpt d’informatique ) 48 / 57

(83)

Série de Taylor Polynôme de Taylor

Théorème 15 (Polynôme de Taylor)

Soit I un intervalle, soit f une fonction de I vers R de classe C n avec n N et soit a un élément de I. Il existe alors un unique polynôme T n , a de degré au plus n dont les dérivées jusqu’à l’ordre n coïncident en a avec celles de f . De plus :

T n , a (x) = f (a) + (x a)f 0 (a) + (x a) 2

2! f 00 (a) + (x a) 3

3! f (3) (a) +· · ·+ (x a) n n! f ( n ) (a)

T n ( k , a ) (a) = f ( k ) (a)

(IUT de Nantes - Dpt d’informatique ) 48 / 57

(84)

Série de Taylor Polynôme de Taylor

Théorème 15 (Polynôme de Taylor)

Soit I un intervalle, soit f une fonction de I vers R de classe C n avec n N et soit a un élément de I. Il existe alors un unique polynôme T n , a de degré au plus n dont les dérivées jusqu’à l’ordre n coïncident en a avec celles de f . De plus :

T n , a (x) = f (a) + (x a)f 0 (a) + (x a) 2

2! f 00 (a) + (x a) 3

3! f (3) (a) +· · ·+ (x a) n n! f ( n ) (a)

T n ( k , a ) (a) = f ( k ) (a)

(IUT de Nantes - Dpt d’informatique ) 48 / 57

(85)

Série de Taylor Polynôme de Taylor

T n ,0 (x) = exp(0) + (x 0) exp 0 (0) + (x 0) 2

2! exp 00 (0)

= 1 + x + x 2 2

(IUT de Nantes - Dpt d’informatique ) 49 / 57

(86)

Série de Taylor Polynôme de Taylor

T n ,0 (x) = exp(0) + (x 0) exp 0 (0) + (x 0) 2

2! exp 00 (0)

= 1 + x + x 2 2

(IUT de Nantes - Dpt d’informatique ) 49 / 57

(87)

Série de Taylor Polynôme de Taylor

f (x) = T n , a (x) + R n , a (x)

(IUT de Nantes - Dpt d’informatique ) 50 / 57

(88)

Série de Taylor Formule de Taylor-Lagrange

Théorème 16

Si f est de classe C n sur [a , x] et si f ( n +1) existe sur ]a , x[ alors il existe au moins un réel c ]a , x[ tel que :

f (x) = T n , a (x) + (x a) n +1

(n + 1)! f ( n +1) (c )

On dit que l’on a écrit la formule de Taylor Lagrange à l’ordre n .

(IUT de Nantes - Dpt d’informatique ) 51 / 57

(89)

Série de Taylor Formule de Taylor-Mac Laurin

Théorème 17

f (x) =

n

X

k =0

x k

k! f ( k ) (0) + x n +1

(n + 1)! f ( n +1) ( θ x)

(IUT de Nantes - Dpt d’informatique ) 52 / 57

(90)

Série de Taylor Formule de Taylor avec reste intégral

Théorème 18

∀ x I , f (x) = T n , a (x) +

x

Z

a

(x − t) n

n! f ( n +1) (t)dt

(IUT de Nantes - Dpt d’informatique ) 53 / 57

(91)

Série de Taylor Formule de Taylor-Young.

Théorème 19

∀ x I , f (x) = T n , a (x) + o ((x a) n )

(IUT de Nantes - Dpt d’informatique ) 54 / 57

(92)

Développements limités

Sommaire

1 Le calcul infinitésimal

2 Comment calculer un logarithme sur machine..au XVII

e

siècle ?

3 Polynômes et erreurs 4 Série de Taylor 5 Développements limités

(IUT de Nantes - Dpt d’informatique ) 55 / 57

(93)

Développements limités Définition

Définition 20

On dit que f , définie sur V a , admet un développement limité d’ordre n N au voisinage de a (on écrit en abrégé : « f admet un DL n V (a) ») s’il existe un polynôme P n ∈ R n [X ] (ensemble des polynômes de degré inférieur ou égal à n) et une fonction ε vérifiant :

 

 

 

 

∀ x ∈ V a , f (x) = P n (x − a) + (x − a) n ε (x ) ε (a) = 0

x lim → a ε (x) = 0 c’est-à-dire f (x) = P n (x − a) + o ³ (x − a) n ´ .

(IUT de Nantes - Dpt d’informatique ) 56 / 57

(94)

Développements limités Définition

q > p → (x − a) q = a o ³ (x − a) p ´

(IUT de Nantes - Dpt d’informatique ) 57 / 57

Références

Documents relatifs

induction mathématique (raisonnement par récurrence) fonction récursive, type récursif. (IUT de Nantes - Dpt d'informatique ) 20

Automates à états finis avec sortie Automates à pile..

Ce qui va nous intéresser informatiquement, c'est une fonction qui crée une partition d'un ensemble selon une propriété, par exemple pour regrouper les entiers pairs parmi les

Langage reconnaissable Langage reconnu Automates équivalents Automates standards Automates émondés.. Théorème

Vous disposez de deux interrupteurs commandant une même ampoule : comment modéliser le système de va-et-vient. (IUT de Nantes - Dpt d'informatique ) 33

3 la durée moyenne des parcours allant d'un état au bord (le temps moyen d'absorption) est la moyenne des longueurs des parcours de ce sommet au bord pondérée par les probabilités

5 Quelques lois discrètes classiques Loi uniforme (discrète) Loi de Bernoulli Loi binomiale Loi de Pascal Loi de Poisson.. (IUT de Nantes - Dpt d’informatique ) 2

Formez les couples (x , y) tels que x soit le grand-père de y. Formez les couples (x , y) tels que x soit le frère