You are on page 1of 4

Mechanical Engineering Department

Mechanical Engineering Department


Advance Numerical methods
Homework 2
Prepared by

Assedeq omar Almiladi


21981845
Central difference formula
X 1.7 1.75 1.79 1.8 1.81 1.85 1.9
f(x) 0.53062 0.55961 0.85221 0.58778 0.59332 0.61518 0.64185

at h=0.1
. .
f/(1.8)= =0.55615
∗ .

^ . ^
Er= 0.0005715
∗ ^ ∗ . ^

…..

at h=0.05
. .
f/(1.8) = =0.5557
∗ .

^ . ^
Er= = =0.000142
∗ ^ ∗ . ^

…...

at h=0.01
. .
f/(1.8)= =0.5555
∗ .

^ . ^
Er= = =0.0000057
∗ ^ ∗ . ^

Use the forward difference formulas and back


difference at each point
X 0.5 0.6 0.7
F(x) 0.4794 0.5646 0.6442
h=0.1

at x=0.5

forward difference formula


. .
f/(0.5)= =0.852
.

∗ . ∗ .
Er= = =0.024

the exact error is =0.87758-0.852=0.02558

backward difference formula


. .
f/(0.5)= =0.9
.

∗ . ∗ .
Er= = =0.024

The exact error=0.87758-0.9=-0.022242

at x=0.6

forward difference formula


. .
f/(0.6)= =0.796
.

∗ . ∗ .
Er= = =0.02823

The exact error is =0.82533-0.796=0.02933

backward difference formula


. .
f/(0.6)= =0.852
.

∗ . ∗ .
Er= = =0.02823

The exact error is =0.82533-0.852=-0.02667


at x=0.7

forward difference formula


. .
f/(0.7)= =0.7315
.

∗ . ∗ .
Er= = =0.03221

The exact error is =0.7648-0.7315=0.0333

backward difference formula


. .
f/(0.7)= =0.796
.

∗ . ∗ .
Er= = =0.03221

The exact error is =0.7648-0.796=-0.0312

…..

3. use the data in exercise 2 to find f"(0.6)


. ( . ) .
f//(x)= =-0.56
. ∗ .

You might also like