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

$ O $

$ f(x)=log\;x $

$ x $

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

set1

$ 1：\;1 $

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

1

$ 局部放大 $

$x$

$ x的實際值 $

2

$ 先備知識 $

$ 已知：\;log\;2=0.3010,\;log3=0.4771,\;log7=0.8451,\; 則：$

$ log\;4=log\;2^2=2\;log\;2=2×0.3010=0.6020 $

$ log\;5=log\frac{10}{2}=log\;10-log\;2=1-0.3010=0.6990 $

$ log\;6=log(2×3) =log\;2+log\;3=0.3010+0.4771=0.7781$

$ log\;8=log\;2^3=3\;log\;2=3×0.3010=0.9030 $

$ log\;9=log\;3^2=2\;log\;3=2×0.4771=0.9542 $

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 = false
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 + (4, 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)
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))
e_4 = Segment(F_1, F_2)
e_5 = Segment(E_1, E_2)
e_6 = Segment(G, G_2)
t_1: "$ " + (LaTeX[Element[List_4, floor(x(A))]]) + " " + (LaTeX[If[Mod[floor(x(A)), 3] ≟ 2, "0"]]) + "" + (LaTeX[If[floor(x(A)) ≟ 4, "0"]]) + "$"
t_2: "$ " + (LaTeX[Element[List_4, floor(x(A)) + 1]]) + "" + (LaTeX[If[Mod[floor(x(A)), 3] ≟ 1, "0"]]) + "" + (LaTeX[If[floor(x(A)) ≟ 3, "0"]]) + "$"
t_3: "$ " + (LaTeX[y(C)]) + " $"
H = Intersect(f_b, e_6, (3.778908251001719, 4.618930781660781))
H_1: (x(H), y(D))
e_7 = Segment(H, H_1)
e_8 = Segment(P_4, P_3)
P_5: (x(D), y(P_4))
e_9 = Segment(P_4, P_5)
z = Vector(H_1, H_1 - (0, 0.7))
k = true
R = (-0.6742504432411709, 6.859776288251186)
n = 0 (slider from 0 to 5, step 1)
B_1 = Point(q_2)
B_2: B_1 - (0, 6)
B_3: (x(Corner[1]), y(B_2))
B_4: (x(B_3), y(B_1))
Poly2, b_1, b_2, b_3, b_4 = Polygon(B_1, B_2, B_3, B_4)