-
- Consider f(x) = e^x.
Give the Newton form of the polynomial interpolating
through the points (1,e^1), (10,e^(10)), (100,e^(100)).
- What is the relationship between the divided differences
and derivatives? (Hint: think about Taylor.)
-
1 e
e^10 - e e^100-e e^10-e
-------- ------- - ------
10 - 1 99 9
10 e^10 -----------------
e^100 - e 90
---------
100 - 1
100 e^100
e^10-e 9*(e^100-e)-99*(e^10-e)
p(x) = e + ------*(x-1) + -----------------------*(x-1)*(x-2)
9 99*9*90
-
p(x) = f(x0) + f[x0,x1]*(x-x0) + f[x0,x1,x2]*(x-x0)*(x-x1) + ...
f(x0+h) = f(x0) + f'(x0)*h + f"(x0)*h^2/2 + ...
in the limit, as all points move to x0, we have
1 d f
f[x0,x0,..,x0] = --- * --- (x0)
n! d x
+--------+
| /20 |
+--------+
- Consider the quotient
2 2
12 + 6 b x + b x
q = ------------------
2 2
12 - 6 b x + b x
for some constant b.
Compute a continued fraction representation of q.
b^2*x^2 + 6*b*x + 12 | b^2*x^2 - 6*b*x + 12
-( b^2*x^2 - 6*b*x + 12 ) |-----------------------
------------------------- | 1
12*b*x
12*b*x 12
q = 1 + -------------------- = 1 + ------------------------
b^2*x^2 - 6*b*x + 12 b^2*x^2 - 6*b*x + 12
--------------------
b*x
b^2*x^2 - 6*b*x + 12 | b*x
-( b^2*x^2 ) |--------
------------- | b*x - 6
- 6*b*x
- (- 6*b*x )
------------
12
12
q = 1 + -------------
b*x - 6 + 12
---
b*x
+--------+
| /20 |
+--------+
- For approximating the integral of f(x) over [a,b],
derive the formula for the composite trapezoidal rule:
n-1
h --- b-a
T(h) = -(f(a) + f(b)) + h > f(a+kh), h = ---
2 --- n
k=1
Applying the trapezoidal rule n times on intervals [x(k),x(k+1)]:
n-1
--- h ( )
T(h) = > --- ( f( x(k) ) + f( x(k+1) ) )
--- 2 ( )
k=0
n-1
h --- h
= --- f(x(0)) + h > f(x(k)) + --- f(x(n))
2 --- 2
k=1
where x(k) = a + k*h, k = 0,1,..,n.
+--------+
| /15 |
+--------+
- Consider the values in the table below:
+----------------------------------------------------------------------------------------------+
| x | 2.00000 | 2.12500 | 2.25000 | 2.37500 | 2.50000 | 2.62500 | 2.75000 | 2.87500 | 3.00000 |
+----------------------------------------------------------------------------------------------+
|f(x)| 7.38906 | 8.37290 | 9.48773 | 10.7510 | 12.1825 | 13.8046 | 15.6426 | 17.7254 | 20.0855 |
+----------------------------------------------------------------------------------------------+
Perform all your calculations with six significant decimal places.
- To approximate f'(2.0), compute
forward differences Delta f(2.0,h),
for h=1,.5,.25,.125.
- Apply extrapolation using the values for Delta f(2.0,h).
- How accurate is your final approximation for f'(2.0)?
-
f(3) - f(2)
Delta f(2.0,1) = ----------- = 12.6944
1
f(2.5) - f(2)
Delta f(2.0,0.5) = ------------- = 9.58688
.5
f(2.25) - f(2)
Delta f(2.0,0.25) = -------------- = 8.39468
.25
f(2.125) - f(2)
Delta f(2.0,0.125) = --------------- = 7.87072
.125
-
12.6944
6.47936
9.58688 7.44352
7.20248 7.38710
8.39468 7.39485
7.34676
7.87072
-
O(h^4) = (.125)^4 = 2.4E-4
About 3 decimal places are correct, as can be seen from comparing
the corresponding digits in the last two approximations.
+--------+
| /30 |
+--------+
- Consider the quadrature rule
h
/
| f(x) dx = w0 f(0) + w1 f(h/3) + w2 f(2h/3) + w3 f(h), h > 0.
/
0
- Set up the system of equations in the weights w0, w1,
w2, and w3 to be satisfied for the
highest possible algebraic degree of accuracy.
Do NOT solve this system.
- What is the algebraic degree of accuracy attained by this rule?
-
h
/
f=1: | 1 dx = h = w0 + w1 + w2 + w3
/
0
h
/
f=x: | x dx = h^2/2 = w0*0 + w1*h/3 + w2*2h/3 + w3*h
/
0
h
/
f=x^2: | x^2 dx = h^3/3 = w0*0^2 + w1*(h/3)^2 + w2*(2h/3)^2 + w3*h^2
/
0
h
/
f=x^3: | x^3 dx = h^4/4 = w0*0^3 + w1*(h/3)^3 + w2*(2h/3)^3 + w3*h^3
/
0
- The algebraic degree of accuracy of this rule is three.
+--------+
| /15 |
+--------+