x_0

x_0 + h

Tangente an f durch P

Sekante durch P und Q

f(x_0+h)-f(x_0)

h

Steigungsdreieck anzeigen

a = -6.01 (slider from -12 to 7, step 0.01)
b = 2.68 (slider from -12 to 7, step 0.01)
A = (-10, 1)
B = (-7, 3.5)
C = (-4.5, 1.5)
D = (-1.5, 1)
E = (1.5, 2)
F = (4.5, -1)
G = (7, 4)
f = Polynomial({A, B, C, D, E, F, G})
P: (a, f(a))
Q: (b, f(b))
c = Tangent(P, f)
d = Line(P, Q)
e = false
g = false
h: b - a
i: f(b) - f(a)
Text1: "Horizontaler Abstand zwischen P und Q: h = " + h + ""
Text2: "Vertikaler Abstand zwischen P und Q: f(x_0+h) - f(x_0) = " + i + ""
s: (f(b) - f(a)) / (b - a)
Text3: "Sekantensteigung: m = " + s + ""
z = Derivative(f)
r: z(a)
Text4: "Tangentensteigung: f'(x_0) = " + r + ""
H: (a, f(b))
Vieleck1, q, p, h_1 = Polygon(P, H, Q)
α = Angle(Q, H, P)
j = false