You are on page 1of 16

Department of Engineering Mathematics and

Physics, Faculty of Engineering


Zagazig University
2009-2010

Numerical solution of linear equations.


Numerical solution of non linear equations.
Numerical integrations.

Curve fitting.
Numerical solution of ordinary differential equations.

Numerical solution of partial differential equations.

Next

The Main Menu

Previous

Numerical integration
It is the evaluation of a definite integral

y = f(x)

I f(x) dx .

Area

By using a numerical method of


0

approximate integration.

Where f(x)
it is complicated to integrate analytically.
Or it is given by a table.

Or the integral cannot be represented in terms of


finitely elementary functions.

Next

The Main Menu

Previous

y = f(x)

0
b

I f(x) dx
a

x1 x2

xn-1 b
x
and a = x0, b =xn

h
f(a) 2 f(x 1 ) 2 f(x 2 ) .... 2 f(x n 1 ) f(b) .
2

i . e . I f(x) dx h [f(a) f(b)] f(x 1 ) f(x 2 ) .... f(x n 1 ).


2

a
b

Where h

b a
n

Next

The Main Menu

Previous

Evaluate
1

I e

x 2

dx by means of trapezoidal rule with n = 10. For 4D.

b a 1
0 .1
n
10
2
Calculate the values of f(x) e x

f(x)

1
1

I e
0

0.1

0.2

0.9900 0.9608

x2

dx

0.3

0.4

0.5

0.6

0.7

0.8

0.9139 0.8521 0.7788 0.6977 0.6126 0.5273

0.9

1.0

0.4449

0.3679

1 1
[ (1 0.3679) 0.9900 0.9608 0.9139 0.8521 0.7788
10 2

0.6977 0.6126 0.5273 0.4449] 0.7462

Next

The Main Menu

Previous

y = f(x)

I f(x) dx
a

a x1 x2 x3

x2n-1 b

h
f(a) f(b) 4f(x 1 ) f(x 3 ) ... f(x 2 n 1 ) 2f(x 2 ) f(x 4 ) ... f(x 2 n 2 ).
3

Where h

b a
2n

and a = x0, b = x2n

Next

The Main Menu

Previous

Evaluate
/ 2

1 ((sinx) 2 / 4) dx by means of Simpsons rule with 2n = 6. For 4D.

b a / 2 0
h

2n
6
12
Calculate the values of f(x) 1 ((sinx) 2 / 4)

0.9682

0.9354

12

f(x)

0.9916

I f(x) dx
a

0.9014

5
12

0.8756

0.8660

h
f(a) f(b) 4f(x 1 ) f(x 3 ) ... f(x 2 n 1 ) 2f(x 2 ) f(x 4 ) ... f(x 2 n 2 ).
3

1 0.8660 40.9916 0.9354 0.8756 20.9682 0.9014 1.4674.


3 x12
Next

The Main Menu

Previous

3
rule
8
b

I f(x) dx
a

Where n = 3,

3h
f 0 3 f1 3 f 2 f 3 .
8

b a
h
3

3h
f 0 5 f1 f 2 6 f 3 f 4 5 f 5 f 6 .
I f(x) dx
10
a
Where n = 6,

Next

b a
6

The Main Menu

Previous

Evaluate
0.5

I e x sin 2 xdx . Using 3 rule .

0.2

b a 0.5 0.2

0.1
3
3

Calculate the values of

f(x) e x sin 2 x

0.2

0.3

0.4

0.5

f(x)

0.4756

0.7622

1.0702

1.3873

3(0.1)
0.4756 3(0.7622 1.0702) 1.3873 0.2760.
8
Next

The Main Menu

Previous

Evaluate
0.5

I e x sin 2 xdx .

Using Weddls rule

0.2

b a 0.5 0.2
h

0.05
6
6

Calculate the values of f(x) e x sin 2 x


0
1
2
3
x
0.2
0.25
0.3
0.35
0.4756

f(x)
b

I f(x) dx
a

0.6156

0.7622

0.9142

4
0.4

5
0.45

6
0.5

1.0702

1.2285

1.3873

3h
f 0 5 f1 f 2 6 f 3 f 4 5 f 5 f 6 .
10

3(0.05)
0.4756 5(0.6156) 0.7622 6(0.9142) 1.0702 5(1.2285) 1.3873 0.2760.
I
10
Next

The Main Menu

Previous

The double integral evaluated as an iterated integral


d b

I f(x, y) dx dy .
c a
d b

( f(x, y) dx) dy .
c

( f(x, y) dy) dx .
We can the do the same, using any integration method.

Next

The Main Menu

Previous

Evaluate
2.64.6

1
4 xy dx dy,

take h = 0.2 in x-direction, k = 0.3 in y-direction. Use


in x- direction and Simpsons rule in y-direction.

3
rule
8

Calculate the values of f(x, y) 1

xy

4.2

4.4

4.6

0.125

0.1191

0.1136

0.1087

2.3

0.1087

0.1035

0.0988

0.0945

2.6

0.0962

0.0916

0.0874

0.0836

Next

The Main Menu

Previous

3
Applying rule in x-direction
8
For y =2
3(0.2)
0.125 3(0.1191 0.1136) 0.1087 0.0698.
I0
8
For y =2.3
I1

3(0.2)
0.1087 3(0.1035 0.0988) 0.0945 0.0608
8

For y =2.6

3(0.2)
0.0962 3(0.0916 0.0874) 0.0836 0.0538
8
We can put in the table
I2

2.3

2.6

f(y)

0.0698

0.0608

0.0538

Next

The Main Menu

Previous

Applying Simpsons in y-direction

2.3

2.6

f(y)

0.0698

0.0608

0.0538

k
I f(a) f(b) 4f(x 1 ) f(x 3 ) ... f(x 2 n 1 ) 2f(x 2 ) f(x 4 ) ... f(x 2 n 2 ).
3
I

0 .3
0.0698 0.0538 4(0.0608) 0.0367.
3

Next

The Main Menu

Previous

You might also like