Anda di halaman 1dari 2

Metode Numerice

L10 Derivare numerica

Aplicatie 1.
Sa se calculeze derivata functiei

f(x)=n.cat*e 2x-1 in punctul x=1.5 (nodul i=5), cu pasul retelei h=0.01.

ORIGIN 1
ncat := 2
FUNCTIA

f ( x) := n cat e

2 x 1

i := 1 .. 9
PASUL

h := 0.01

RETEAUA
DE PUNCTE

x0 := 1.5 5 h

x := x0 + ( i) h
i

17

( i)

y := f x
i

( h = xi-xi-1 )

1.46
1.47
1.48
1.49

x = 1.5
1.51

1.52
1.53
1.54

x5

16
f ( x) 15

Graficul functiei
14
13
1.45

1.5
x

Calculam derivata numerica in punctul i=5


Derivatele de ordinul I intr-un punct se calculeaza cu relatiile:
i := 5

der1s :=

x = 1.5
i

yi yi1

der1s = 29.263

der1d :=

yi+1 yi

der1d = 29.854

der1c :=

yi+1 yi1

2 h

der1c = 29.558

Valoarea exacta a derivatei in punc tul i=5 (Solutia Mathc ad)


der( x) :=

d
f ( x)
dx

( i)

der_exact := der x

der_exact = 29.556

Eroare absoluta
er_1_s := der_exact der1s

Erorile relative
_1_s :=

er_1_s
der_exact

er_1_d := der_exact der1d


er_1_c := der_exact der1c

_1_d :=

_1_c :=

er_1_d
der_exact
er_1_c
der_exact
1

13.642
13.918
14.199
14.485

y = 14.778
15.077

15.381
15.692
16.009

Metode Numerice

L10 Derivare numerica

_1_s = 9.934 10

er_1_s = 2.936 10

er_1_d = 2.975 10

3
2

_1_d = 1.007 10

_1_c = 6.667 10

er_1_c = 1.97 10

i := 0 .. 9
der1s( i) :=

yi yi1

der1d( i) :=

yi+1 yi

der1c( i) :=

Graficul derivatelor de ordinul I


32
31
der1s( i)
der1d ( i)

30

der1c( i) 29
28
27
1.46

1.48

1.5

1.52

1.54

xi
DerStanga
DerDreapta
DerCentrata

yi+1 yi1

2 h

Anda mungkin juga menyukai