SlideShare a Scribd company logo
1 of 43
Download to read offline
Interpolation
Dmytro Mitin
fb.com/dmitry.mitin
21 October 2015. Algoclub #17
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Interpolation of functions
Finite differences
Divided differences
Lagrange interpolating polynomial
Newton interpolating polynomial
Hermite interpolating polynomial∗
Interpolation error
Neville algorithm
Algorithmic complexity of interpolation
Dmytro Mitin fb.com/dmitry.mitin Interpolation
String interpolation
int x = 5, y = 4;
System.out.println(String.format("%d * %d = %d",
x, y, x * y));
5 * 4 = 20
Dmytro Mitin fb.com/dmitry.mitin Interpolation
How many roots?
c ·
(x − a)(x − b)
(c − a)(c − b)
+ a ·
(x − b)(x − c)
(a − b)(a − c)
+ b ·
(x − c)(x − a)
(b − c)(b − a)
= x
(a, b, c are fixed, a = b, b = c, c = a)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
How many roots?
(x − a)(x − b)
(c − a)(c − b)
+
(x − b)(x − c)
(a − b)(a − c)
+
(x − c)(x − a)
(b − c)(b − a)
= 1
(a, b, c are fixed, a = b, b = c, c = a)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
How many roots?
c2
·
(x − a)(x − b)
(c − a)(c − b)
+a2
·
(x − b)(x − c)
(a − b)(a − c)
+b2
·
(x − c)(x − a)
(b − c)(b − a)
= x2
(a, b, c are fixed, a = b, b = c, c = a)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
How many roots?
c3
·
(x − a)(x − b)
(c − a)(c − b)
+a3
·
(x − b)(x − c)
(a − b)(a − c)
+b3
·
(x − c)(x − a)
(b − c)(b − a)
= x3
(a, b, c are fixed, a = b, b = c, c = a)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
How many roots?
c4
·
(x − a)(x − b)
(c − a)(c − b)
+a4
·
(x − b)(x − c)
(a − b)(a − c)
+b4
·
(x − c)(x − a)
(b − c)(b − a)
= x4
(a, b, c are fixed, a = b, b = c, c = a)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Extrapolation
World population
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Approximation
Uniform approximation
max
x∈[a,b]
|f (x) − p(x)| → min
p∈P
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Approximation
Mean approximation
b
a |f (x) − p(x)| → min
p∈P
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Interpolation
p(xk) = f (xk), k = 0, n − 1 or p(xk) = yk, k = 0, n − 1
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Lagrange interpolating polynomial
n = 3
p(x) = f (c)·
(x − a)(x − b)
(c − a)(c − b)
+f (a)·
(x − b)(x − c)
(a − b)(a − c)
+f (b)·
(x − c)(x − a)
(b − c)(b − a)
p(a) = f (a), p(b) = f (b), p(c) = f (c)
(a = b, b = c, c = a)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Lagrange interpolating polynomial
p(x) = f (x0) · 
(x − x0)(x − x1) . . . (x − xn−1)

(x0 − x0)(x0 − x1) . . . (x0 − xn−1)
+ f (x1) ·
(x − x0)
(x − x1) . . . (x − xn−1)
(x1 − x0)
(x1 − x1) . . . (x1 − xn−1)
+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ f (xn−1) ·
(x − x0)(x − x1) . . .
(x − xn−1)
(xn−1 − x0)(xn−1 − x1) . . .(((((((
(xn−1 − xn−1)
p(x0) = f (x0), p(x1) = f (x1), . . . , p(xn−1) = f (xn−1)
(x0 = . . . = xn−1)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
p(x) =
n−1
k=0
f (xk) ·
(x − x0) . . .
(x − xk) . . . (x − xn−1)
(xk − x0) . . .
(xk − xk) . . . (xk − xn−1)
Definition
Lagrange interpolating polynomial
p(x) =
n−1
k=0
f (xk) ·
0≤j≤n−1
j=k
(x − xj )
0≤j≤n−1
j=k
(xk − xj )
p(xk) = f (xk), k = 0, n − 1
(x0 = . . . = xn−1)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Joseph-Louis Lagrange (1736–1813)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Uniqueness
p(x) =
n−1
i=0
ai xi
p(xk) = f (xk), k = 0, n − 1
n−1
i=0
ai xi
k = f (xk), k = 0, n − 1
det
1 1 . . . 1
x0 x1 . . . xn−1
x2
0 x2
1 . . . x2
n−1
. . . . . . . . . . . .
xn−1
0 xn−1
1 . . . xn−1
n−1
=
0≤jk≤n−1
(xk − xj ) = 0,
x0 = . . . = xn−1
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Equidistant nodes
p(x) =
n−1
k=0
f (xk) ·
(x − x0) . . .
(x − xk) . . . (x − xn−1)
(xk − x0) . . .
(xk − xk) . . . (xk − xn−1)
Partial case: x1 − x0 = x2 − x1 = . . . = xn−1 − xn−2 = h,
xk = x0 + k · h, k = 0, n − 1
p(x) =
n−1
k=0
f (x0 + k h) · (x−x0)(x−x0−h)...((((((x−x0−k·h)...(x−x0−(n−1)h)
k(k−1)...(k−k)...(k−n+1)·hn−1
p(x) =
n−1
k=0
f (x0 + k h) ·
t(t − 1) . . .(t − k) . . . (t − n + 1)
k!(n − k − 1)!(−1)n−k−1
,
t =
x − x0
h
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Complexity
p(x) =
n−1
k=0
f (xk) ·
(x − x0) . . .
(x − xk) . . . (x − xn−1)
(xk − x0) . . .
(xk − xk) . . . (xk − xn−1)
What is complexity?
Is this formula good?
Dmytro Mitin fb.com/dmitry.mitin Interpolation
p(x) =
n−1
k=0
f (xk) ·
(x − x0) . . .
(x − xk) . . . (x − xn−1)
(xk − x0) . . .
(xk − xk) . . . (xk − xn−1)
≡ pn(x)
p(x) = p1(x) +
n−1
j=1
pj+1(x) − pj (x)
p(x) = f (x0) +
n−1
j=1
j
k=0
f (xk) ·
(x − x0) . . .
(x − xk) . . . (x − xj )
(xk − x0) . . .
(xk − xk) . . . (xk − xj )
−
j−1
k=0
f (xk) ·
(x − x0) . . .
(x − xk) . . . (x − xj−1)
(xk − x0) . . .
(xk − xk) . . . (xk − xj−1)
p(x) = f (x0) +
n−1
j=1
Cj · (x − x0)(x − x1) . . . (x − xj−1)
Attention! Algebraic trick:
x = x0, x1, . . . , xj−1
j
are zeroes, deg = j
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Let’s rewrite formula
p(x) = f (x0) +
n−1
j=1
j
k=0
f (xk) ·
(x − x0) . . .
(x − xk) . . . (x − xj )
(xk − x0) . . .
(xk − xk) . . . (xk − xj )
−
j−1
k=0
f (xk) ·
(x − x0) . . .
(x − xk) . . . (x − xj−1)
(xk − x0) . . .
(xk − xk) . . . (xk − xj−1)
p(x) = f (x0) +
n−1
j=1
Cj · (x − x0)(x − x1) . . . (x − xj−1)
Cj ? x = xj :
f (xj ) −
j−1
k=0
f (xk) ·
(xj − x0) . . .
(xj − xk) . . . (xj − xj−1)
(xk − x0) . . .
(xk − xk) . . . (xk − xj−1)
= Cj · (xj − x0)(xj − x1) . . . (xj − xj−1)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Let’s rewrite formula
f (xj ) −
j−1
k=0
f (xk) ·
(xj − x0) . . .
(xj − xk) . . . (xj − xj−1)
(xk − x0) . . .
(xk − xk) . . . (xk − xj−1)
= Cj · (xj − x0)(xj − x1) . . . (xj − xj−1)
Cj =
f (xj )
(xj − x0)(xj − x1) . . . (xj − xj−1)
−
j−1
k=0
f (xk) ·
1
(xk − x0) . . .
(xk − xk) . . . (xk − xj−1)
·
1
xj − xk
Cj =
j
k=0
f (xk)
(xk − x0) . . .
(xk − xk) . . . (xk − xj )
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Cj =
j
k=0
f (xk)
(xk − x0) . . .
(xk − xk) . . . (xk − xj )
p(x) = f (x0) +
n−1
j=1
Cj · (x − x0)(x − x1) . . . (x − xj−1)
p(x) = f (x0) +
n−1
j=1
j
k=0
f (xk)
(xk − x0) . . .
(xk − xk) . . . (xk − xj )
·(x − x0)(x − x1) . . . (x − xj−1)
Definition
Newton interpolating polynomial
p(x) = f (x0) +
n−1
j=1
[f ; x0, x1, . . . , xj ]
Divided differences
· (x − x0)(x − x1) . . . (x − xj−1)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Isaac Newton (1643–1727)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Equidistant nodes
p(x) =
n−1
j=0
j
k=0
f (xk)
(xk − x0) . . .
(xk − xk) . . . (xk − xj )
·(x − x0)(x − x1) . . . (x − xj−1)
Partial case: x1 − x0 = x2 − x1 = . . . = xn−1 − xn−2 = h,
xk = x0 + k · h, k = 0, n − 1
p(x) =
n−1
j=0
j
k=0
f (x0 + k h)
k!(j − k)!(−1)j−khj
·(x − x0)(x − x0 − h) . . . (x − x0 − (j − 1)h)
p(x) =
n−1
j=0
1
j!
j
k=0
(−1)j−k
Ck
j f (x0 + k h) · t(t − 1) . . . (t − j + 1)
t = x−x0
h , Ck
j = j!
k!(j−k)!
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Finite differences
p(x) =
n−1
j=0
j
k=0
f (xk)
(xk − x0) . . .
(xk − xk) . . . (xk − xj )
·(x − x0)(x − x1) . . . (x − xj−1)
p(x) =
n−1
j=0
1
j!
j
k=0
(−1)j−k
Ck
j f (x0 + k h) · t(t − 1) . . . (t − j + 1)
t =
x − x0
h
, Ck
j =
j!
k!(j − k)!
∆j
f (x0, h) =
j
k=0
(−1)j−k
Ck
j f (x0 + k h)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Finite differences
∆j
f (x0, h) =
j
k=0
(−1)j−k
Ck
j f (x0 + k h)
∆0
f (x0, h) = f (x0)
∆j
f (x0, h) = ∆(∆j−1
f )(x0, h)
∆f (x0, h) = f (x0 + h) − f (x0)
∆2
f (x0, h) = ∆(∆f )(x0, h) = ∆f (x0 + h) − ∆f (x0)
= f (x0 + 2h) − 2f (x0 + h) + f (x0)
∆3
f (x0, h) = f (x0 + 3h) − 3f (x0 + 2h) + 3f (x0 + h) − f (x0)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Complexity
p(x) =
n−1
j=0
[f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1)
p(xk) = f (xk), k = 0, n − 1
[f ; x0, x1, . . . , xj ] =
j
k=0
f (xk)
(xk − x0) . . .
(xk − xk) . . . (xk − xj )
How to add new node?
What is complexity?
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Divided differences
p(x) =
n−1
j=0
[f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1)
[f ; x0, x1, . . . , xj ] =
j
k=0
f (xk)
(xk − x0) . . .
(xk − xk) . . . (xk − xj )
[f ; x0] = f (x0)
[f ; x0, x1] =
f (x0)
x0 − x1
+
f (x1)
x1 − x0
=
f (x0) − f (x1)
x0 − x1
[f ; x0, x1, x2] = f (x0)
(x0−x1)(x0−x2) + f (x1)
(x1−x0)(x1−x2) + f (x2)
(x2−x0)(x2−x1)
=
f (x0)−f (x1)
x0−x1
− f (x1)−f (x2)
x1−x2
x0 − x2
=
[f ; x0, x1] − [f ; x1, x2]
x0 − x2
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Divided differences
p(x) =
n−1
j=0
[f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1)
[f ; x0, x1, . . . , xj ] =
j
k=0
f (xk)
(xk − x0) . . .
(xk − xk) . . . (xk − xj )
Recurrence:
[f ; x0, x1, . . . , xj−1, xj ] =
[f ; x0, x1, . . . , xj−1] − [f ; x1, . . . , xj−1, xj ]
x0 − xj
, j ≥ 1
[f ; x0] = f (x0)
[f ; . . . , xr , . . . , xs, . . .] =
[f ; . . . , xr , . . . ,xs, . . .] − [f ; . . . ,xr , . . . , xs, . . .]
xr − xs
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Interpolation error
p(x) =
n−1
j=0
[f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1)
p(xk) = f (xk), k = 0, n − 1
q(x) =
n
j=0
[f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1)
= p(x) + [f ; x0, x1, . . . , xn] · (x − x0)(x − x1) . . . (x − xn−1)
q(xk) = f (xk), k = 0, n
f (xn) = q(xn) = p(xn) + [f ; x0, x1, . . . , xn]
·(xn − x0)(xn − x1) . . . (xn − xn−1)
f (x) = p(x) + [f ; x0, x1, . . . , xn−1, x]
·(x − x0)(x − x1) . . . (x − xn−1)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Interpolation error
f (x) = p(x) + [f ; x0, x1, . . . , xn−1, x]
·(x − x0)(x − x1) . . . (x − xn−1)
f (xk) − p(xk) = 0, k = 0, n − 1
f (n−1)
(ξ) − p(n−1)
(ξ) = 0, ξ ∈ [a, b] x0, . . . , xn−1
f (n−1)
(ξ) = p(n−1)
(ξ) = [f ; x0, x1, . . . , xn−1] · (n − 1)!
[f ; x0, x1, . . . , xn−1] =
f (n−1)(ξ)
(n − 1)!
f (x) − p(x) =
f (n−1)(ξ)
(n − 1)!
· (x − x0)(x − x1) . . . (x − xn−1)
|f (x) − p(x)| ≤
1
(n − 1)!
max
[a,b]
|f (n−1)
| · (b − a)n
, x ∈ [a, b]
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Neville algorithm
p(x) =
n−1
j=0
[f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1)
= f (x0) + (x − x0) · [f ; x0, x1] + (x − x1) ·
. . . [f ; x0, . . . , xn−2] + (x − xn−1)[f ; x0, . . . , xn−1] . . .
[f ; x0, x1, . . . , xj−1, xj ] =
[f ; x0, x1, . . . , xj−1] − [f ; x1, . . . , xj−1, xj ]
x0 − xj
[f ; x0, . . . , xn−1]
[f ; x0, . . . , xn−2] [f ; x1, . . . , xn−1]
[f ; x0, . . . , xn−3] [f ; x1, . . . , xn−2] [f ; x2, . . . , xn−1]
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
[f ; x0, x1] [f ; x1, x2] [f ; x2, x3] . . . . . . [f ; xn−3, xn−2] [f ; xn−2, xn−1]
f (x0) f (x1) f (x2) f (x3) . . . f (xn−3) f (xn−2) f (xn−1)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Eric Harold Neville (1889–1961)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Neville algorithm
p(x) =
n−1
j=0
[f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1)
[f ; x0, x1, . . . , xj−1, xj ] =
[f ; x0, x1, . . . , xj−1] − [f ; x1, . . . , xj−1, xj ]
x0 − xj
[f ; x0, x1, x2, . . . , xj ] =
[f ; x0, x2, . . . , xj ] − [f ; x1, x2, . . . , xj ]
x0 − x1
p(x) ≡ p(f ; x0, . . . , xn−1; x)
p(f ; x0, . . . , xn−1; x) = f (x0) +
f (x0) − f (x1)
x0 − x1
(x − x0)
+
x − x1
x0 − x1
n−1
j=2
[f ; x0, x2, . . . , xj ] · (x − x0)(x − x2) . . . (x − xj−1)
−
x − x0
x0 − x1
n−1
j=2
[f ; x1, . . . , xj ] · (x − x1) . . . (x − xj−1)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Neville algorithm
p(f ; x0, . . . , xn−1; x) = f (x0) +
f (x0) − f (x1)
x0 − x1
(x − x0)
+
x − x1
x0 − x1
n−1
j=2
[f ; x0, x2, . . . , xj ] · (x − x0)(x − x2) . . . (x − xj−1)
−
x − x0
x0 − x1
n−1
j=2
[f ; x1, . . . , xj ] · (x − x1) . . . (x − xj−1)
p(f ; x0, . . . , xn−1; x) = f (x0) +
f (x0) − f (x1)
x0 − x1
(x − x0)
+
x − x1
x0 − x1
p(f ; x0, x2, . . . , xn−1; x) − f (x0)
−
x − x0
x0 − x1
p(f ; x1, . . . , xn−1; x) − f (x1)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Neville algorithm
p(f ; x0, . . . , xn−1; x) = f (x0) +
f (x0) − f (x1)
x0 − x1
(x − x0)
+
x − x1
x0 − x1
p(f ; x0, x2, . . . , xn−1; x) − f (x0)
−
x − x0
x0 − x1
p(f ; x1, . . . , xn−1; x) − f (x1)
p(f ; x0, . . . , xn−1; x) =
x − x1
x0 − x1
p(f ; x0, x2, . . . , xn−1; x)
+
x0 − x
x0 − x1
p(f ; x1, . . . , xn−1; x)
p(f ; x0, . . . , xn−1; x) =
x − xn−1
x0 − xn−1
p(f ; x0, . . . , xn−2; x)
+
x0 − x
x0 − xn−1
p(f ; x1, . . . , xn−1; x)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Neville algorithm
Recurrence for interpolating polynomials
p(f ; x0, . . . , xn−1; x) =
x − xn−1
x0 − xn−1
p(f ; x0, . . . , xn−2; x)
+
x0 − x
x0 − xn−1
p(f ; x1, . . . , xn−1; x)
p(f ; x0, . . . , xn−1; x)
p(f ; x0, . . . , xn−2; x) p(f ; x1, . . . , xn−1; x)
p(f ; x0, . . . , xn−3; x) p(f ; x1, . . . , xn−2; x) p(f ; x2, . . . , xn−1; x)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
p(f ; x0, x1; x) p(f ; x1, x2; x) . . . p(f ; xn−3, xn−2; x) p(f ; xn−2, xn−1; x)
f (x0) f (x1) f (x2) . . . f (xn−2) f (xn−1)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Hermite interpolating polynomial
p(xk) = f (xk), p (xk) = f (xk), . . . , p(mk −1)
(xk) = f (mk −1)
(xk),
k = 0, n − 1
1
(x − x0)m0 . . .
(x − xk)mk . . . (x − xn−1)mn−1
=
∞
j=0
ckj (x − xk)j
= qki (x) +
∞
j=mk −i
ckj (x − xk)j
, deg qki ≤ mk − i − 1
p(x) =
n−1
k=0
(x − x0)m0
. . .
(x − xk)mk
. . . (x − xn−1)mn−1
·
mk −1
i=0
f (i)(xk)
i!
(x − xk)i
qki (x)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Charles Hermite (1822–1901)
Dmytro Mitin fb.com/dmitry.mitin Interpolation
What’s next?
Nonpolynomial interpolation (rational functions, . . . )
Multivariate interpolation
Fractal interpolation
. . .
Dmytro Mitin fb.com/dmitry.mitin Interpolation
It’s coding time!
Problem 1.
Double interpolateAtPoint
(ListDouble nodes,
Double point,
UnaryOperatorDouble function){
// UnaryOperatorDouble function = x - x * x;
// code here
}
Problem 2.
void addNodeAndUpdateDividedDifferences
(ListDouble nodes,
Double newNode,
ListListDouble dividedDifferences,
UnaryOperatorDouble function) {
//code here
}
Dmytro Mitin fb.com/dmitry.mitin Interpolation
Links
https://en.wikipedia.org/wiki/Interpolation
https://en.wikipedia.org/wiki/Finite difference
https://en.wikipedia.org/wiki/Divided differences
https://en.wikipedia.org/wiki/Polynomial interpolation
https://en.wikipedia.org/wiki/Lagrange polynomial
https://en.wikipedia.org/wiki/Newton polynomial
https://en.wikipedia.org/wiki/Hermite interpolation
http://mathworld.wolfram.com/LagrangeInterpolatingPolynomial.html
http://mathworld.wolfram.com
/NewtonsDividedDifferenceInterpolationFormula.html
http://mathworld.wolfram.com/HermitesInterpolatingPolynomial.html
https://en.wikipedia.org/wiki/Neville’s algorithm
http://mathworld.wolfram.com/NevillesAlgorithm.html
https://reference.wolfram.com/language/ref/Interpolation.html
http://algolist.ru/maths/approx.php
Dmytro Mitin fb.com/dmitry.mitin Interpolation

More Related Content

What's hot

8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integrationdicosmo178
 
[4] num integration
[4] num integration[4] num integration
[4] num integrationikhulsys
 
Newton divided difference interpolation
Newton divided difference interpolationNewton divided difference interpolation
Newton divided difference interpolationVISHAL DONGA
 
Num Integration
Num IntegrationNum Integration
Num Integrationmuhdisys
 
Linear approximations and_differentials
Linear approximations and_differentialsLinear approximations and_differentials
Linear approximations and_differentialsTarun Gehlot
 
Newton-Raphson Method
Newton-Raphson MethodNewton-Raphson Method
Newton-Raphson MethodJigisha Dabhi
 
Newton Forward Difference Interpolation Method
Newton Forward Difference Interpolation MethodNewton Forward Difference Interpolation Method
Newton Forward Difference Interpolation MethodAdeel Rasheed
 
Newton’s Forward & backward interpolation
Newton’s Forward &  backward interpolation Newton’s Forward &  backward interpolation
Newton’s Forward & backward interpolation Meet Patel
 
Applied numerical methods lec12
Applied numerical methods lec12Applied numerical methods lec12
Applied numerical methods lec12Yasser Ahmed
 
2.3 Operations that preserve convexity & 2.4 Generalized inequalities
2.3 Operations that preserve convexity & 2.4 Generalized inequalities2.3 Operations that preserve convexity & 2.4 Generalized inequalities
2.3 Operations that preserve convexity & 2.4 Generalized inequalitiesRyotaroTsukada
 
5.4 Saddle-point interpretation, 5.5 Optimality conditions, 5.6 Perturbation ...
5.4 Saddle-point interpretation, 5.5 Optimality conditions, 5.6 Perturbation ...5.4 Saddle-point interpretation, 5.5 Optimality conditions, 5.6 Perturbation ...
5.4 Saddle-point interpretation, 5.5 Optimality conditions, 5.6 Perturbation ...RyotaroTsukada
 
Maxima & Minima of Calculus
Maxima & Minima of CalculusMaxima & Minima of Calculus
Maxima & Minima of CalculusArpit Modh
 
Integral Calculus
Integral CalculusIntegral Calculus
Integral Calculusitutor
 
Resumen de Integrales (Cálculo Diferencial e Integral UNAB)
Resumen de Integrales (Cálculo Diferencial e Integral UNAB)Resumen de Integrales (Cálculo Diferencial e Integral UNAB)
Resumen de Integrales (Cálculo Diferencial e Integral UNAB)Mauricio Vargas 帕夏
 
Numerical_Methods_Simpson_Rule
Numerical_Methods_Simpson_RuleNumerical_Methods_Simpson_Rule
Numerical_Methods_Simpson_RuleAlex_5991
 

What's hot (18)

8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
 
[4] num integration
[4] num integration[4] num integration
[4] num integration
 
Newton divided difference interpolation
Newton divided difference interpolationNewton divided difference interpolation
Newton divided difference interpolation
 
Num Integration
Num IntegrationNum Integration
Num Integration
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
Linear approximations and_differentials
Linear approximations and_differentialsLinear approximations and_differentials
Linear approximations and_differentials
 
Newton-Raphson Method
Newton-Raphson MethodNewton-Raphson Method
Newton-Raphson Method
 
Newton Forward Difference Interpolation Method
Newton Forward Difference Interpolation MethodNewton Forward Difference Interpolation Method
Newton Forward Difference Interpolation Method
 
Newton’s Forward & backward interpolation
Newton’s Forward &  backward interpolation Newton’s Forward &  backward interpolation
Newton’s Forward & backward interpolation
 
Applied numerical methods lec12
Applied numerical methods lec12Applied numerical methods lec12
Applied numerical methods lec12
 
2.3 Operations that preserve convexity & 2.4 Generalized inequalities
2.3 Operations that preserve convexity & 2.4 Generalized inequalities2.3 Operations that preserve convexity & 2.4 Generalized inequalities
2.3 Operations that preserve convexity & 2.4 Generalized inequalities
 
5.4 Saddle-point interpretation, 5.5 Optimality conditions, 5.6 Perturbation ...
5.4 Saddle-point interpretation, 5.5 Optimality conditions, 5.6 Perturbation ...5.4 Saddle-point interpretation, 5.5 Optimality conditions, 5.6 Perturbation ...
5.4 Saddle-point interpretation, 5.5 Optimality conditions, 5.6 Perturbation ...
 
Maxima & Minima of Calculus
Maxima & Minima of CalculusMaxima & Minima of Calculus
Maxima & Minima of Calculus
 
Interpolation
InterpolationInterpolation
Interpolation
 
Integral Calculus
Integral CalculusIntegral Calculus
Integral Calculus
 
Resumen de Integrales (Cálculo Diferencial e Integral UNAB)
Resumen de Integrales (Cálculo Diferencial e Integral UNAB)Resumen de Integrales (Cálculo Diferencial e Integral UNAB)
Resumen de Integrales (Cálculo Diferencial e Integral UNAB)
 
Integral calculus
Integral calculusIntegral calculus
Integral calculus
 
Numerical_Methods_Simpson_Rule
Numerical_Methods_Simpson_RuleNumerical_Methods_Simpson_Rule
Numerical_Methods_Simpson_Rule
 

Viewers also liked

Numerical integration
Numerical integrationNumerical integration
Numerical integrationMohammed_AQ
 
MAT210/Integration/Romberg 2013-14
MAT210/Integration/Romberg 2013-14MAT210/Integration/Romberg 2013-14
MAT210/Integration/Romberg 2013-14John Ham
 
Type-level programming
Type-level programmingType-level programming
Type-level programmingDmytro Mitin
 
SJUT/Mat210/Interpolation/Lagrangian 2013-14S2
SJUT/Mat210/Interpolation/Lagrangian 2013-14S2SJUT/Mat210/Interpolation/Lagrangian 2013-14S2
SJUT/Mat210/Interpolation/Lagrangian 2013-14S2John Ham
 
SJUT/Mat210/Regression/Intro 2013-14S2
SJUT/Mat210/Regression/Intro 2013-14S2SJUT/Mat210/Regression/Intro 2013-14S2
SJUT/Mat210/Regression/Intro 2013-14S2John Ham
 
Hermite spline english_20161201_jintaeks
Hermite spline english_20161201_jintaeksHermite spline english_20161201_jintaeks
Hermite spline english_20161201_jintaeksJinTaek Seo
 
Core 3 Simpsons Rule
Core 3 Simpsons RuleCore 3 Simpsons Rule
Core 3 Simpsons Ruledavidmiles100
 
Presentation mathmatic 3
Presentation mathmatic 3Presentation mathmatic 3
Presentation mathmatic 3nashaat algrara
 
Universal Gates - Aneesa N Ali
Universal Gates - Aneesa N AliUniversal Gates - Aneesa N Ali
Universal Gates - Aneesa N AliDipayan Sarkar
 
08 interpolation lagrange
08 interpolation   lagrange08 interpolation   lagrange
08 interpolation lagrangeMohammad Tawfik
 
Applied numerical methods lec9
Applied numerical methods lec9Applied numerical methods lec9
Applied numerical methods lec9Yasser Ahmed
 
Scala dreaded underscore
Scala dreaded underscoreScala dreaded underscore
Scala dreaded underscoreRUDDER
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphicsPartnered Health
 

Viewers also liked (20)

Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
Type classes
Type classesType classes
Type classes
 
MAT210/Integration/Romberg 2013-14
MAT210/Integration/Romberg 2013-14MAT210/Integration/Romberg 2013-14
MAT210/Integration/Romberg 2013-14
 
Type-level programming
Type-level programmingType-level programming
Type-level programming
 
SJUT/Mat210/Interpolation/Lagrangian 2013-14S2
SJUT/Mat210/Interpolation/Lagrangian 2013-14S2SJUT/Mat210/Interpolation/Lagrangian 2013-14S2
SJUT/Mat210/Interpolation/Lagrangian 2013-14S2
 
SJUT/Mat210/Regression/Intro 2013-14S2
SJUT/Mat210/Regression/Intro 2013-14S2SJUT/Mat210/Regression/Intro 2013-14S2
SJUT/Mat210/Regression/Intro 2013-14S2
 
Romberg
RombergRomberg
Romberg
 
Hermite spline english_20161201_jintaeks
Hermite spline english_20161201_jintaeksHermite spline english_20161201_jintaeks
Hermite spline english_20161201_jintaeks
 
Romberg’s method
Romberg’s methodRomberg’s method
Romberg’s method
 
hermite cubic spline curve
hermite cubic spline curvehermite cubic spline curve
hermite cubic spline curve
 
Core 3 Simpsons Rule
Core 3 Simpsons RuleCore 3 Simpsons Rule
Core 3 Simpsons Rule
 
Finite difference & interpolation
Finite difference & interpolationFinite difference & interpolation
Finite difference & interpolation
 
Presentation mathmatic 3
Presentation mathmatic 3Presentation mathmatic 3
Presentation mathmatic 3
 
Universal Gates - Aneesa N Ali
Universal Gates - Aneesa N AliUniversal Gates - Aneesa N Ali
Universal Gates - Aneesa N Ali
 
Presentation2
Presentation2Presentation2
Presentation2
 
08 interpolation lagrange
08 interpolation   lagrange08 interpolation   lagrange
08 interpolation lagrange
 
Applied numerical methods lec9
Applied numerical methods lec9Applied numerical methods lec9
Applied numerical methods lec9
 
Es272 ch6
Es272 ch6Es272 ch6
Es272 ch6
 
Scala dreaded underscore
Scala dreaded underscoreScala dreaded underscore
Scala dreaded underscore
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphics
 

Similar to Interpolation

interpolation-190605141327 (1).pptx
interpolation-190605141327 (1).pptxinterpolation-190605141327 (1).pptx
interpolation-190605141327 (1).pptxsinghakhil952
 
interpolation-190605141327 (1).pptx
interpolation-190605141327 (1).pptxinterpolation-190605141327 (1).pptx
interpolation-190605141327 (1).pptxsinghakhil952
 
Tugasmatematikakelompok
TugasmatematikakelompokTugasmatematikakelompok
Tugasmatematikakelompokgundul28
 
Calculus B Notes (Notre Dame)
Calculus B Notes (Notre Dame)Calculus B Notes (Notre Dame)
Calculus B Notes (Notre Dame)Laurel Ayuyao
 
last lecture in infinite series
last lecture in infinite serieslast lecture in infinite series
last lecture in infinite seriesAlaa Mohammed
 
Tugas matematika kelompok
Tugas matematika kelompokTugas matematika kelompok
Tugas matematika kelompokachmadtrybuana
 
Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892drayertaurus
 
University of manchester mathematical formula tables
University of manchester mathematical formula tablesUniversity of manchester mathematical formula tables
University of manchester mathematical formula tablesGaurav Vasani
 
AlgoPerm2012 - 03 Olivier Hudry
AlgoPerm2012 - 03 Olivier HudryAlgoPerm2012 - 03 Olivier Hudry
AlgoPerm2012 - 03 Olivier HudryAlgoPerm 2012
 
Formulas de taylor
Formulas de taylorFormulas de taylor
Formulas de taylorERICK CONDE
 
Fórmulas de Taylor
Fórmulas de TaylorFórmulas de Taylor
Fórmulas de TaylorKike Prieto
 
Mathematical formula tables
Mathematical formula tablesMathematical formula tables
Mathematical formula tablesSaravana Selvan
 
Tabla de integrales ii
Tabla de integrales iiTabla de integrales ii
Tabla de integrales iijacagu
 
MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)hasnulslides
 
01 derivadas
01   derivadas01   derivadas
01 derivadasklorofila
 
Admissions in India 2015
Admissions in India 2015Admissions in India 2015
Admissions in India 2015Edhole.com
 
Fast parallelizable scenario-based stochastic optimization
Fast parallelizable scenario-based stochastic optimizationFast parallelizable scenario-based stochastic optimization
Fast parallelizable scenario-based stochastic optimizationPantelis Sopasakis
 

Similar to Interpolation (20)

interpolation-190605141327 (1).pptx
interpolation-190605141327 (1).pptxinterpolation-190605141327 (1).pptx
interpolation-190605141327 (1).pptx
 
interpolation-190605141327 (1).pptx
interpolation-190605141327 (1).pptxinterpolation-190605141327 (1).pptx
interpolation-190605141327 (1).pptx
 
Tugasmatematikakelompok
TugasmatematikakelompokTugasmatematikakelompok
Tugasmatematikakelompok
 
Composite functions
Composite functionsComposite functions
Composite functions
 
Calculus B Notes (Notre Dame)
Calculus B Notes (Notre Dame)Calculus B Notes (Notre Dame)
Calculus B Notes (Notre Dame)
 
last lecture in infinite series
last lecture in infinite serieslast lecture in infinite series
last lecture in infinite series
 
Tugas matematika kelompok
Tugas matematika kelompokTugas matematika kelompok
Tugas matematika kelompok
 
Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892
 
University of manchester mathematical formula tables
University of manchester mathematical formula tablesUniversity of manchester mathematical formula tables
University of manchester mathematical formula tables
 
AlgoPerm2012 - 03 Olivier Hudry
AlgoPerm2012 - 03 Olivier HudryAlgoPerm2012 - 03 Olivier Hudry
AlgoPerm2012 - 03 Olivier Hudry
 
Formulas de taylor
Formulas de taylorFormulas de taylor
Formulas de taylor
 
Fórmulas de Taylor
Fórmulas de TaylorFórmulas de Taylor
Fórmulas de Taylor
 
Mathematical formula tables
Mathematical formula tablesMathematical formula tables
Mathematical formula tables
 
Tabla de integrales ii
Tabla de integrales iiTabla de integrales ii
Tabla de integrales ii
 
MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)MT T4 (Bab 3: Fungsi Kuadratik)
MT T4 (Bab 3: Fungsi Kuadratik)
 
01 derivadas
01   derivadas01   derivadas
01 derivadas
 
Admissions in India 2015
Admissions in India 2015Admissions in India 2015
Admissions in India 2015
 
MS2 POwer Rules
MS2 POwer RulesMS2 POwer Rules
MS2 POwer Rules
 
parent functons
parent functonsparent functons
parent functons
 
Fast parallelizable scenario-based stochastic optimization
Fast parallelizable scenario-based stochastic optimizationFast parallelizable scenario-based stochastic optimization
Fast parallelizable scenario-based stochastic optimization
 

Recently uploaded

EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 

Recently uploaded (20)

EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 

Interpolation

  • 1. Interpolation Dmytro Mitin fb.com/dmitry.mitin 21 October 2015. Algoclub #17 Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 2. Interpolation of functions Finite differences Divided differences Lagrange interpolating polynomial Newton interpolating polynomial Hermite interpolating polynomial∗ Interpolation error Neville algorithm Algorithmic complexity of interpolation Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 3. String interpolation int x = 5, y = 4; System.out.println(String.format("%d * %d = %d", x, y, x * y)); 5 * 4 = 20 Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 4. How many roots? c · (x − a)(x − b) (c − a)(c − b) + a · (x − b)(x − c) (a − b)(a − c) + b · (x − c)(x − a) (b − c)(b − a) = x (a, b, c are fixed, a = b, b = c, c = a) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 5. How many roots? (x − a)(x − b) (c − a)(c − b) + (x − b)(x − c) (a − b)(a − c) + (x − c)(x − a) (b − c)(b − a) = 1 (a, b, c are fixed, a = b, b = c, c = a) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 6. How many roots? c2 · (x − a)(x − b) (c − a)(c − b) +a2 · (x − b)(x − c) (a − b)(a − c) +b2 · (x − c)(x − a) (b − c)(b − a) = x2 (a, b, c are fixed, a = b, b = c, c = a) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 7. How many roots? c3 · (x − a)(x − b) (c − a)(c − b) +a3 · (x − b)(x − c) (a − b)(a − c) +b3 · (x − c)(x − a) (b − c)(b − a) = x3 (a, b, c are fixed, a = b, b = c, c = a) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 8. How many roots? c4 · (x − a)(x − b) (c − a)(c − b) +a4 · (x − b)(x − c) (a − b)(a − c) +b4 · (x − c)(x − a) (b − c)(b − a) = x4 (a, b, c are fixed, a = b, b = c, c = a) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 9. Extrapolation World population Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 10. Approximation Uniform approximation max x∈[a,b] |f (x) − p(x)| → min p∈P Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 11. Approximation Mean approximation b a |f (x) − p(x)| → min p∈P Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 12. Interpolation p(xk) = f (xk), k = 0, n − 1 or p(xk) = yk, k = 0, n − 1 Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 13. Lagrange interpolating polynomial n = 3 p(x) = f (c)· (x − a)(x − b) (c − a)(c − b) +f (a)· (x − b)(x − c) (a − b)(a − c) +f (b)· (x − c)(x − a) (b − c)(b − a) p(a) = f (a), p(b) = f (b), p(c) = f (c) (a = b, b = c, c = a) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 14. Lagrange interpolating polynomial p(x) = f (x0) · (x − x0)(x − x1) . . . (x − xn−1) (x0 − x0)(x0 − x1) . . . (x0 − xn−1) + f (x1) · (x − x0) (x − x1) . . . (x − xn−1) (x1 − x0) (x1 − x1) . . . (x1 − xn−1) + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + f (xn−1) · (x − x0)(x − x1) . . . (x − xn−1) (xn−1 − x0)(xn−1 − x1) . . .((((((( (xn−1 − xn−1) p(x0) = f (x0), p(x1) = f (x1), . . . , p(xn−1) = f (xn−1) (x0 = . . . = xn−1) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 15. p(x) = n−1 k=0 f (xk) · (x − x0) . . . (x − xk) . . . (x − xn−1) (xk − x0) . . . (xk − xk) . . . (xk − xn−1) Definition Lagrange interpolating polynomial p(x) = n−1 k=0 f (xk) · 0≤j≤n−1 j=k (x − xj ) 0≤j≤n−1 j=k (xk − xj ) p(xk) = f (xk), k = 0, n − 1 (x0 = . . . = xn−1) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 16. Joseph-Louis Lagrange (1736–1813) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 17. Uniqueness p(x) = n−1 i=0 ai xi p(xk) = f (xk), k = 0, n − 1 n−1 i=0 ai xi k = f (xk), k = 0, n − 1 det 1 1 . . . 1 x0 x1 . . . xn−1 x2 0 x2 1 . . . x2 n−1 . . . . . . . . . . . . xn−1 0 xn−1 1 . . . xn−1 n−1 = 0≤jk≤n−1 (xk − xj ) = 0, x0 = . . . = xn−1 Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 18. Equidistant nodes p(x) = n−1 k=0 f (xk) · (x − x0) . . . (x − xk) . . . (x − xn−1) (xk − x0) . . . (xk − xk) . . . (xk − xn−1) Partial case: x1 − x0 = x2 − x1 = . . . = xn−1 − xn−2 = h, xk = x0 + k · h, k = 0, n − 1 p(x) = n−1 k=0 f (x0 + k h) · (x−x0)(x−x0−h)...((((((x−x0−k·h)...(x−x0−(n−1)h) k(k−1)...(k−k)...(k−n+1)·hn−1 p(x) = n−1 k=0 f (x0 + k h) · t(t − 1) . . .(t − k) . . . (t − n + 1) k!(n − k − 1)!(−1)n−k−1 , t = x − x0 h Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 19. Complexity p(x) = n−1 k=0 f (xk) · (x − x0) . . . (x − xk) . . . (x − xn−1) (xk − x0) . . . (xk − xk) . . . (xk − xn−1) What is complexity? Is this formula good? Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 20. p(x) = n−1 k=0 f (xk) · (x − x0) . . . (x − xk) . . . (x − xn−1) (xk − x0) . . . (xk − xk) . . . (xk − xn−1) ≡ pn(x) p(x) = p1(x) + n−1 j=1 pj+1(x) − pj (x) p(x) = f (x0) + n−1 j=1 j k=0 f (xk) · (x − x0) . . . (x − xk) . . . (x − xj ) (xk − x0) . . . (xk − xk) . . . (xk − xj ) − j−1 k=0 f (xk) · (x − x0) . . . (x − xk) . . . (x − xj−1) (xk − x0) . . . (xk − xk) . . . (xk − xj−1) p(x) = f (x0) + n−1 j=1 Cj · (x − x0)(x − x1) . . . (x − xj−1) Attention! Algebraic trick: x = x0, x1, . . . , xj−1 j are zeroes, deg = j Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 21. Let’s rewrite formula p(x) = f (x0) + n−1 j=1 j k=0 f (xk) · (x − x0) . . . (x − xk) . . . (x − xj ) (xk − x0) . . . (xk − xk) . . . (xk − xj ) − j−1 k=0 f (xk) · (x − x0) . . . (x − xk) . . . (x − xj−1) (xk − x0) . . . (xk − xk) . . . (xk − xj−1) p(x) = f (x0) + n−1 j=1 Cj · (x − x0)(x − x1) . . . (x − xj−1) Cj ? x = xj : f (xj ) − j−1 k=0 f (xk) · (xj − x0) . . . (xj − xk) . . . (xj − xj−1) (xk − x0) . . . (xk − xk) . . . (xk − xj−1) = Cj · (xj − x0)(xj − x1) . . . (xj − xj−1) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 22. Let’s rewrite formula f (xj ) − j−1 k=0 f (xk) · (xj − x0) . . . (xj − xk) . . . (xj − xj−1) (xk − x0) . . . (xk − xk) . . . (xk − xj−1) = Cj · (xj − x0)(xj − x1) . . . (xj − xj−1) Cj = f (xj ) (xj − x0)(xj − x1) . . . (xj − xj−1) − j−1 k=0 f (xk) · 1 (xk − x0) . . . (xk − xk) . . . (xk − xj−1) · 1 xj − xk Cj = j k=0 f (xk) (xk − x0) . . . (xk − xk) . . . (xk − xj ) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 23. Cj = j k=0 f (xk) (xk − x0) . . . (xk − xk) . . . (xk − xj ) p(x) = f (x0) + n−1 j=1 Cj · (x − x0)(x − x1) . . . (x − xj−1) p(x) = f (x0) + n−1 j=1 j k=0 f (xk) (xk − x0) . . . (xk − xk) . . . (xk − xj ) ·(x − x0)(x − x1) . . . (x − xj−1) Definition Newton interpolating polynomial p(x) = f (x0) + n−1 j=1 [f ; x0, x1, . . . , xj ] Divided differences · (x − x0)(x − x1) . . . (x − xj−1) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 24. Isaac Newton (1643–1727) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 25. Equidistant nodes p(x) = n−1 j=0 j k=0 f (xk) (xk − x0) . . . (xk − xk) . . . (xk − xj ) ·(x − x0)(x − x1) . . . (x − xj−1) Partial case: x1 − x0 = x2 − x1 = . . . = xn−1 − xn−2 = h, xk = x0 + k · h, k = 0, n − 1 p(x) = n−1 j=0 j k=0 f (x0 + k h) k!(j − k)!(−1)j−khj ·(x − x0)(x − x0 − h) . . . (x − x0 − (j − 1)h) p(x) = n−1 j=0 1 j! j k=0 (−1)j−k Ck j f (x0 + k h) · t(t − 1) . . . (t − j + 1) t = x−x0 h , Ck j = j! k!(j−k)! Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 26. Finite differences p(x) = n−1 j=0 j k=0 f (xk) (xk − x0) . . . (xk − xk) . . . (xk − xj ) ·(x − x0)(x − x1) . . . (x − xj−1) p(x) = n−1 j=0 1 j! j k=0 (−1)j−k Ck j f (x0 + k h) · t(t − 1) . . . (t − j + 1) t = x − x0 h , Ck j = j! k!(j − k)! ∆j f (x0, h) = j k=0 (−1)j−k Ck j f (x0 + k h) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 27. Finite differences ∆j f (x0, h) = j k=0 (−1)j−k Ck j f (x0 + k h) ∆0 f (x0, h) = f (x0) ∆j f (x0, h) = ∆(∆j−1 f )(x0, h) ∆f (x0, h) = f (x0 + h) − f (x0) ∆2 f (x0, h) = ∆(∆f )(x0, h) = ∆f (x0 + h) − ∆f (x0) = f (x0 + 2h) − 2f (x0 + h) + f (x0) ∆3 f (x0, h) = f (x0 + 3h) − 3f (x0 + 2h) + 3f (x0 + h) − f (x0) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 28. Complexity p(x) = n−1 j=0 [f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1) p(xk) = f (xk), k = 0, n − 1 [f ; x0, x1, . . . , xj ] = j k=0 f (xk) (xk − x0) . . . (xk − xk) . . . (xk − xj ) How to add new node? What is complexity? Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 29. Divided differences p(x) = n−1 j=0 [f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1) [f ; x0, x1, . . . , xj ] = j k=0 f (xk) (xk − x0) . . . (xk − xk) . . . (xk − xj ) [f ; x0] = f (x0) [f ; x0, x1] = f (x0) x0 − x1 + f (x1) x1 − x0 = f (x0) − f (x1) x0 − x1 [f ; x0, x1, x2] = f (x0) (x0−x1)(x0−x2) + f (x1) (x1−x0)(x1−x2) + f (x2) (x2−x0)(x2−x1) = f (x0)−f (x1) x0−x1 − f (x1)−f (x2) x1−x2 x0 − x2 = [f ; x0, x1] − [f ; x1, x2] x0 − x2 Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 30. Divided differences p(x) = n−1 j=0 [f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1) [f ; x0, x1, . . . , xj ] = j k=0 f (xk) (xk − x0) . . . (xk − xk) . . . (xk − xj ) Recurrence: [f ; x0, x1, . . . , xj−1, xj ] = [f ; x0, x1, . . . , xj−1] − [f ; x1, . . . , xj−1, xj ] x0 − xj , j ≥ 1 [f ; x0] = f (x0) [f ; . . . , xr , . . . , xs, . . .] = [f ; . . . , xr , . . . ,xs, . . .] − [f ; . . . ,xr , . . . , xs, . . .] xr − xs Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 31. Interpolation error p(x) = n−1 j=0 [f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1) p(xk) = f (xk), k = 0, n − 1 q(x) = n j=0 [f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1) = p(x) + [f ; x0, x1, . . . , xn] · (x − x0)(x − x1) . . . (x − xn−1) q(xk) = f (xk), k = 0, n f (xn) = q(xn) = p(xn) + [f ; x0, x1, . . . , xn] ·(xn − x0)(xn − x1) . . . (xn − xn−1) f (x) = p(x) + [f ; x0, x1, . . . , xn−1, x] ·(x − x0)(x − x1) . . . (x − xn−1) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 32. Interpolation error f (x) = p(x) + [f ; x0, x1, . . . , xn−1, x] ·(x − x0)(x − x1) . . . (x − xn−1) f (xk) − p(xk) = 0, k = 0, n − 1 f (n−1) (ξ) − p(n−1) (ξ) = 0, ξ ∈ [a, b] x0, . . . , xn−1 f (n−1) (ξ) = p(n−1) (ξ) = [f ; x0, x1, . . . , xn−1] · (n − 1)! [f ; x0, x1, . . . , xn−1] = f (n−1)(ξ) (n − 1)! f (x) − p(x) = f (n−1)(ξ) (n − 1)! · (x − x0)(x − x1) . . . (x − xn−1) |f (x) − p(x)| ≤ 1 (n − 1)! max [a,b] |f (n−1) | · (b − a)n , x ∈ [a, b] Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 33. Neville algorithm p(x) = n−1 j=0 [f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1) = f (x0) + (x − x0) · [f ; x0, x1] + (x − x1) · . . . [f ; x0, . . . , xn−2] + (x − xn−1)[f ; x0, . . . , xn−1] . . . [f ; x0, x1, . . . , xj−1, xj ] = [f ; x0, x1, . . . , xj−1] − [f ; x1, . . . , xj−1, xj ] x0 − xj [f ; x0, . . . , xn−1] [f ; x0, . . . , xn−2] [f ; x1, . . . , xn−1] [f ; x0, . . . , xn−3] [f ; x1, . . . , xn−2] [f ; x2, . . . , xn−1] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [f ; x0, x1] [f ; x1, x2] [f ; x2, x3] . . . . . . [f ; xn−3, xn−2] [f ; xn−2, xn−1] f (x0) f (x1) f (x2) f (x3) . . . f (xn−3) f (xn−2) f (xn−1) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 34. Eric Harold Neville (1889–1961) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 35. Neville algorithm p(x) = n−1 j=0 [f ; x0, x1, . . . , xj ] · (x − x0)(x − x1) . . . (x − xj−1) [f ; x0, x1, . . . , xj−1, xj ] = [f ; x0, x1, . . . , xj−1] − [f ; x1, . . . , xj−1, xj ] x0 − xj [f ; x0, x1, x2, . . . , xj ] = [f ; x0, x2, . . . , xj ] − [f ; x1, x2, . . . , xj ] x0 − x1 p(x) ≡ p(f ; x0, . . . , xn−1; x) p(f ; x0, . . . , xn−1; x) = f (x0) + f (x0) − f (x1) x0 − x1 (x − x0) + x − x1 x0 − x1 n−1 j=2 [f ; x0, x2, . . . , xj ] · (x − x0)(x − x2) . . . (x − xj−1) − x − x0 x0 − x1 n−1 j=2 [f ; x1, . . . , xj ] · (x − x1) . . . (x − xj−1) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 36. Neville algorithm p(f ; x0, . . . , xn−1; x) = f (x0) + f (x0) − f (x1) x0 − x1 (x − x0) + x − x1 x0 − x1 n−1 j=2 [f ; x0, x2, . . . , xj ] · (x − x0)(x − x2) . . . (x − xj−1) − x − x0 x0 − x1 n−1 j=2 [f ; x1, . . . , xj ] · (x − x1) . . . (x − xj−1) p(f ; x0, . . . , xn−1; x) = f (x0) + f (x0) − f (x1) x0 − x1 (x − x0) + x − x1 x0 − x1 p(f ; x0, x2, . . . , xn−1; x) − f (x0) − x − x0 x0 − x1 p(f ; x1, . . . , xn−1; x) − f (x1) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 37. Neville algorithm p(f ; x0, . . . , xn−1; x) = f (x0) + f (x0) − f (x1) x0 − x1 (x − x0) + x − x1 x0 − x1 p(f ; x0, x2, . . . , xn−1; x) − f (x0) − x − x0 x0 − x1 p(f ; x1, . . . , xn−1; x) − f (x1) p(f ; x0, . . . , xn−1; x) = x − x1 x0 − x1 p(f ; x0, x2, . . . , xn−1; x) + x0 − x x0 − x1 p(f ; x1, . . . , xn−1; x) p(f ; x0, . . . , xn−1; x) = x − xn−1 x0 − xn−1 p(f ; x0, . . . , xn−2; x) + x0 − x x0 − xn−1 p(f ; x1, . . . , xn−1; x) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 38. Neville algorithm Recurrence for interpolating polynomials p(f ; x0, . . . , xn−1; x) = x − xn−1 x0 − xn−1 p(f ; x0, . . . , xn−2; x) + x0 − x x0 − xn−1 p(f ; x1, . . . , xn−1; x) p(f ; x0, . . . , xn−1; x) p(f ; x0, . . . , xn−2; x) p(f ; x1, . . . , xn−1; x) p(f ; x0, . . . , xn−3; x) p(f ; x1, . . . , xn−2; x) p(f ; x2, . . . , xn−1; x) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p(f ; x0, x1; x) p(f ; x1, x2; x) . . . p(f ; xn−3, xn−2; x) p(f ; xn−2, xn−1; x) f (x0) f (x1) f (x2) . . . f (xn−2) f (xn−1) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 39. Hermite interpolating polynomial p(xk) = f (xk), p (xk) = f (xk), . . . , p(mk −1) (xk) = f (mk −1) (xk), k = 0, n − 1 1 (x − x0)m0 . . . (x − xk)mk . . . (x − xn−1)mn−1 = ∞ j=0 ckj (x − xk)j = qki (x) + ∞ j=mk −i ckj (x − xk)j , deg qki ≤ mk − i − 1 p(x) = n−1 k=0 (x − x0)m0 . . . (x − xk)mk . . . (x − xn−1)mn−1 · mk −1 i=0 f (i)(xk) i! (x − xk)i qki (x) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 40. Charles Hermite (1822–1901) Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 41. What’s next? Nonpolynomial interpolation (rational functions, . . . ) Multivariate interpolation Fractal interpolation . . . Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 42. It’s coding time! Problem 1. Double interpolateAtPoint (ListDouble nodes, Double point, UnaryOperatorDouble function){ // UnaryOperatorDouble function = x - x * x; // code here } Problem 2. void addNodeAndUpdateDividedDifferences (ListDouble nodes, Double newNode, ListListDouble dividedDifferences, UnaryOperatorDouble function) { //code here } Dmytro Mitin fb.com/dmitry.mitin Interpolation
  • 43. Links https://en.wikipedia.org/wiki/Interpolation https://en.wikipedia.org/wiki/Finite difference https://en.wikipedia.org/wiki/Divided differences https://en.wikipedia.org/wiki/Polynomial interpolation https://en.wikipedia.org/wiki/Lagrange polynomial https://en.wikipedia.org/wiki/Newton polynomial https://en.wikipedia.org/wiki/Hermite interpolation http://mathworld.wolfram.com/LagrangeInterpolatingPolynomial.html http://mathworld.wolfram.com /NewtonsDividedDifferenceInterpolationFormula.html http://mathworld.wolfram.com/HermitesInterpolatingPolynomial.html https://en.wikipedia.org/wiki/Neville’s algorithm http://mathworld.wolfram.com/NevillesAlgorithm.html https://reference.wolfram.com/language/ref/Interpolation.html http://algolist.ru/maths/approx.php Dmytro Mitin fb.com/dmitry.mitin Interpolation