Contoh PemodelanPolinomial

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Pandang Tabel 1. Misalkan y=f(x).

Tentukan bentuk polinomial f(x) berdasarkan data dalam Tabel


1. Tentukan nilai f(0.025) dan f(0.525).

Petunjuk:
Lakukan interpolasi Newton dan Lagrange. Lalu kalkulasi nilai fungsi yang diinginkan.

data1 = 880, 0.841471<, 80.05, 0.868055<, 80.10, 0.893541<,


80.15, 0.917534<, 80.20, 0.93958<, 80.25, 0.959162<, 80.30, 0.975692<,
80.35, 0.9885113<, 80.40, 0.9968834<, 80.45, 0.9999969<, 80.50, 0.996965<<;

InterpolatingPolynomial@data1, xD
0.996965 +
H- 0.5 + xL H0.310988 + H- 0.639104 + H- 0.765493 + H- 0.477822 + H- 0.101968 + H0.12254 +
H0.237037 + H0.832451 + H- 19.612 - 352.734 H- 0.35 + xLL
H- 0.15 + xLL H- 0.3 + xLL H- 0.45 + xLL
H- 0.05 + xLL H- 0.4 + xLL H- 0.1 + xLL H- 0.25 + xLL xL

p = Plot@y, 8x, - 1, 1<, AxesLabel ® 8"x", "y"<, AxesOrigin ® 80.0<D


y
1.0

0.5

x
-1.0 -0.5 0.5 1.0

-0.5

-1.0
2 Contoh_PemodelanPolinomial.nb

Show@ListPlot@data1D, pD
1.00

0.95

0.90

0.85

0.1 0.2 0.3 0.4 0.5

Expand@%D
0.841471 + 0.54081 x - 0.178236 x2 + 0.17894 x3 - 7.25584 x4 +
47.6653 x5 - 206.317 x6 + 562.353 x7 - 940.148 x8 + 879.859 x9 - 352.734 x10

poly@x_, 0D := data1@@1, 2DD


poly@x_, k_D :=
poly@x, kD = poly@x, k - 1D + Hdata1@@k, 2DD - poly@data1@@k, 1DD, k - 1DL
Product@Hx - data1@@j, 1DDL  Hdata1@@k, 1DD - data1@@j, 1DDL, 8j, k - 1<D

px = poly@x, Length ž data1D


0.841471 + 0.53168 x - 0.2196 H- 0.05 + xL x -
0.526667 H- 0.1 + xL H- 0.05 + xL x - 0.393333 H- 0.15 + xL H- 0.1 + xL H- 0.05 + xL x -
0.106667 H- 0.2 + xL H- 0.15 + xL H- 0.1 + xL H- 0.05 + xL x -
0.355556 H- 0.25 + xL H- 0.2 + xL H- 0.15 + xL H- 0.1 + xL H- 0.05 + xL x +
3.12381 H- 0.3 + xL H- 0.25 + xL H- 0.2 + xL H- 0.15 + xL H- 0.1 + xL H- 0.05 + xL x -
17.7778 H- 0.35 + xL H- 0.3 + xL H- 0.25 + xL H- 0.2 + xL H- 0.15 + xL H- 0.1 + xL
H- 0.05 + xL x + 86.2081 H- 0.4 + xL H- 0.35 + xL H- 0.3 + xL H- 0.25 + xL H- 0.2 + xL
H- 0.15 + xL H- 0.1 + xL H- 0.05 + xL x - 352.734 H- 0.45 + xL H- 0.4 + xL H- 0.35 + xL
H- 0.3 + xL H- 0.25 + xL H- 0.2 + xL H- 0.15 + xL H- 0.1 + xL H- 0.05 + xL x

Simplify@pxD
0.841471 + 0.54081 x - 0.178236 x2 + 0.17894 x3 - 7.25584 x4 +
47.6653 x5 - 206.317 x6 + 562.353 x7 - 940.148 x8 + 879.859 x9 - 352.734 x10

Pembuktian :

px . x ® 0.05
0.868055
Contoh_PemodelanPolinomial.nb 3

data2 = 880, 0.841471<, 80.05, 0.868055<, 80.10, 0.893541<,


80.15, 0.917534<, 80.20, 0.93958<, 80.25, 0.959162<, 80.30, 0.975692<,
80.35, 0.9885113<, 80.40, 0.9968834<, 80.45, 0.9999969<, 80.50, 0.996965<<;

model = LinearModelFit@data2, x, xD

FittedModelB 0.861884 + 0.32606 x F

Normal@modelD
0.861884 + 0.32606 x

model@"BestFit"D
0.861884 + 0.32606 x

Plot@model@"BestFit"D, 8x, 0, 40<D


14

12

10

10 20 30 40
4 Contoh_PemodelanPolinomial.nb

Show@ListPlot@data2D, Plot@model2@"BestFit"D, 8x, 0, 40<DD


1.00

0.95

0.90

0.85

0.1 0.2 0.3 0.4 0.5

Correlation@80.0, 0.5, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50<,
80.841471, 0.868055, 0.893541, 0.916534, 0.93958, 0.959162,
0.975692, 0.9885113, 0.9968834, 0.9999969, 0.996965<  ND
0.595765

lm = LinearModelFit@data2, 8x, x ^ 2<, xD

FittedModelB 0.837917 + 0.64562 x - 0.63912 x2 F

p = Plot@lm@xD, 8x, - 1, 3<D


1

-1 1 2 3

-1

-2

-3

Show@ListPlot@data2D, pD
1.00

0.95

0.90

0.85

0.1 0.2 0.3 0.4 0.5


Contoh_PemodelanPolinomial.nb 5

model3 = a Exp@- k tD;

fit = FindFit@data2, model3, 8a, k<, tD


8a ® 0.865088, k ® - 0.340909<

modelf = Function@8t<, Evaluate@model3 . fitDD


FunctionA8t<, 0.865088 ã0.340909 t E

Plot@modelf@tD, 8t, - 1, 1<D


1.2

1.1

1.0

0.9

0.8

0.7

-1.0 -0.5 0.5 1.0

Show@ListPlot@data2D, Plot@modelf@tD, 8t, - 1, 1<DD


1.00

0.95

0.90

0.85

0.1 0.2 0.3 0.4 0.5

You might also like