La2 Cañete

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 16

SURNAME CAÑETE

FIRST NAME ERIKCA MARIE


STUDENT # 2021101712
PROGRAM/YEAR CE/2

n x y
0.000000000000000 4.000000000000000 0.602059991300000
1.000000000000000 4.500000000000000 0.653212513800000
2.000000000000000 5.000000000000000 0.698970004300000
3.000000000000000 5.500000000000000 0.740362689500000
4.000000000000000 6.000000000000000 0.778151250400000
5.000000000000000 6.500000000000000 0.812913356600000 x0 x1
5.321000000000000 0.726085166757836 4.000000000000000 5.000000000000000

ANS: 0.726085166800000

p2(x) y0L0(x) + y1L1(x) + y2L3(x)

PROBLEM

LINEAR INTERPOLATION
x y
3.1 20.1810
3.2 22.5280
3.3 25.0470
3.4 27.7440
3.5 30.6250
3.6 33.6960
3.34 26.1258
3.57 32.7747
3.22 23.0318
y0+𝜇(y1-y0)
x y 𝑥_0 𝑥_1 𝑦_0
3.34 26.1258 3.3 3.4 25.0470
3.57 32.7747 3.5 3.6 30.6250
3.22 23.0318 3.2 3.3 22.5280

40

35

30

25

20

15

10

0
3 3.1 3.2 3.3 3.4 3.5 3.6 3.7

QUADRATIC INTERPOLATION

x y
3.1 20.1810
3.2 22.5280
3.3 25.0470
3.4 27.7440
3.5 30.6250
3.6 33.6960 𝑥_0 𝑥_1 𝑥_2
3.34 26.1044 3.2 3.3 3.4
3.57 32.7547 3.4 3.5 3.6
3.22 23.0180 3.1 3.2 3.3

𝑥_0 𝑥_1 𝑥_2 𝑦_0 𝑦_1


1 2 3 4 3

𝑃_2 (𝑥)=(4)((𝑥−2)(𝑥−3)/(1−2)(1−3) )+(3)((𝑥−1)(𝑥−3)/(2−1)(2−3) )+(0)((𝑥−1)(𝑥−2)/(3−1)(3−1) )

𝑃_2 (𝑥)=(2𝑥^2−10𝑥+12)+(−3𝑥^2+12𝑥−9)+(0)
𝑃_2 (𝑥)=−𝑥^2+2𝑥+3

HIGHER ORDER INTERPOLATION

x y
3.1 20.1810
3.2 22.5280
3.3 25.0470
3.4 27.7440
3.5 30.6250
3.6 33.6960

x y
3.57 32.7544

𝑥_0 𝑥_1 𝑥_2 𝑥_3


x 3.3 3.4 3.5 3.6
y 25.0470 27.7440 30.6250 33.6960
(x-x1)(x-x2)
(x0-x1)(x0-x2)
x2 y0 y1 y2 L0(x)
5.500000000000000 0.602059991300000 0.698970004300000 0.740362689500000 -0.038306000000000
x-x0
x1-x0
𝑦_1 𝜇
27.7440 0.4000
33.6960 0.7000
25.0470 0.2000
𝑦_0 𝑦_1 𝑦_2 𝐿_0 (𝑥) 𝐿_1 (𝑥)
22.5280 25.0470 27.7440 -0.1200 0.8400
27.7440 30.6250 33.6960 -0.1050 0.5100
20.1810 22.5280 25.0470 -0.0800 0.9600

𝑦_2
0

−1)(3−1) )

0.0595 -0.283500000000001 0.688500000000004 0.535499999999997


(x-x0)(x-x2) (x-x0)(x-x1)
(x1-x0)(x1-x2) (x2-x0)(x2-x1)
L1(x) L2(x)
0.472918000000001 0.565387999999999
𝐿_2 (𝑥)
0.2800
0.5950
0.1200
SURNAME Cañete
FIRST NAME Erikca Marie
STUDENT # 2021101712
PROGRAM/YEAR CE/2

FORWARD DIFFERENCE FORMULA exp (x) exp ( x + h )


x h x+h f(x) f(x + h)
0.00000 0.20000 0.20000 1 1.22140275816
0.00000 0.10000 0.10000 1 1.10517091808
0.00000 0.05000 0.05000 1 1.05127109638
0.00000 0.02500 0.02500 1 1.02531512052
0.00000 0.01250 0.01250 1 1.01257845154

CENTRAL DIFFERENCE FORMULA exp ( x + h )


x h x+h x-h f(x+h)
0.00000 0.20000 0.20000 -0.20000 1.22140
0.00000 0.10000 0.10000 -0.10000 1.10517
0.00000 0.05000 0.05000 -0.05000 1.05127
0.00000 0.02500 0.02500 -0.02500 1.02532
0.00000 0.01250 0.01250 -0.01250 1.01258

BACKWARD DIFFERENCE FORcos(x) exp ( x - h )


x h f(x) x-h f(x-h)
0.00000 0.20000 1.00000 -0.20000 0.81873
0.00000 0.10000 1.00000 -0.10000 0.90484
0.00000 0.05000 1.00000 -0.05000 0.95123
0.00000 0.02500 1.00000 -0.02500 0.97531
0.00000 0.01250 1.00000 -0.01250 0.98758
fx+h - fx / h abs(1-f'x) h1/h2
f'(x) = Error Ratio
1.1070137908 0.1070137908 0
1.05170918076 0.05170918076 2.06953173953
1.02542192752 0.02542192752 2.03403855647
1.01260482098 0.01260482098 2.01684161691
1.00627612325 0.00627612325 2.00837690299

exp ( x - h ) fx+h - fx-h / 2h abs(1-f'x) h1/h2


f(x-h) f'(x) Error Ratio
0.81873 1.00668 0.0066800 0.00000
0.90484 1.00167 0.0016675 4.00600
0.95123 1.00042 0.0004167 4.00150
0.97531 1.00010 0.0001042 4.00038
0.98758 1.00003 0.0000260 4.00009

fx - fx-h / h abs(1- f'x) h1/h2


f'(x) Error Ratio
0.90635 0.09365 0.00000
0.95163 0.04837 1.93603
0.97541 0.02459 1.96735
0.98760 0.01240 1.98351
0.99378 0.00622 1.99171
SURNAME Cañete
FIRST NAME Erikca Marie
STUDENT # 2021101712
PROGRAM/YEAR CE/2

TRAPEZOIDAL RULE equation as is? wt * fx


i x f(x) wt wt*f(x)
0 1.0000 2.7183 0.5000 1.3591
1 1.2000 4.2207 1.0000 4.2207
2 1.4000 7.0993 1.0000 7.0993
3 1.6000 12.9358 1.0000 12.9358
4 1.8000 25.5337 1.0000 25.5337
5 2.0000 54.5982 1.0000 54.5982
6 2.2000 126.4694 1.0000 126.4694
7 2.4000 317.3483 1.0000 317.3483
8 2.6000 862.6422 1.0000 862.6422
9 2.8000 2540.2048 1.0000 2540.2048
10 3.0000 8103.0839 0.5000 4051.5420

a 1.0000 sum
b 3.0000 h
f'(a) 5.4366 2*a * exp(a^2) sum*h
f'(b) 48618.5036 2*b * exp(b^2) correction
approximation
actual
error
SIMPSON'S RULE 1/3 RULE equation as is wt * fx
i x f(x) wt wt*f(x)
0.0000 1.0000 2.7183 0.3333 0.9061
1.0000 1.2000 4.2207 1.3333 5.6276
2.0000 1.4000 7.0993 0.6667 4.7329
3.0000 1.6000 12.9358 1.3333 17.2478
4.0000 1.8000 25.5337 0.6667 17.0225
5.0000 2.0000 54.5982 1.3333 72.7975
6.0000 2.2000 126.4694 0.6667 84.3129
7.0000 2.4000 317.3483 1.3333 423.1311
8.0000 2.6000 862.6422 0.6667 575.0948
9.0000 2.8000 2540.2048 1.3333 3386.9398
10.0000 3.0000 8103.0839 0.3333 2701.0280

a 1.0000 sum
b 3.0000 h
f''(a) 54.3656 8*a^3 * exp(a^2) + 12*a*exp(a^2) sum*h
f''(b) 2041977.1497 8*b^3 * exp(b^2) + 12*b*exp(b^2) correction
approximation
actual
error
8003.9535 sum wt*fx
0.2000 b-a/n
1600.7907 sum * h
-162.0436 (-(h^2)/12)*(f'b-f'a)
1438.7471 correct + sum*h
1443.0825
4.3353
7288.8409 sum wt*fx
0.2000 b-a/n
1457.7682 sum * h
-18.1504 (-(h^4)/180)*(f'b-f'a)
1439.6178 correct + sum*h
1443.0825
3.4647

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy