Newton's divided differences, Lecture notes of Numerical Methods in Engineering

Numerical method notes about polynomials and first and second divided differences

Typology: Lecture notes

2021/2022

Uploaded on 08/30/2023

usernm12
usernm12 🇺🇸

1 document

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MAE
305
Lecture
3/2112023
X
I
x
I
X
2
y2
3
y3
L
22
Y
3
33
p(x)
=
(x
-0.5)(X
-0.8)
(1.9048)
+
(x-
0.1)(X-0.0
(1.6065)
+
(X-0.11(1-0.5)
(1.4493)
10.1-0.5)(0.1-0.8)
10.5-0.1)
(0.5
-0.8)
10.8-0.1)(0.8-0.5)
-In
general
for
the
degree
Polynomial
-L
is
lagrange
Pn(x)
=
(,
(x)y,
+h2(X)yzt....
that,
(X)
yn+1
=
rimy;
ricx=
(
Eil
For
example,
=3
inri
(
e
-golny
back
to
earlier
example
=
(815)
(8.88)
Newton's
Divided
Difference
Interpolating
Polynomials
x
I
p(x)
=
a,
+
A2(X
-
x,)
+
ag(X
-
x,)(X
-
xz)
+
ay(X
-
x,)(X
-
xc)(X
-
xz)+....
x
YI
p(X)
=
a,
+
0
+
0+
..
.
=
y,
+
a,
=
y,
x2
YL
p(X2)
=
a,
+
92(X2
-
x,)
+
0
+
0
....
=
y,
+
dc(x
-
x)
=
Y
:
Ac
=
yc-y,
In
Yn
x2
-
4
P(X3)
=
a,
+
dz(X3
-xi)
+
93(Xz
-
x)(X)
-
x2)
+
0+0...
=
ye
y1
I
as
=
ys-y,
-
?!)(Xs-x,)
(N3-Xi)(X3
-Xa)
as-(2-(ii)
x
3
-
Y
First
Divided
Difference
f(xi
+1,
xiJ:
Yi
+1-y;
eslope
of
the
line
Xi+1
-
xi
check
i
=
1
+
(x2,
x)
=
=
Second
Divided
Difference
f(xi+2,
Xi
+1,
Xi]
=
f[xi+2,
xi+1]
-f[xi+,x]
Xitz
-
Xi
meck
1.(xx,
x2,
x.)
=
+(x3,
x,3-+(x--x3
=
?)-(!)
x3
-
x,
x3
-
x1
pf3
pf4
pf5

Partial preview of the text

Download Newton's divided differences and more Lecture notes Numerical Methods in Engineering in PDF only on Docsity!

MAE 305 Lecture 3/

X I x I

X (^2) y ↑ (^3) y L (^22) Y (^3 ) p(x) = (x-0.5)(X-0.8) (1.9048) + (x- 0.1)(X-0.0 (1.6065) + (X-0.11(1-0.5) (^) (1.4493) 10.1-0.5)(0.1-0.8) 10.5-0.1)^ (0.5^ -0.8)^ 10.8-0.1)(0.8-0.5) -In (^) general for^ the^ degree Polynomial -L (^) is lagrange Pn(x) =(, (^) (x)y, +h2(X)yzt.... that, (X)^ yn+1 = rimy; ricx= (^) ( Eil For (^) example, = inri (e

-golny back^ toearlier^ example

= (815) (^) (8.88) Newton's (^) Divided (^) Difference Interpolating Polynomials xI (^) p(x)= a, + A2(X - x,) + ag(X- x,)(X - xz) + ay(X- x,)(X - xc)(X - xz)+.... xYI

p(X) =a,^

  • 0 + 0+ ... = y, + (^) a, = y, x2 (^) YL

p(X2)

= a, + 92(X2 - x,) + 0 + 0 .... (^) = y, + dc(x - x) = Y : (^) Ac = yc-y, In (^) Yn x2 - 4

P(X3)=^ a,^ +^ dz(X3^ -xi)^ + 93(Xz - x)(X) - x2)+^ 0+0...^ = ye

↑ ↑ y I as =^ ys-y,^ - ?!)(Xs-x,)

(N3-Xi)(X3 -Xa)

as-(2-(ii) x 3 -^ Y

FirstDivided^ Difference

f(xi+1,xiJ:Yi+1-y;eslope^ ofthe^ line Xi+1 - xi check i^ =^1

+ (x2, x) =

= Second Divided^ Difference f(xi+2, Xi^ +1,^ Xi]^ =^ f[xi+2,^ xi+1]^ -f[xi+,x] Xitz -^ Xi meck 1.(xx, (^) x2, x.) =+(x3, x,3-+(x--x3 = x3 -^ x,^ ?)-(!) x3 -^ x

Kin (^) Divided Difference f X= (^) +1, XK (^) ,. (^).. x2, (^) x,] = f[XF+1, ...,x2] - f(xx,.^.. ., x] XR+ 1 - XI P(x) = a, + 12(X

    1(X - 0)(X (^) -0.1) + 4(X - 0)(X - 0.1)(X - 0.2) + 15(X - 0)(X (^) -0.1)(X-0.2)(x- 0.5)

T

y,=a, X 1stDD -E P 10.4268)

  • (-0.81) = 0.3664: 94 i) (^) = Ioni.21=-0. 3 (0.5) - 0.2250-0.121 = 1. 0.2-0. !

=^ -^ 0.

X 3 -^ x2^ 0.5-0.1^ (-0.4405)^ -^1 -0.6260)^

= 0. 0.2 0.^ 0.4650 -^ 0.2258^ = 0.7973 0.8-0. (^13 ) (0.5-0. 0.5330 (^) -0.7973 = -0. 0.0 -0. 0.5 (^) 0. 0.6249 -0.4658 (^) = 0. 0.8-0. 0.8 0. P(x)

= 0 + 1.21)x -0) + 70.87(X -0) (X -0.1)+ 0.3464(X -0)(X - 0.1)(X - 0.2) +

(-0.1254)(X -0)(X^ -0.1)(X-0.2)(x

  • 0.5) Ex p(X)

a, +^ dc(x^ -0.1)^ + 9,1-0.1) (X-0.5)

X (^) y 0.1 1.9048 I^ a 1.3065-1. 0.5 1. 0.5-0. =A (-0.524)

  • 110.74575) = 0.317 = 93 0.8-0. 1 = - 8. 1.4493-1. 0.8 -^ 0.5^ P(X) = 1.9048 + (-0.74575)/x -^ 0.1)^ + 0.317/X-0.1) (^) (X-0.5) 0.8 1.4493 =^ - 0.

A - I = b bl (^) C. (^) A2 b2 22 93 by (^23) 2 I (^0000 0 0) a (^) = 0 42 = 2.05 (^) 4) =^ - 2. 3 100000 0

b, =^ -^ 2.7^ b2^ =^ -^15 b^3 =^ 33. O O (^9 3100 0) I (^) c, =10.4 22 = 28.85 23 =^ - 91. 00 15510 0 0 b !

I

(^00 00 0255 )

I

it()

3, =^0 +^ (-2.7)^ x + 10.4^ 21x

0 0 00 056157.51 a3^ S2 = 2.05x2 + 1 - 15)x + 28.85 31X

I 0 - 6 -^10 000 53 =^ - 2.77bX2 + 33.26x - 91.851X- 7. L I S Cubic (^) Spline S,(x) =^ 9,(X^ -^ xi)3^ +^ bi(x^ -^ xi)^

  • (i(X- xi) +^ di -> (^3) Spline x4unknowns = (^12) equations needed

d

-take the^8 equations from quadratic butwe need 4 more (?)

S"( xi) = S,"+,(Xi)

I Clamp Boundary condition

SiCX1=P Sin = (X,+n) = 9

·si 2 Cubic

spline WI Free^ boundary conditions

S"(X.)^ = 0, Sh(Xn+1) = 0

I

Chapter 6 Numerical Methods^ and (^) Integration

6.1 Numerical Differentiation

I (^) use offinite (^) difference 2 use ofbest fit curce a p'(X) A (^0) ⑧ pl (^0) O 0 ⑧ ⑧ (^0 ) O (^) - Hi C -

6.2 Finite (^) Difference Formulas for Numerical (^) Differation (^) I ⑤ (^1) IstDerivative

n=^1 I (^2) two (^) pointbackward difference formula

I · I (^) I I f(xi-) = f(xi) -^ hf(xi)^ + hf"(x)

  • HO (^) Xi-1 X;Xi+h Remainder

f(xi) = f(xi) -^ f(xi-1)

Xi -Xi-

e

-h b)two point forward (^) diff formula f(xi+) = f(x,) +^ f(xi) + h2+"()+.... ↓ Xi + 1 - x; f(xi) = f(x, + 1) - f(xi) Xi+1 - Xi c) two^ pointcentroid (^) diff formula f(xi-1) = f(xi) - hf(xi) + h2f"(i)-4txi)+.... f(xi+1) = f(xi) + hf'(xi)+ if"(xi)+;h3+"(i)+...

f(Xi+,) -f(X;-1) = 2h f'(xi) + HOT

f'(xi) = f(Xi+1) -^ f(xi-1) 2h a) 3-pointbackward^ difference formula

  • ⑲ & (-4) +^ (xi-1) = f(xi)-h+'(xi) +...^ I

f(xi-2) =^ f(Xi)-2h+'(x,)+...^ I ⑤ ⑤

I I

f(xi -^ 2) -^4 + (^) (xi - (^) 1) = - 3f(xi) + 2h (^) f'/xi) + HOT (^) - in " f(x,)= f(xi - 2) - 4f(xi - (^) 1) +^3 +^ (Xi) " I 2n (^) Xi-L