0% found this document useful (0 votes)
29 views

Tugas Metode Numeris

1. The document summarizes a linear regression analysis and polynomial regression analysis on a dataset. The polynomial regression was found to better fit the data based on a lower standard error and higher correlation coefficient. 2. Newton and Langrange interpolation methods are applied to a dataset to estimate values. The integral of a function from 0 to 3 is also estimated using trapezoid and Simpson's 1/3 rule. Romberg integration is then used to improve the estimate. 3. Gaussian quadrature is used to estimate the integral of an exponential function from 0 to 2 through numerical integration, obtaining coefficients for the quadrature rule.

Uploaded by

gyana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Tugas Metode Numeris

1. The document summarizes a linear regression analysis and polynomial regression analysis on a dataset. The polynomial regression was found to better fit the data based on a lower standard error and higher correlation coefficient. 2. Newton and Langrange interpolation methods are applied to a dataset to estimate values. The integral of a function from 0 to 3 is also estimated using trapezoid and Simpson's 1/3 rule. Romberg integration is then used to improve the estimate. 3. Gaussian quadrature is used to estimate the integral of an exponential function from 0 to 2 through numerical integration, obtaining coefficients for the quadrature rule.

Uploaded by

gyana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Rifqi Fajar Giyana 13/348419/tk/40911

1.

x y xy x2y x2 x3 X4 (yi y)2 (yi a0 a1 xi )2 (yi a0 a1 xi a2 xi 2 )2


1 1 1 14.0625 0.940311791 0.051652893
1 1 1 1
6 8 16 10.5625 0.014692326 0.022956841
2 1.5 3 4
18 27 81 7.5625 0.528925935 0.021983518
3 2 6 9
48 64 256 3.0625 1.157254827 0.069162169
4 3 12 16
100 125 625 0.5625 2.028467098 1.87403E-05
5 4 20 25
180 216 1296 0.0625 3.142562747 0.427297088
6 5 30 36
392 343 2401 10.5625 0.01469243 0.099184096
7 8 56 49
640 512 4096 27.5625 0.281221077 0.009699265
8 10 80 64
1053 729 6561 68.0625 4.760329645 0.011248853
9 13 117 81
2438 2025 15333 142.0625 12.86845788 0.713203463
45 47.5 325 285
a.
n xi yi xi yi 14
a1 =
n xi 2 ( xi )2 12
9 325 45 47.5
a1 = 10
9 285 (45)2
=1.348485 8
6
a0 = y a1 x
4
a0 = 4.75 (1.348485 4.5)
=-1.31818 2
0
Persamaan regresi linear 0 2 4 6 8 10
y=-1.31818+1.348485x Data Regresi Linear

Standar deviasi Standar error Koefisien korelasi

(yi y) sr = (yi a0 a1 xi )2 15.78472222 12.86845788


sy = r=
n sr = 12.86845788 15.78472222
= .
15.78472222
sy = 12.86845788
8 sy/x =
7
= .
/ = .

b.

n xi xi 2 yi
a0
xi xi 2 xi 3 [a1 ] = yi xi
a2
2
[ xi xi 3 xi 4 ] 2
[ yi xi ]
9 45 285 a0 47.5
[ 45 285 2025 ] [a1 ] = [ 325 ]
285 2025 15333 a2 2438
a0 1.488095238
[a1 ] = [0.451839827]
a2 0.191017316
Y=1.488095238 0.451839827x + 0.191017316x 2
Standar error Koefisien korelasi

sr = (yi a0 a1 xi a2 xi 2 )2 142.0625 0.7132034639


r=
sr = 0.713203463 142.0625
= .
0.713203463
sy/x =
93
/ = .

Melalui hasil standar error dan koefisien korelasi yang didapatkan, dapat disimpulkan hasil regresi
polinomial lebih mendekati hasil sebenarnya (lebih baik) karena memiliki nilai standar error yang lebuh
rendah dan koefisien korelasi yang lebih tinggi dari hasil regresi linear.

2.

x f(x)
1 3
2 6
3 19
5 99
7 291
8 444

a.Newton

Karena titik yang diestimasi adalah 4 Maka titik yang digunakan untuk interpolasi adalah titik tersekat
yang telah diketahui nilainya.

b0=f(0)=3

b1 = f[x2 , x3 ] = 40
b2 = f[x1 , x2 , x3 ] =9

b3 = f[x1 , x2 , x3 , x4 ] = 5
b4 = f[x0 , x1 , x2 , x3 , x4 ] = 0.75

Orde 1

f1 (4) = 19 + 40 (4 3) = 59
Orde 2

f2 (4) = 6 + 40 (4 2) + 9 (4 2) (4 3) = 6 + 80 + 18 = 104
Orde 3

f3 (4) = 6 + 40 (4 2) + 9 (4 2) (4 3) + 5 (4 2) (4 3) (4 5) = 6 + 80 +
18 10 = 94
f4 (4) = 3 + 40 (4 1) + 9 (4 1) (4 2) + 5 (4 1) (4 2) (4 3) + 0.7
(4 1) (4 2) (4 3) (4 5) = 3 + 120 + 54 + 30 4.5 = 202.5

b.Langrange

Orde 1
45 43
f1 (4) = 35 19 + 53 99 = 9.5+44.5=54

Orde 2
43 45 42 45 42 43
f2 (4) = 23 25 6 + 32 35 19 + 52 53 99 = -2+19+33=50

Orde 3
43 45 47 42 45 47 42 43 47 42 43 45
f3 (4) = 23 25 27 6 + 32 35 37 19 + 52 53 57 99 + 72 73 75 291 =
0.2 + 14.25 + 49.5 14.55 = 49
Orde 4
42 43 45 47 41 43 45 47 41 42 45 47 41
f3 (4) = 12 13 15 17 3 + 21 23 25 27 6 + 31 32 35 37 19 + 51
42 43 47 41 42 43 45
99 + 291 = 0.374 3.6 + 21.375 + 37.125 7.275 =
52 53 57 71 72 73 75
47.999
Dicari integral dari 0 hingga 3 dengan menggunakan 4 titik maka titik yang digunakan adalah

0 0.75 1.5 2.25 3


f(0)=0 f(0.75)= 1.19081 f(1.5)=10.0838 f(2.25)= 48.0317 f(3)=180.7698

Metode Trapezoid
30
i= (0 + 2 (1.19081 + 10.0838 + 48.0317) + 180.7698) = .
8
98.428 112.268
= | | = 0.14 = %
98.428
Metode 1/3 Simpson
30
i= (0 + 4 (1.19081 + 48.0317) + 2 10.0838 + 180.7698) = .
12
98.428 99.456
= | | = 0.01 = %
98.428

Trapezoid n=1

f(0)=1 f(2)=1.3437
20
i1,1 = (1 + 1.3437) = 2.3437
2
Trapezoid n=2

f(0)=1 f(2)=1.3437
20
i2,1 = 4
(1 + 2 (1.1436) + 1.3437) = 2.31545

Trapezoid n=4

f(0)=1 f(0.5)=0.6323 f(1)= 1.1436 f(1.5)=1.3755 f(2)= 1.3437


20
i3,,1 = (1 + 2 (0.6323 + 1.1436 + 1.3755) + 1.3437) = 2.1616
8
Trapezoid n=8

f(0)=1 f(0.25)=0.2990 f(0.5)= 0.6323 f(0.75)=0.9235 f(1)= 1.1436 f(1.25)=1.2926 f(1.5)=1.3755


f(1.75)=1.3938 f(2)= 1.3437
20
i4,1 = 16
(1 + 2 (0.2990 + 0.6323 + 0.9235 + +1.1436 + 1.2926 + 1.3755 + 1.3938) +
1.3437) = 2.0583

Romberg

n=1, n=2
4 1
i1,2 = 2.31545 2.3437 = 2.3060
3 3
n=2, n=4
4 1
i2,2 = 2.1616 2.31545 = 2.1103
3 3
n=4, n=8
4 1
i3,2 = 2.0583 2.1616 = 2.0239
3 3

n=1,n=2, n=4
16 1
i1,3 = 2.1103 2.3060 = 2.0973
15 15
n=2,n=3, n=4
16 1
i2,3 = 2.0239 2.1103 = 2.0181
15 15
n=1, n=2, n=3, n=4
64 1
i1,4 = 2.0181 2.0973 = 2.0168
63 63

O(h2) O(h4) O(h6) O(h8)


2.3437 2.3060 2.0973 2.0168
2.31545 2.1103 2.0181
2.1616 2.0239
2.0583

= |1.9401 2.0168| = 0.0767 = 0.7%


Menggunakan trapezoid n=16 akan menaikan nilai error, sehingga 0.7% adalah nilai error terkecil yang
dapat dicapai.

2

f(x) =
0 1 + 2

20 1
= ( + 1)
2 1
1
+1 sin( + 1)
= 2

1 1 + ( + 1)

c0=0.2369 c1=0.4786 c2=0.5689 c3=0.4786 c4=0.2370

x0=-0.9062 x1=-0.5385 x2=0 x3=0.5385 x4=0.9062

i = [0.2369 f(0.0938) + 0.4786 f(0.4615) + 0.5689 f(1) + 0.4786 f(1.5385) + 0.2370


f(1.9062)]
i = [0.2369 0.1020 + 0.4786 0.5824 + 0.5689 1.1436 + 0.4786 1.3826 + 0.2370
1.3710]=2.151345816

i = [0.2369 0.1020 + 0.4786 0.5824 + 0.5689 1.1436 + 0.4786 1.3826 + 0.2370


1.3710]=1.9401

true 1.9401

= |1.9401 1.9401| = 0 = %

You might also like