對數內插求值
Author: 藍邦偉  老師

$ O $

$ f(x)=log\;x $

$ x $

$ 對數內插求值 $
$已知：\;log2=0.3010$
$log3=0.4771,log7=0.8451$

set1

$ 1：\;1 $

$ 放大\;y\;軸單位長$

1

$ 局部放大 $

$x$

v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
O = (0, 0)
Q_2: 0.72 * Corner[1] + 0.28 * Corner[2]
Q_3: (x(Q_2), y(Corner[4]))
poly1, q_1, q_2, q_4, q_3 = Polygon(Corner[1], Q_2, Q_3, Corner[4])
f(x) = log(10, x)
A = Point(Segment[(1, 0), (10, 0)])
List_1 = Sequence((k, f(k)), k, 1, 10)
List_2 = Sequence(Segment[Element[List_1, k], (k, 0)], k, 1, 10, 1)
List_3 = Sequence(Segment[(0, lg(k)), Element[List_1, k]], k, 1, 10)
B: (x(A), f(x(A)))
a_1 = Segment(B, A)
C: (0, y(B))
b = Segment(C, B)
text2: "$ " + (LaTeX[y(C)]) + " $"
Question: "$ log\;x=" + (LaTeX[y(C)]) + " ,\;x=?$
$Sol：$"
c = false
d = true
List_4: {0, 0.301, 0.4771, 0.602, 0.699, 0.7781, 0.8451, 0.903, 0.9542, 1}
Sol1: "$∵ " + (LaTeX[Element[List_4, floor(x(A))]]) + "" + (LaTeX[If[Mod[floor(x(A)), 3] ≟ 2, "0"]]) + "" + (LaTeX[If[floor(x(A)) ≟ 4, "0"]]) + "≤" + (LaTeX[y(C)]) + "≤" + (LaTeX[Element[List_4, floor(x(A) + 1)]]) + " " + (LaTeX[If[Mod[floor(x(A)), 3] ≟ 1, "0"]]) + "" + (LaTeX[If[floor(x(A)) ≟ 3, "0"]]) + "$
$⇒log\;" + (LaTeX[floor(x(A))]) + "≤log\;x≤log\;" + (LaTeX[floor(x(A)) + 1]) + "$"
Ans: "$⇒ \frac{x-" + (LaTeX[floor(x(A))]) + "}{" + (LaTeX[floor(x(A)) + 1]) + "-" + (LaTeX[floor(x(A))]) + "}=\frac{" + (LaTeX[y(C)]) + "-" + (LaTeX[Element[List_4, floor(x(A))]]) + "" + (LaTeX[If[Mod[floor(x(A)), 3] ≟ 2, "0"]]) + "" + (LaTeX[If[floor(x(A)) ≟ 4, "0"]]) + "}{" + (LaTeX[Element[List_4, floor(x(A) + 1)]]) + "" + (LaTeX[If[Mod[floor(x(A)), 3] ≟ 1, "0"]]) + "" + (LaTeX[If[floor(x(A)) ≟ 3, "0"]]) + "-" + (LaTeX[Element[List_4, floor(x(A))]]) + "" + (LaTeX[If[Mod[floor(x(A)), 3] ≟ 2, "0"]]) + "" + (LaTeX[If[floor(x(A)) ≟ 4, "0"]]) + "} $
$⇒x=" + (LaTeX[floor(x(A))]) + "+\frac{" + (LaTeX[y(C) - Element[List_4, floor(x(A))]]) + "}{" + (LaTeX[Element[List_4, floor(x(A) + 1)] - Element[List_4, floor(x(A))]]) + "}×1$
$\;\;\;\;\;\;\;≈" + (LaTeX[x(A)]) + "$
$∴log" + (LaTeX[x(A)]) + "≈" + (LaTeX[y(C)]) + "$"
a = false
Poly3, e, g, h, i = Polygon(Q_2 + (0.03, 0), Corner[2], Corner[3], Q_3 + (0.03, 0))
u = Vector((x(Q_2), 0), (x(Corner[3]), 0))
f_a(x) = 8 * log(10, x)
D = (0.2997522266369821, 0.1754442400677871)
u_1 = Vector((x(Q_2) + 0.05, y(D)), (x(Corner[3]), y(D)))
E = Point(u_1)
F: E + (3.5, 0)
f_b = Function(8 * log(10, x), x(E), x(F))
E_1: (x(E), f_a(x(E)))
F_1: (x(F), f_a(x(F)))
e_1 = Segment(E, E_1)
e_2 = Segment(F, F_1)
e_3 = Segment(E_1, F_1)
P_3 = Point(Segment[E, F])
P_4: (x(P_3), f_a(x(P_3)))
j = Segment(P_4, P_3)
G = Intersect(e_3, j)
k = Segment(P_4, P_3)
v_1 = Vector((x(D), y(Corner[2])), (x(D), y(Corner[4])))
t_{31}: "$ " + (LaTeX[floor(x(A))]) + " $"
t_{32}: "$ " + (LaTeX[floor(x(A) + 1)]) + " $"
E_2: (x(D), y(E_1))
F_2: (x(D), y(F_1))
G_2: (x(D), y(G))
G_P: (x(D), y(P_4))
e_4 = Segment(F_1, F_2)
e_5 = Segment(E_1, E_2)
e_6 = Segment(G, G_2)
e_7 = Segment(P_4, G_P)