Vous êtes sur la page 1sur 8

f(x) = e^-x*sin(2x)+1 f'(x) = (f(x + h) - f

h= 0.1
error

x f(x) f'(x) eksak f'(x) selisih maju error


0 1 2 1.7976344432
0.1 1.17976 1.59384 1.3906532834
0.2 1.31883 1.18937 0.994686598
0.3 1.41830 0.80455 0.6256073541
0.4 1.48086 0.45317 0.2951978367
0.5 1.51038 0.14504 0.0113594413
0.6 1.51151 -0.11378 -0.2215404214
0.7 1.48936 -0.32055 -0.4022248192
0.8 1.44914 -0.47538 -0.5320047169
0.9 1.39594 -0.58068 -0.6142507069
1 1.33451 -0.64070 -0.6538675513
1.1 1.26913 -0.66092
f'(x) = (f(x + h) - f(x))/h

h=0.0001
E(f) = -1/2*h*f"(x)

x f(x) f'(x) eksak f'(x) selisih maju error


0 1 2 1.9997999967
0.0001 1.0002 1.99959999 1.9993999767
0.0002 1.0004 1.99919996
… … … …
0.5 1.510378 0.1450418765 0.1448997861
0.5001 1.510392 0.1447577039 0.1446156383
0.5002 1.510407 0.144473581
… … … …
0.7499 1.471224 -0.4042007459 -0.4042781232
0.75 1.471183 -0.404355492 -0.4044328437
0.7501 1.471143 -0.4045101869
… … … …
0.9999 1.334576 -0.6406564239 -0.6406759955
1 1.334512 -0.6406955606 -0.6407151123
1.0001 1.334448 -0.6407346575
f(x) = e^-x*sin(2x)+1

h= 0.1

x f(x) f'(x) eksak f'(x) selisih mundur error


-0.1 0.7804364333 2.3858457259
0 1 2 2.1956356671
0.1 1.17976 1.59384 1.7976344432
0.2 1.31883 1.18937 1.3906532834
0.3 1.41830 0.80455 0.994686598
0.4 1.48086 0.45317 0.6256073541
0.5 1.51038 0.14504 0.2951978367
0.6 1.51151 -0.11378 0.0113594413
0.7 1.48936 -0.32055 -0.2215404214
0.8 1.44914 -0.47538 -0.4022248192
0.9 1.39594 -0.58068 -0.5320047169
1 1.33451 -0.64070 -0.6142507069
1.1 1.26913 -0.66092
f'(x) = (f(x)-f(x-h))/h

h= 0.0001
error
E(f) = -1/2*h*f"(x)

x f(x) f'(x) eksak


-0.0001
0 1 2
0.0001 1.00020 1.99960
… … …
0.4999
0.5 1.51038 0.14504
0.5001
… … …
0.7498
0.7499
0.75
… … …
0.9998
0.9999
1
f'(x) selisih mundur error

2.0002000
1.9998000
… …

0.1451840
0.1448998
… …

-0.4041234
-0.4042781 …

-0.6406368
-0.6406760
f(x) = e^-x*sin(2x)+1 f'(x) = (f(x + h) - f(x-h))/

h= 0.1
error

x f(x) f'(x) eksak f'(x) selisih tengah error


-0.2 0.5243633626 2.7256095144
-0.1 0.7804364333 2.3858457259
0 1 2 1.9966351
0.1 1.17976 1.59384 1.5941439
0.2 1.31883 1.18937 1.1926699
0.3 1.41830 0.80455 0.8101470
0.4 1.48086 0.45317 0.4604026
0.5 1.51038 0.14504 0.1532786
0.6 1.51151 -0.11378 -0.1050905
0.7 1.48936 -0.32055 -0.3118826
0.8 1.44914 -0.47538 -0.4671148
0.9 1.39594 -0.58068 -0.5731277
1 1.33451 -0.64070 -0.6340591
1.1 1.26913 -0.66092
f'(x) = (f(x + h) - f(x-h))/2h

h=0.0001
E(f) = -1/6*h*f'''(x)

x f(x) f'(x) eksak


-0.0001
0 1 2
0.0001 1.00019998 1.99959999
0.0002 1.00039992 1.99919996
… … …
0.4999
0.5 1.5103779515 0.1450418765
0.5001 1.5103924415 0.1447577039
0.5002 1.5104069031 0.144473581
… … …
0.7498
0.7499 1.471223696 -0.4042007459
0.75 1.4711832682 -0.404355492
0.7501 1.4711428249 -0.4045101869
… … …
0.9998
0.9999 1.3345758968 -0.6406564239
1 1.3345118292 -0.6406955606
1.0001 1.3344477577 -0.6407346575
f'(x) selisih tengah error

1.9999999967
1.9995999867

0.1450418848
0.1447577122 …

-0.4042007373 …
-0.4043554835

-0.6406564172
-0.6406955539

Vous aimerez peut-être aussi