You are on page 1of 5

Question 1

f x e dx

Trapezoidal Rule using n 1,24,6

I E9uo.ca

1 13 0 0 12929 1815.43

I s 19 L 30.1283

fx f3 3 e 1210.29

12 30 0 2130.1283 1210.29
952.907
2 2

I 1 5,1485 0 3.30127

fx f11.5 15 e 30.1283

fx f 2.25 2.25 e 202.539

fx f3 3 e 1210.29

1 13 0 0 2 3.36127 30.1283 202.539 1210.29


630.878
24

85 S sn 1.35914

fx fl 1 e 7.38906
fx f11.5 15 e 30.1283

fx f2 2 e 109.196

fx f 25 25 221251 371.033
fx f3 3 e 1210.29
02 1.35914 7.38906 30.1283 109.196 371.033 1210.29
14 30 562.124
2 6

Formulate table using Romberg integration

01h2 01h4 01h0 01h8


1815.43 665.4 514 8 513.944

Ff 952.907 523.536
539.206
522
889 748

1 952.907 1815.43 665.4


952.907 523.536
Iz 630.878

1 43 562.124 630.878 539.206

I
1 523.536 Ys 665.4 514.078
1
12 1615 523.536 15 539.206 522491

64 1
1 63 514.078 63 522.491 513.944

Integrate Analytically

exact S Exe d
2x 1 e
504.536
Compute errors for each step
01h2 01h4 Ocho 01h8
259.822 31.8835 10477
S's
is
11.4141
14

Et lexact Ii 100
exact
Question 2
Integrate Analytically

S Exe d
exact
If
2x 1 e
504.536
Two point Gauss Legendre Method
1 1
W We 1 21 53 22 53

2 0.63397

6
211122 111 2.36603

I bz w fix waffa
I 1321 1 f 0.63397 1f 2.36603 406.295

Compute error

Ee 504.536 406.295
100
504.536

Et 19.47

Three point Gauss Legendre Method

W 519 we 89 w 5
9 2 V51 22 0 2

1b a 11 0.34

1 22
151 1.50

23
1b 2.6619

I w fix waffe tw flx


I 59 f 2.6619 495.02
321 sa f 0.34 18a f 1so
compute error

Ee 504 53469502
5,3 100

Et 1.73
Question 3

y ex x 2 h 0.1

Formulate table with h 0.1

Xi f Xi
18 6.04965
1.9 6.68589
2 7.38906

so
Evaluate firstderivative
8.16617 6.68589
f1 2 7.40138
210.1
7.38906 7.40138
Ee 100 0.16675
7.38906

f2 9.02501 868.16617 816.68589 6.04965


7.38903
1210.1
7.38906 7.38903
Ee 100 0.00033
7.38906

Evaluate secondderivative

f 2 8.16617 38906 6.68589 7.39522


26
Ee 738,9 739522
8 100 0.0833

f 2 9.02501 1618.16617 3017.38906 1616.68589 6.04965


7.38905
1210.172

7.38906 7.38905
Ee 100 0.00011
7.38906
Question 4

If yt 1.5g

a Euler's Method with h 0.5

Yit yitflti.si h

ti Y flti.si Eat
f
5 0.25 64375 0.078125 220
0.078125 0.03906 0.058594
0.058594 0.109864 0.113526
1.25
0.113526 0.737919 0.482486 76.47

b Fourth orderRK method with 4 0.5

Y.tl Y k 2k 2k ky h

k f ti gi

ke fltitkh.yi.tl2kih
kz fltitYzh.yit1zkzh

ky f tithiyitksh

f
a
I 18.928
40
to
sa ofb
0.340 0.427 0.134 0.287 67.59
I 0.144 0.143 0.672 0.374 23.26
1.5 0.374 0.701 2120 3.489 13.770 2.515 85.13
2 2.515 16.348 65.297 186.331 1351.448 158.349 98.40

You might also like