09/11/25
Lectures on NumericalMethods 2
Interpolation Problem
– In general the function is known only for a few points or provided as a
table.
– Example: A log table only mentions following values.
x 1 1.5 2 3 3.5 4
Log(x) 0.0 0.17609 0.30103 0.47712 0.54407 0.60206
– The problem is to find log(2.5). We may use a straight line interpolation
between points 2 and 3.
– The straight line interpolation may be extended to a polynomial, since the
straight line uses only two datapoints, when we have several data points
available with us.
– We will find a polynomial which passes through all these points.
3.
09/11/25
Lectures on NumericalMethods 3
Polynomials
Forms of Polynomials
)
(
)
(
)
)(
(
)
(
)
(
)
(
)
(
1
2
1
2
1
1
0
2
2
1
0
2
2
1
0
n
n
n
n
n
n
c
x
c
x
a
c
x
c
x
a
c
x
a
a
P(x)
c
x
a
c
x
a
c
x
a
a
P(x)
x
a
x
a
x
a
a
P(x)
form
s
Newton'
polynomial
a
form
power
Shifted
Polynomial
a
of
form
Power
4.
09/11/25
Lectures on NumericalMethods 4
Polynomials
• Nested Multiplication Algorithm
– Want to evaluate a polynomial P(x) given in Newton form, at x = z.
–
1. bn = an
2. For i = n – 1 to 0 step –1
3. bi = ai + ( z – ci+1 )* bi+1
4. Print the answer P(z) = b0.
–
)
(
)
(
)
)(
(
)
( 1
2
1
2
1
1
0 n
n c
x
c
x
a
c
x
c
x
a
c
x
a
a
P(x)
)
(
)
(
)
)(
(
)
( 1
1
2
1
0
n
n c
x
z
x
b
c
x
z
x
b
z
x
b
b
P(x)
5.
09/11/25
Lectures on NumericalMethods 5
Polynomials
• Nested Multiplication Algorithm Example
2
0
1
2
3
3
2
1
3
2
1
0
3
2
)
1
(
)
1
(
2
)
1
(
3
4
)
(
4
,
3
,
2
,
1
,
1
0
1
1
x
x
x
x
x
x
P
b
b
b
b
x
c
c
c
a
a
a
a
x
x
x
P(x)
and
get
We
for
algorithm
the
applying
After
And
Then
6.
09/11/25
Lectures on NumericalMethods 6
Polynomials
– To interpolate a function (unknown) whose values at n+1 distinct points
are known, we will use a polynomial of degree <= n.
• Uniqueness
– If two polynomials P(x) and Q(x) of degrees less than or equal to k agree
at k+1 distinct points, then P(x) and Q(x) are identical.
• Existence
– Lagranges polynomial given below is the proof of existence.
n
k
n
k
i
i
k
i
k
i
k
k
f
x
x
x
x
P(x)
x
f
f
0 0
Let
7.
09/11/25
Lectures on NumericalMethods 7
Lagrange’s Polynomial
• Algorithm
– The data is given as ( xi , fi ). To calculate p(x)
1. p = 0
2. For i = 1 to n
3. t = 1
4. For j = 0 to n
5. If j i then
6. t = t * ( x – xi ) / ( xi – xj )
7. p = p + t * fi
8. P is the required value of p(x)
8.
09/11/25
Lectures on NumericalMethods 8
Method of Divided Differences
)
(
)
(
)
)(
(
)
(
.
.
,...,
1
,
0
,
1
0
,
0
1
0
2
,
0
0
1
,
0
0
,
0
,
1
,
,
1
,
n
n
i
i
i
i
k
k
i
k
i
k
i
i
i
x
x
x
x
f
x
x
x
x
f
x
x
f
f
P(x)
f
f
i
k
x
x
f
f
f
n
i
f
x
is
then
polynomal,
ing
interpolat
The
and
Define
is
set
data
The
9.
09/11/25
Lectures on NumericalMethods 9
Method of Divided Differences
• Table
3
,
3
3
3
,
2
2
,
2
2
3
,
1
2
,
1
1
,
1
1
3
,
0
2
,
0
1
,
0
0
,
0
0
3
2
1
0
f
x
f
f
x
f
f
f
x
f
f
f
f
x
x
10.
09/11/25
Lectures on NumericalMethods 10
Method of Divided Differences
• Algorithm
– To create the table of divided differences.
1. For i = 1 to n
2. di,0 = fi
3. For i = 1 to n
4. For j = 1 to n-i
5. dj,i = (dj+1,i-1 – dj,i-1 ) / (xj+i – xj)
6. D would be required table
Editor's Notes
#1 Frequently, presenters must deliver material of a technical nature to an audience unfamiliar with the topic or vocabulary. The material may be complex or heavy with detail. To present technical material effectively, use the following guidelines from Dale Carnegie Training®.
Consider the amount of time available and prepare to organize your material. Narrow your topic. Divide your presentation into clear segments. Follow a logical progression. Maintain your focus throughout. Close the presentation with a summary, repetition of the key steps, or a logical conclusion.
Keep your audience in mind at all times. For example, be sure data is clear and information is relevant. Keep the level of detail and vocabulary appropriate for the audience. Use visuals to support key points or steps. Keep alert to the needs of your listeners, and you will have a more receptive audience.
#2 In your opening, establish the relevancy of the topic to the audience. Give a brief preview of the presentation and establish value for the listeners. Take into account your audience’s interest and expertise in the topic when choosing your vocabulary, examples, and illustrations. Focus on the importance of the topic to your audience, and you will have more attentive listeners.
#3 If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience.
#4 If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience.
#5 If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience.
#6 If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience.
#7 If you have several points, steps, or key ideas use multiple slides. Determine if your audience is to understand a new idea, learn a process, or receive greater depth to a familiar concept. Back up each point with adequate explanation. As appropriate, supplement your presentation with technical support data in hard copy or on disc, e-mail, or the Internet. Develop each point adequately to communicate with your audience.
#8 Determine the best close for your audience and your presentation. Close with a summary; offer options; recommend a strategy; suggest a plan; set a goal. Keep your focus throughout your presentation, and you will more likely achieve your purpose.
#9 Determine the best close for your audience and your presentation. Close with a summary; offer options; recommend a strategy; suggest a plan; set a goal. Keep your focus throughout your presentation, and you will more likely achieve your purpose.
#10 Determine the best close for your audience and your presentation. Close with a summary; offer options; recommend a strategy; suggest a plan; set a goal. Keep your focus throughout your presentation, and you will more likely achieve your purpose.