0 0
(1.5-0)0 - (1.5-0)1
------------------- = 1.5
0 - 1 (1.5-2)1.5 - (1.5-0)2
1 1 --------------------- = 1.875
(1.5-2)1 - (1.5-1)2 0 - 2
------------------- = 2
1 - 2
2 3
(x(k)-x(j))*p[i,..,j-1](x(k)) - (x(k)-x(i))*p[i+1,..,j](x(k))
p[i,..,j](x(k)) = -------------------------------------------------------------
x(i) - x(j)
for k=i,..,j.
(x(i)-x(j))
for k=i: p[i,..,j](x(i)) = ----------- p[i,..,j-1](x(i)) = f(i)
(x(i)-x(j)) (induction)
for k=j: similar
for k, i < k < j:
(x(k)-x(j))f(k) - (x(k)-x(i))f(k)
p[i,..,j](x(k)) = --------------------------------- = f(k)
x(i) - x(j)
+--------+
| /20 |
+--------+
1 2 1 4 1 6 5 8 7 10 / 12\
1 - - x - - x - -- x - --- x - --- x + O\x /
2 8 16 128 256
Set up the system of linear equations which must be solved
to construct a Pade approximation of f as a quotient of
two quadrics.
a(x) a0 + a1*x + a2*x^2
q = ---- = ------------------ p = 1 + 0*x - x^2/2 + 0*x^3 - x^4/8
b(x) b0 + b1*x + b2*x^2
5 unknowns 5 given coefficients
a(x) - b(x)*p(x) = 0
(a0 + a1*x + a2*x^2) - (1+b1*x+b2*x^2)*(1+0*x-x^2/2+0*x^3-x^4/8) = 0
1 : a0 - 1 = 0
x : a1 - b1 = 0
x^2 : a2 - b2 + 1/2 = 0
x^3 : 1/2*b1 = 0
x^4 : 1/8 + 1/2*b2 = 0
+--------+
| /20 |
+--------+
f(x0+h) = f(x0) + h*f'(x0) + h^2*f'(x0)/2! + O(h^3)
f(x0+h) - f(x0)
Delta f(x0,h) = --------------- = f'(x0) + C1*h + O(h^2)
h
Delta f(x0,r*h) = f'(x0) + C1*r*h + O(h^2)
r*Delta f(x0,h) - Delta f(x0,h) = (r-1)*f'(x0) + O(h^2)
Delta f(x0,h)*r - Delta f(x0,h*r)
Delta f(x0,h,r*h) = ---------------------------------
r - 1
= f'(x0) + O(h^2)
+--------+
| /15 |
+--------+
+-----------------------------------------------------------------------------------------------+ | x | 0.00000 | .125000 | .250000 | .375000 | .500000 | .625000 | .750000 | .875000 | 1.00000 | +-----------------------------------------------------------------------------------------------+ |f(x) | 0.00000 | .382683 | .707107 | .923880 | 1.00000 | .923880 | .707107 | .382683 | 0.00000 | +-----------------------------------------------------------------------------------------------+Perform all your calculations with six significant decimal places.
f(0.5+0.5) - f(0.5-0.5)
delta f(0.5,0.5) = ----------------------- = 0
1
f(0.5+0.25) - f(0.5-0.25)
delta f(0.5,0.25) = ------------------------- = 0
0.5
f(0.5+0.125) - f(0.5-0.125)
delta f(0.5,0.125) = --------------------------- = 0
0.25
delta f(0.5,0.5)
delta f(0.5,0.5,0.25)
delta f(0.5,0.5)*.25 - delta f(0.5,0.25)
= ---------------------------------------- = 0
.25 - 1
delta f(0.5,0.25)
delta f(0.5,0.25,0.125)
delta f(0.5,0.25)*.25 - delta f(0.5,0.125)
= ------------------------------------------ = 0
.25 - 1
delta f(0.5,0.125)
The last extrapolation is
delta f(0.5,0.5,0.25)*1/16 - delta f(0.5,0.25,0.125)
---------------------------------------------------- = 0
1/16 - 1
Because of the symmetry in the data, extrapolation does not improve the answers. The error is expected to be O(h^6), with h = .125, we may expect 6 correct decimal places, as (.125)^6 = 3.8E-6.
+--------+
| /30 |
+--------+
+h
/
| f(x) dx = w0 f(x0) + w1 f(x1), for h > 0.
/
-h
Set up the system of equations in the weights w0, w1
and nodes x0, x1 to be satisfied for the
highest possible algebraic degree of accuracy.
+h
/
f=1 : | 1 dx = 2*h = w0 + w1
/
-h
+h
/
f=x : | x dx = 0 = w0*x0 + w1*x1
/
-h
+h
/
f=x^2 : | x^2 dx = 2*h^3/3 = w0*x0^2 + w1*x1^2
/
-h
+h
/
f=x^3 : | x^3 dx = 0 = w0*x0^3 + w1*x1^3
/
-h
Since the rule integrates the basis functions 1, x, x^2, x^3 exactly, and since the integral operator is linear, every cubic polynomial is integrated exactly. Thus the algebraic degree of accuracy equals 3.
+--------+
| /15 |
+--------+