$xPx$

x

f(x)=

xMin

xMax

dx

xmax = 10 (slider from -5 to 10)
xmin = 0 (slider from -5 to 5)
f(x) = x
dx = 1 (slider from -5 to 5)
W = Sequence(f(i), i, xmin, xmax, dx)
H = Sequence(If[Element[W, i] ∈ {Infinity, -Infinity}, NaN, Element[W, i]], i, 1, Length[W])
W2 = RemoveUndefined(H)
ymin0 = Min(W2)
ymax0 = Max(W2)
bMax = Max({abs(ymax0), abs(ymin0)})
a = 3
WT = Sequence({i, If[f(i) ∈ {Infinity, -Infinity}, NaN, f(i)]}, i, xmin, xmax, dx)
Px: (a | 0)
P: (a | f(a))
Py: (0 | f(a))
g = Segment(Px, P)
Text3: "" + (x(Px)) + ""
Text4: "" + (y(Py)) + ""
pos = If(a < 0, ((xmax - xmin) / 15 | 0), Vector[(-((xmin - xmax) / 100 | 0))])
WText = Insert({{"x", "f(x)"}}, WT, 1)
Text2 = TableText(WText, "v|_ll")
b = 3 (slider from xmin to xmax, step dx)
ma = 1 (slider from -5 to 5)
ymax = If(ymax0 < 0, bMax / 10, ymax0 + bMax / 10)
ymin = If(ymin0 > 0, ((-bMax)) / 10, ymin0 - bMax / 10)
Eingabefeld1 = Textfield(f)
Eingabefeld2 = Textfield(xmin)
Eingabefeld3 = Textfield(xmax)
Eingabefeld4 = Textfield(dx)
W1: {}
fb = If(f(b) ∈ {Infinity, -Infinity}, NaN, f(b))
Text1: "f: " + (LaTeX[b]) + " \rightarrow " + (LaTeX[fb]) + ""
u = Vector((0 | 0), Px)