x_1

x_2

f(x_2)

f(x_1)

Δx

Δy

m = 1.6 (slider from -5 to 5)
f(x) = (m * x)
x_1 = 1 (slider from 0 to 5)
x_2 = 3 (slider from 0 to 5)
A: (x_1, 0)
B: (x_2, 0)
g = OrthogonalLine(A, xAxis)
h = OrthogonalLine(B, xAxis)
P_1 = Intersect(f, g)
P_2 = Intersect(f, h)
i = OrthogonalLine(P_1, h)
E = Intersect(i, h)
j = OrthogonalLine(P_2, yAxis)
F = Intersect(j, yAxis)
G = Intersect(i, yAxis)
d1, p_2, p_1, e = Polygon(P_1, E, P_2)
Text1: "m = \frac{Δy}{Δx}=\frac{f(x_2)-f(x_1)}{x_2-x_1}=" + (LaTeX[m]) + ""