0% found this document useful (0 votes)
23 views37 pages

Lesson 5

Uploaded by

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

Lesson 5

Uploaded by

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

Escuela Técnica Superior de Ingeniería Numerical Methods in

Universidad Loyola Andalucía Engineering

Numerical Methods in
Engineering
Part II
Lesson 5: “Interpolation”
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Outline
§ What is interpolation? What is it used for?
§ Lagrange interpolation
§ Newton’s divided differences
§ Approximating functions
§ Interpolation error
§ Hermite interpolation
§ Chebyshev interpolation
§ Cubic splines

2
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Interpolation: what is it and what is it used for?


§ Interpolation is a method for constructing new data points within
the range of a discrete set of known data points.
§ In other words, interpolation is a tool for finding functions passing
through given data points.
§ Polynomial interpolation occurs when polynomial functions are
used to replace the information.
§ Polynomials are simple to define, differentiate, and integrate.
§ Polynomial interpolation became relevant at the second half of the
20th century, motivated by the naval, aerospace and automotive
sectors.
§ Not only has it been used in Engineering applications, for instance
interpolation was a breakthrough in computer typesetting, being
the basis for the PostScript language which later resulted in the well-
known PDF format.

3
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Real case: Thermal Engineering


§ Evaluate the specific heat of water at 320 K
Cp (kJ/kgK)
𝐶" 𝑇 = 𝑎 + 𝑏𝑇
4.182 − 4.179
= 4.179 + 𝑇 − 315
325 − 315

4.182
4.181
4.179

315 325 T (K)


320

4
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Interpolation: what is it and what is it used for?


§ A function on the real numbers represents an infinite amount
of information.
§ Thus, we can find a polynomial trough a set of data: the
information is replaced by a function that can be evaluated in a
finite number of steps.
§ This function may be close enough so as to represent new
data sets.

5
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Interpolation: what is it and what is it used for?


y
P(x)=c0+c1x+c2x2
(x3,y3)

(x1,y1)
(x2,y2)

The function P(x) interpolates the data points (xi,yi) if P(xi)=yi for each 1≤ i ≤ n
6
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Lagrange interpolation
§ Let us consider 𝑛 + 1 data points in the form 𝑥5 , 𝑦5 , with 𝑖 = 0, … , 𝑛, we
can find a polynomial of degree 𝑛 that interpolates<
these points as:
𝑃< 𝑥 = 𝑦= 𝐿= 𝑥 + ⋯ + 𝑦< 𝐿< 𝑥 = @ 𝑦5 𝐿5 𝑥
5A=
and the following Lagrange basis polynomials: <
𝑥 − 𝑥= ⋯ 𝑥 − 𝑥BCD 𝑥 − 𝑥BED ⋯ 𝑥 − 𝑥< 𝑥 − 𝑥G
𝐿B 𝑥 = =F
𝑥B − 𝑥= ⋯ 𝑥B − 𝑥BCD 𝑥B − 𝑥BED ⋯ 𝑥B − 𝑥< 𝑥B − 𝑥G
GHB
§ Note that 𝐿B 𝑥B = 1 and 𝐿B 𝑥G = 0, where 𝑥G is any of the other data
points.
§ The main theorem of polynomial interpolation reads that there exists one
and only one polynomial 𝑃 of degree 𝑛 or less that satisfies 𝑃 𝑥5 = 𝑦5 for
𝑖 = 0, … , 𝑛
7
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Lagrange interpolation
§ E.g., find the polynomial of degree 3 or less that interpolates the
points: 0,2 , 1,1 , 2,0 , 3, −1 :

ICIJ ICIK ICIL ICD ICN ICO D


§ 𝐿= 𝑥 = = =− 𝑥 O − 6𝑥 N + 11𝑥 − 6
IM CIJ IM CIK IM CIL =CD =CN =CO P

ICIM ICIK ICIL IC= ICN ICO D


§ 𝐿D 𝑥 = = = 𝑥 O − 5𝑥 N + 6𝑥
IJ CIM IJ CIK IJ CIL DC= DCN DCO N

ICIM ICIJ ICIL IC= ICD ICO D


§ 𝐿N 𝑥 = = = − 𝑥 O − 4𝑥 N + 3𝑥
IK CIM IK CIJ IK CIL NC= NCD NCO P

ICIM ICIJ ICIK IC= ICD ICN D


§ 𝐿O 𝑥 = = = 𝑥 O − 3𝑥 N + 2𝑥
IL CIM IL CIJ IL CIK OC= OCD OCN P

8
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Lagrange interpolation
§ E.g., find the polynomial of degree 3 or less that interpolates the
points: 0,2 , 1,1 , 2,0 , 3, −1 :

§ 𝑃O 𝑥 = 𝑦= 𝐿= 𝑥 + 𝑦D 𝐿D 𝑥 + 𝑦N 𝐿N 𝑥 + 𝑦O 𝐿O 𝑥

D D
§ 𝑃O 𝑥 = 2 · − 𝑥 O − 6𝑥 N + 11𝑥 − 6 +1· 𝑥 O − 5𝑥 N + 6𝑥 +0·
P N
D D
− 𝑥O − 4𝑥 N + 3𝑥 −1· 𝑥 O − 3𝑥 N + 2𝑥
P P

§ 𝑃O 𝑥 = −𝑥 + 2

9
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Lagrange interpolation
Data points Lagrange basis Lagrange interpolation

10
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Newton’s divided differences


§ Let us asume that the 𝑛 + 1 data points 𝑥5 , 𝑦5 come from a
function 𝑓 𝑥 , so that our goal is to interpolate:

𝑥= , 𝑓 𝑥= , 𝑥D , 𝑓 𝑥D , … , 𝑥< , 𝑓 𝑥<

§ Now denote by 𝑓 𝑥= , … , 𝑥< the coefficient of the 𝑥 < term in the


polynomial that interpolates the data points, thus:

𝑃< 𝑥
= 𝑓 𝑥= + 𝑓 𝑥= 𝑥D 𝑥 − 𝑥= + 𝑓 𝑥= 𝑥D 𝑥N 𝑥 − 𝑥= 𝑥 − 𝑥D
+ 𝑓 𝑥= … 𝑥< 𝑥 − 𝑥= 𝑥 − 𝑥D ⋯ 𝑥 − 𝑥<CD

11
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Newton’s divided differences


§ The coefficients 𝑓 𝑥= , … , 𝑥< can be recursively calculated as
follows:
1. List the data points in a table:
𝑥= 𝑓 𝑥=
𝑥D 𝑓 𝑥D
⋮ ⋮
𝑥< 𝑓 𝑥<

2. Define the divided differences (see next slide)

12
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Newton’s divided differences


§ The coefficients 𝑓 𝑥= , … , 𝑥< can be recursively calculated as follows:

2. Define the divided differences:

𝑓 𝑥B = 𝑓 𝑥B

𝑓 𝑥BED − 𝑓 𝑥B
𝑓 𝑥B 𝑥BED =
𝑥BED − 𝑥B

𝑓 𝑥BED 𝑥BEN − 𝑓 𝑥B 𝑥BED


𝑓 𝑥B 𝑥BED 𝑥BEN =
𝑥BEN − 𝑥B

𝑓 𝑥BED 𝑥BEN 𝑥BEO − 𝑓 𝑥B 𝑥BED 𝑥BEN


𝑓 𝑥B 𝑥BED 𝑥BEN 𝑥BEO =
𝑥BEO − 𝑥B

13
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Newton’s divided differences


Algorithm

Given 𝑥 = 𝑥D , … , 𝑥< and 𝑦 = 𝑦D , … , 𝑦<

for 𝑗 = 1, … , 𝑛
𝑓 𝑥G = 𝑦G
end

for 𝑖 = 2, … , 𝑛
for 𝑗 = 1, … , 𝑛 + 1 − 𝑖
𝑓 𝑥G ⋯ 𝑥GE5CD = 𝑓 𝑥GED ⋯ 𝑥GE5CD − 𝑓 𝑥G ⋯ 𝑥GE5CN / 𝑥GE5CD − 𝑥G
end
end

14
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Newton’s divided differences


§ E.g. use the divided differences to find the interpolating
polynomial passing through the points 0,1 , 2,2 , 3,4 :
𝑥G 𝑓 𝑥G 𝑓 𝑥G 𝑥GED 𝑓 𝑥G 𝑥GED 𝑥GEN

0 1
1/2
2 2 1/2 1 1
𝑃N 𝑥 = 1 + 𝑥 − 0 + 𝑥 − 0 𝑥 − 2
2 2 2
3 4 𝑃< 𝑥 = 𝑓 𝑥= + 𝑓 𝑥= 𝑥D 𝑥 − 𝑥= + 𝑓 𝑥= 𝑥D 𝑥N 𝑥 − 𝑥= 𝑥 − 𝑥D

15
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Approximating functions
§ Polynomial interpolation can be used to replace the evaluation
of a complicated function by an approximated polynomial (the
counterpart is, of course, a loss in accuracy).
Z NZ OZ
§ E.g. Interpolate the function 𝑓 𝑥 = sin 𝑥 at 𝑥 = 0, , ,
P P P
0 0
𝜋 0.9549
6 0.5 −0.2443
0.6990 −0.1139
2𝜋
0.8660 −0.4232
6
0.2559
3𝜋
1.0000
6
16
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Approximating functions
Z NZ OZ
§ E.g. Interpolate the function 𝑓 𝑥 = sin 𝑥 at 𝑥 = 0, , ,
P P P

sin 𝑥

𝑃O 𝑥
17
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Approximating functions
Z NZ OZ
§ E.g. Interpolate the function 𝑓 𝑥 = sin 𝑥 at 𝑥 = 0, , ,
P P P
§ The resulting polynomial is:
𝜋 𝜋 𝜋
𝑃O 𝑥 = 0 + 0.9549𝑥 − 0.2443𝑥 𝑥 − − 0.1139𝑥 𝑥 − 𝑥−
6 6 3
§ What happens when we evaluate 𝑓 𝑥 and 𝑃O 𝑥 at 𝑥 =
Z NZ OZ
0, , , ?
P P P
NZ
§ What happens when we evaluate 𝑓 𝑥 and 𝑃O 𝑥 at 𝑥 = ?
O

18
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Approximating functions
§ What happens when we evaluate 𝑓 𝑥 and 𝑃O 𝑥 at 𝑥 =
Z NZ OZ
0, , , ?
P P P

𝑥 𝑓 𝑥 𝑃O 𝑥 𝝐𝒂𝒃𝒔 = 𝑃O 𝑥 − 𝒇(𝒙)
0 0 0 0
𝜋 0.5 0.5 0
6
2𝜋 0.8660 0.8660 0
6
3𝜋 1.000 1.000 0
6

19
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Interpolation error
§ The accuracy of the interpolation depends on the
approximation chosen.
§ In the case of 𝑓 𝑥 = sin 𝑥 the third-order polynomial, 𝑃O 𝑥 ,
provides an acceptable approximation for the first two digits.
§ Thus, the error depends on the order of the approximation.
§ It is possible to provide an upper bound for the error and the
form of the interpolation error formula, provided we can
compute 𝑓 𝑥 − 𝑃< 𝑥 : <
𝑓 (<ED) 𝑐
𝑓 𝑥 − 𝑃< 𝑥 = F 𝑥 − 𝑥5 ·
𝑛+1 !
5A=
where 𝑐 lies between the smallest and largest of 𝑥5 , 𝑐 ∈ [𝑥= , 𝑥< ].

20
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Interpolation error
§ E.g., 𝑓 𝑥 = sin 𝑥, we can compute 𝑓 𝑥 − 𝑃O 𝑥 as:

𝜋 2𝜋 3𝜋 𝑓 iiii 𝑐
𝑓 𝑥 − 𝑃O 𝑥 = 𝑥−0 𝑥− 𝑥− 𝑥−
6 6 6 4!

§ We now that 𝑓 iiii 𝑥 = sin 𝑥 and max 𝑓 iiii 𝑐 = 1 (at 𝑐 = 0), thus:
𝜋 2𝜋 3𝜋 1
max 𝑓 𝑥 − 𝑃O 𝑥 = 𝑥 − 0 𝑥 − 𝑥− 𝑥−
6 6 6 4!
which is an upper bound:
𝜋 2𝜋 3𝜋 1
𝑓 𝑥 − 𝑃< 𝑥 ≤ 𝑥 − 0 𝑥 − 𝑥− 𝑥−
6 6 6 4!
21
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Interpolation error
§ This is, at 𝑥 = 1, the worst-case error is:

𝜋 2𝜋 3𝜋 1
sin 1 − 𝑃O 1 ≤ 1−0 1− 1− 1− ~0.0005
6 6 6 4!

22
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Hermite interpolation
§ As we have seen before, the interpolation polynomial fulfills the
values at the base points but may differ in between.
§ To improve the approximation, we may prescribe that their
derivatives, at the base points, also match.
§ Hermite interpolation constructs an interpolant based on
equations of the function values and their derivatives.
§ Thus, we need to know 𝑥5 , 𝑓 𝑥5 , 𝑓′ 𝑥5 , this is, 2𝑛 + 2 data
points.
§ For this reason, the polynomial is in the order of 2𝑛 + 1.

23
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Hermite interpolation
§ The Hermite polynomial reads then,
𝑃N<ED 𝑥
= 𝑓 𝑥= + 𝑓 𝑥= , 𝑥= 𝑥 − 𝑥= + 𝑓 𝑥= , 𝑥= , 𝑥D 𝑥 − 𝑥= N
+ 𝑓 𝑥= , 𝑥= , 𝑥D , 𝑥D 𝑥 − 𝑥= N 𝑥 − 𝑥D + ⋯
+ 𝑓 𝑥= , 𝑥= , 𝑥D , 𝑥D , … , 𝑥< , 𝑥< 𝑥 − 𝑥= N 𝑥 − 𝑥D N ⋯ 𝑥 − 𝑥<

§ The coefficients 𝑓 ∎ can be obtained as divided differences.

24
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Hermite interpolation
§ E.g. Determine the Hermite interpolation polynomial for 𝑓 𝑥 =
ln 𝑥 at 𝑥= = 1 and 𝑥D = 2.
𝑓[𝑥] 𝑓[𝑥, 𝑥] 𝑓[𝑥, 𝑥, 𝑥] 𝑓[𝑥, 𝑥, 𝑥, 𝑥]

𝑥= = 1 𝑓(1) = 0 𝑓 1,1 = 𝑓′(1) = 1

𝑥= = 1 𝑓(1) = 0 𝑓 1,1,2 = −0.31


𝑓 1,2 = 0.69 𝑓 1,1,2,2 = 0.11
𝑥D = 2 𝑓(2) = 0.69 𝑓 1,2,2 = −0.19
𝑥D = 2 𝑓(2) = 0.69 𝑓 2,2 = 𝑓′(2) = 0.5

25
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Hermite interpolation
§ E.g. Determine the Hermite interpolation polynomial for 𝑓 𝑥 =
ln 𝑥 at 𝑥= = 1 and 𝑥D = 2.
§ Thus, the interpolation polynomial yields,
𝑃O 𝑥
= 𝑓 1 + 𝑓 1,1 𝑥 − 1 + 𝑓 1,1,2 𝑥 − 1 N
+ 𝑓 1,1,2,2 𝑥 − 1 N 𝑥 − 2

which is
N N
𝑃O 𝑥 = 𝑥 − 1 − 0.31 𝑥 − 1 + 0.12 𝑥 − 1 𝑥−2

26
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Chebyshev interpolation
§ The choice of the base points have a significant effect on the
interpolation error.
§ In order to minimize the interpolation error in the case of evenly-
spaced base points, we can use the Chebyshev interpolation.
§ The Chebyshev polynomial of degree 𝑛 reads as:
𝑇< 𝑥 = cos 𝑛 cos CD 𝑥

§ Despite its appearance, it is a polynomial in 𝑥:


𝑇= 𝑥 = cos 0 cos CD 𝑥 = 1
𝑇D 𝑥 = cos 1 cos CD 𝑥 = 𝑥

27
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Chebyshev interpolation
§ Also note that, if we set 𝑦 = cos CD 𝑥, we have:

𝑇<ED 𝑥 = cos 𝑛 + 1 𝑦 = cos 𝑛𝑦 cos 𝑦 − sin 𝑛𝑦 sin 𝑦


𝑇<CD 𝑥 = cos 𝑛 − 1 𝑦 = cos 𝑛𝑦 cos 𝑦 − sin 𝑛𝑦 sin −𝑦

§ Since sin −𝑦 = − sin 𝑦, we can rewrite the previous set into:

𝑇<ED 𝑥 + 𝑇<CD 𝑥 = 2 cos 𝑛𝑦 cos 𝑦 = 2𝑥𝑇< 𝑥


𝑇<ED 𝑥 = 2𝑥𝑇< 𝑥 − 𝑇<CD 𝑥

28
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Chebyshev interpolation
§ The first Chebyshev polynomials are:

𝑇= 𝑥 = 1
𝑇D 𝑥 = 𝑥
𝑇N 𝑥 = 2𝑥 N − 1
𝑇O 𝑥 = 4𝑥 O − 3𝑥

29
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Cubic splines
§ So far, we have used polynomials of degree 𝑛 to interpolate 𝑛 +
1 points.
§ However, another perspective is to use several low-degree
polynomials to pass through the base points, in a total of 𝑛 − 1
segments.

y y

(Linear spline) x (Cubic spline) x


30
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Cubic splines
§ Let us consider a cubic spline 𝑆 𝑥 through the data points
𝑥= , 𝑦= , 𝑥D , 𝑦D , … , 𝑥< , 𝑦< :

𝑆= 𝑥 = 𝑦= + 𝑏= 𝑥 − 𝑥= + 𝑐= 𝑥 − 𝑥= N + 𝑑= 𝑥 − 𝑥= O on 𝑥= , 𝑥D
𝑆D 𝑥 = 𝑦D + 𝑏D 𝑥 − 𝑥D + 𝑐D 𝑥 − 𝑥D N + 𝑑D 𝑥 − 𝑥D O on 𝑥D , 𝑥N

N O
𝑆<CD 𝑥 = 𝑦<CD + 𝑏<CD 𝑥 − 𝑥<CD + 𝑐<CD 𝑥 − 𝑥<CD + 𝑑<CD 𝑥 − 𝑥<CD on
𝑥<CD , 𝑥<

§ Any given cubic polynomial 𝑆5 𝑥 has the following properties:


§ Interpolation of data points: 𝑆5 𝑥5 = 𝑦5 and 𝑆5 𝑥5ED = 𝑦5ED
§ Same slope at shared points: 𝑆′5 𝑥5 = 𝑆′5ED 𝑥5
§ Same quadrature at shared points: 𝑆′′5 𝑥5 = 𝑆′′5ED 𝑥5
31
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Cubic splines
§ Thus, constructing a cubic spline 𝑆 𝑥 from a set of data points
requires finding the coefficients 𝑏5 , 𝑐5 , and 𝑑5 in:

𝑆5 𝑥 = 𝑦5 + 𝑏5 𝑥 − 𝑥5 + 𝑐5 𝑥 − 𝑥5 N + 𝑑5 𝑥 − 𝑥5 O on 𝑥5 , 𝑥5ED
§ This makes a total of 𝟑𝒏 − 𝟑 unknowns, that must be solved by
enforcing the following restrictions:
§ 𝑆5 𝑥5 = 𝑦5 and 𝑆5 𝑥5ED = 𝑦5ED
§ 𝑆′5 𝑥5 = 𝑆′5ED 𝑥5
§ 𝑆′′5 𝑥5 = 𝑆′′5ED 𝑥5
§ In total, 𝟑𝒏 − 𝟓 constraints, thus the problem is underdetermined.
§ This is solved by adding two more restrictions: 𝑆′′= 𝑥= = 0 and
𝑆′′<CD 𝑥< = 0, becoming the so-called natural spline.
32
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Cubic splines
§ Instead of solving the equations by hand, with some algebra, we are able to write
the problem in the following matrix form:
0
1 0 0 𝑐= ∆D ∆=
𝑐D 3 −
𝛿= 2𝛿= + 2𝛿D 𝛿D ⋱ 𝛿D 𝛿=
0 𝛿D 2𝛿D + 2𝛿N 𝛿N
⋮ =
⋱ ⋱ ⋱ ⋱ ⋮
𝛿<CD 2𝛿<CD + 2𝛿< 𝛿< ∆<CD ∆<CN
𝑐 3 −
0 0 1 <CD 𝛿 <CD 𝛿<CN
0
with 𝛿5 = 𝑥5ED − 𝑥5 and ∆5 = 𝑦5ED − 𝑦5

33
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Cubic splines
Algorithm

Given 𝑥 = 𝑥= , … , 𝑥<ED where 𝑥= < 𝑥D < ⋯ < 𝑥<ED and 𝑦 = 𝑦= , … , 𝑦<ED

for 𝑖 = 0, … , 𝑛
𝑎5 = 𝑦5
𝛿5 = 𝑥5ED − 𝑥5
∆5 = 𝑦5ED − 𝑦5
end

Solve the matrix system in the previous slide for 𝑐

for 𝑖 = 0, … , 𝑛
}~•J C}~
𝑑5 =
O€~
∆~ €
𝑏5 = − ~ 2𝑐5 + 𝑐5ED
€~ O
end

34
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Practice 2 – NACA Airfoil


§ NACA airfoils are airfoil shapes for aircraft wings developed by the National Advisory
Committee for Aeronautics (NACA) –superseded by NASA
§ For symmetrical shapes, class NACA 00XX (where XX is the percentage of thickness to
chord), the camber envelope is:

𝑥 𝑥 𝑥 N 𝑥 O 𝑥 „
𝑦• = 5𝑡 0.2969 − 0.1260 − 0.3516 + 0.2843 − 0.1015
𝑐 𝑐 𝑐 𝑐 𝑐
where 𝑐 is the chord, 𝑥 is the position, 𝑦• is half the thickness and 𝑡 the maximum thickness.

35
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Practice 2 – NACA Airfoil


§ Consider the following base points for a NACA 0010 profile:
§ xc1=[0 0.1 0.25 0.5 0.75 0.9 1.0];
§ yt1=[0 0.0390 0.0495 0.0441 0.0263 0.0121 0.0010];

1. Plot the base points.


2. Provide a camber profile using linear interpolation.
3. Provide a camber profile using cubic splines and compare.
4. Plot the NACA0010 exact profile and compare with the
previous two.
5. Explain the differences, if any.
36
Escuela Técnica Superior de Ingeniería Numerical Methods in
Universidad Loyola Andalucía Engineering

Lesson check
§ Interpolation: what is and what is it used for?
§ Lagrange polynomial basis
§ Newton’s divided difference
§ Approximation of functions and associated error
§ Hermite polynomial basis
§ Piecewise interpolation: cubic splines

37

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