You are on page 1of 2

Computational Techniques and Programming-II(PH-518)

Assignment No.2(a)
Numerical Integration using Trapezoidal Rule
Solve following problems using Trapezoidal Rule for tabulated and non-tabulated
function (corrected up to 4 decimal places). Also write a computer code for these
formulae and compare the programs output with calculated result.
1

1) Given the following table for x & y, calculate

f ( x)dx

using Trapezoidal rule

x 0
y 1.00
0

0.1
0.2
1.200 1.400

0.3
1.60
0

0.4
0.5
1.800 2.00
0

0.6
0.7
2.200 2.40
0

0.8
0.9
2.600 2.80
0

1.0
3.000

[ f ( x)dx =2.00000]
0

2) From the following table for x & y, calculate

f ( x)dx

using Trapezoidal rule

x 1
y 1.0000
0

2
2.6458
0

3
3.6056
0

4
4.3589
0

5
5.0000
0

6
5.5678
0

7
6.0825
0

8
6.5574
0

9
7.00000

[ f ( x)dx =37.81800]
0

5.2

3) Evaluate

log xdx using following table:


4

x
y=logx

4.0
1.38630

4.2
1.43510

4.4
1.48160

4.6
1.52600

4.8
1.56860

5.0
1.60940

5.2
1.64860

5.2

[ log xdx =1.82763]


4

0.7

4) Evaluate

f ( x )dx using Trapezoidal rule from the following table:

0.5

x
y

0.50
0.42900

0.55
0.42500

0.60
0.42200

0.65
0.41600

0.70
0.40900

0.7

f ( x )dx =0.08410]

0.5
1

5) From the following table for x & y, calculate

f ( x)dx

using Trapezoidal rule

x
y

0
1.00000

0.2
0.96080

0.4
0.85214

0.6
0.69768

0.8
0.52730

1.0
0.36788

[ f ( x)dx =0.74436]
0

6) Evaluate log xdx taking 6 ordinates using Trapezoidal rule.


1

[ log xdx =0.16704]


1

7) Evaluate

1+ x

dx using Trapezoidal rule considering 6 intervals.

1
dx =1.41080]
2
1
+
x
0

[
1

8) Evaluate

x dx considering 5 intervals using Trapezoidal rule.


3

3
[ x dx =0.26000]
0

9) Evaluate

6 x 5dx for 9 ordinates using Trapezoidal rule.

[ 6 x 5dx =37.81816]
1

10) Evaluate

1+ x

dx taking 4 intervals by Trapezoidal rule.

1
dx =0.78280]
1 + x2
0

You might also like