$ 對數內插求值$

$ log $

1

$ . $

3

2

4

$y$

$ y \;實際值$

$ y\;內插值 $

$ f(x)=log\;x $

y

f(x) = lg(x)
a = 4 (slider from 0 to 9, step 1)
b = 6 (slider from 0 to 9, step 1)
c = 3 (slider from 0 to 9, step 1)
d = 4 (slider from 0 to 9, step 1)
n: a + (0.1 * b) + (0.01 * c) + (0.001 * d)
iB1 = Textfield(a)
iB3 = Textfield(c)
iB2 = Textfield(b)
iB4 = Textfield(d)
Q: (n, 0)
P: (n, f(n))
u = Vector(P, Q)
R: (0, y(P))
v = Vector(P, R)
text4: "$ " + (LaTeX[n]) + " $"
n_2: (0.01 * floor((100 * n)))
n_1: (0.01 * ceil((100 * n)))
t4: "$ ⇒log\;" + (LaTeX[n]) + "=" + (LaTeX[lg(n)]) + " $"
Q_2: (0.38 * Corner[2]) + (0.62 * Corner[1])
s = 0 (slider from 0 to 8, step 1)
Q_3: (x(Q_2), y(Corner[3]))
A = Point(Segment[(4.5, 0), (7.5, 0)])
poly2, a_2, a_3, a_4, a_5 = Polygon(Q_2 + (0.05, 0), Corner[2], Corner[3], Q_3 + (0.05, 0))
u_1 = Vector((x(Q_2) + 0.05, 0), (x(Corner[2]), 0))
v_1 = Vector((0, y(Q_2)), (0, y(Corner[3])))
g(x) = lg(x)
t = 1 (slider from 0 to 4, step 1)
A_2: A + ((500 * (n_1 - n)), 0)
A_1: A - ((500 * (n - n_2)), 0)
g_1 = Function(g, x(A_1), x(A_2))
B: (x(A), f(x(A)))
B_1: (x(A_1), f(x(A_1)))
B_2: (x(A_2), f(x(A_2)))
C: (0, y(B))
C_1: (0, y(B_1))
C_2: (0, y(B_2))
v_2 = Vector(B, C)
b_1 = Segment(B_2, A_2)
b_3 = Segment(B_1, A_1)
b_4 = Segment(B_1, C_1)
b_2 = Segment(B_2, C_2)
text5: "$ " + (LaTeX[n]) + " $"
text7: "$ " + (LaTeX[n_2]) + " $"
text8: "$ " + (LaTeX[n_1]) + " $"
text9: "$ " + (LaTeX[lg(n_1)]) + " $"
text10: "$ " + (LaTeX[lg(n_2)]) + " $"
u_2 = Vector(A, B)
u_5 = Segment((x(Q_2) + 0.05, 0), (x(Corner[2]), 0))
v_5 = Segment((0, y(Corner[1])), (0, y(Corner[3])))
e = Segment(B_1, B_2)
h = Segment(B, A)
D = Intersect(e, h)
D_2: (0, y(D))
w = Vector(D, D_2)
g_2 = Function(g_1, x(A_1), x(A_2))
E_1: (x(A_2), y(B_1))
poly3, b_5, b_6, e_1 = Polygon(B_1, E_1, B_2)
E_2: (x(A), y(E_1))
E_3: (x(B), y(E_2))
poly4, i, j, k = Polygon(E_3, D, B_1)
z = Vector(A, D)
t3: "$ ⇒y≈ " + (LaTeX[f(n_2)]) + "+" + (LaTeX[((n - n_2) * ((1.0E-4 * (round((10000 * f(n_1))) - round((10000 * f(n_2)))))) / (n_1 - n_2))]) + "$"
t_Q: "$已知log" + (LaTeX[a]) + "." + (LaTeX[b]) + "" + (LaTeX[c]) + "=" + (LaTeX[lg(a + (0.1 * b) + (0.01 * c))]) + ",$
$log" + (LaTeX[((100 * a) + (10 * b) + c + 1) / 100]) + "=" + (LaTeX[lg(a + (0.1 * b) + (0.01 * (1 + c)))]) + ",試以對數的$
$內插法求log\;" + (LaTeX[a]) + "." + (LaTeX[b]) + "" + (LaTeX[c]) + "" + (LaTeX[d]) + " 之值$"
t1_1: "$ \frac{y-\fgcolor{255,153,204}{" + (LaTeX[f(n_2)]) + "}}\fgcolor{yellow}{{" + (LaTeX[f(n_1)]) + "-" + (LaTeX[f(n_2)]) + "}} =\bgcolor{yellow}{\frac{" + (LaTeX[n]) + "-" + (LaTeX[n_2]) + "}{" + (LaTeX[n_1]) + "-" + (LaTeX[n_2]) + "}}$"
t2: "$ ⇒y=\fgcolor{255,153,204}{ " + (LaTeX[f(n_2)]) + "}+\bgcolor{yellow}{\frac{" + (LaTeX[n - n_2]) + "}{" + (LaTeX[n_1 - n_2]) + "}}\times \fgcolor{yellow}{" + (LaTeX[(1.0E-4 * (round((10000 * f(n_1))) - round((10000 * f(n_2)))))]) + "}$"