Date: 12 September 2013

x

n

(x_0,x_1)=%v

x_1=%y

(x_1,x_2)=%v

x_2=%y

x_1=%x

x_0=%x

(x_2,x_3)=%v

x_2=%x

x_3=%y

n_{points}=%v

E5_sub = (2.63302752293578, 4.1270207852194)
threshold_de = 0.18439088914585774
a(x) = x
fxmax = 1.0E100
fxmin = -1.0E100
f(x) = (((0.7 * (x - 1)) * (x - 2)) * (x - 4)) + x
g = Function(f, fxmin, fxmax)
xmax = 6
xmin = -1
epoints: {Intersect[g, a, xmin, xmax]}
E4_sub = (1.1651376146788992, 2.478060046189377)
E3_sub = (0.5229357798165137, 2.173210161662818)
E2_sub = (1.8165137614678901, 3.5034642032332566)
E1_sub = (1.2752293577981653, 2.9491916859122407)
ymin = -1
ymax = 5
n_e = 0 (slider from 0 to 5, step 1)
E1found = Sum(Sequence[If[Distance[E1_sub, Element[epoints, i]]  <  threshold_de, i, 0], i, 1, Length[epoints]])
E2found = Sum(Sequence[If[Distance[E2_sub, Element[epoints, i]]  <  threshold_de, i, 0], i, 1, Length[epoints]])
E3found = Sum(Sequence[If[Distance[E3_sub, Element[epoints, i]]  <  threshold_de, i, 0], i, 1, Length[epoints]])
E4found = Sum(Sequence[If[Distance[E4_sub, Element[epoints, i]]  <  threshold_de, i, 0], i, 1, Length[epoints]])
E5found = Sum(Sequence[If[Distance[E5_sub, Element[epoints, i]]  <  threshold_de, i, 0], i, 1, Length[epoints]])
potentialEs: {E1found, E2found, E3found, E4found, E5found}
EsFound = Sequence(Element[potentialEs, i], i, 1, n_e)
show_ne = true
threshold_manual = false
A0 = Point(g)
A0found = false
c = Segment(A0, (x(A0), 0))
d = Segment(A0, (0, y(A0)))
X1a: (0, y(A0))
A1 = Point(g)
e = Segment(A1, (x(A1), 0))
h = Segment(A1, (0, y(A1)))
X2b: (0, y(A1))
A1found = false
X1b = Point(xAxis)
X0a = Point(xAxis)
A2 = Point(g)
j = Segment(A2, (0, y(A2)))
X2c = Point(xAxis)
X3c: (0, y(A2))
A2found = false
A1match: (y(X1a), f(y(X1a)))
A2match: (y(X2b), f(y(X2b)))
i = Segment(A2, (x(A2), 0))
n_points = 0 (slider from 0 to 3, step 1)
x0 = 3
A0match: (x0, f(x0))
b: x = x(A0)
k: x = x(A1)
l: x = x(A2)
m: y = y(A0)
n: y = y(A1)
p: y = y(A2)
E1 = DynamicCoordinates(E1_sub, If[E1found > 0, x(Element[epoints, E1found]), x(E1_sub)], If[E1found > 0, y(Element[epoints, E1found]), y(E1_sub)])
E2 = DynamicCoordinates(E2_sub, If[E2found > 0, x(Element[epoints, E2found]), x(E2_sub)], If[E2found > 0, y(Element[epoints, E2found]), y(E2_sub)])
E3 = DynamicCoordinates(E3_sub, If[E3found > 0, x(Element[epoints, E3found]), x(E3_sub)], If[E3found > 0, y(Element[epoints, E3found]), y(E3_sub)])
E4 = DynamicCoordinates(E4_sub, If[E4found > 0, x(Element[epoints, E4found]), x(E4_sub)], If[E4found > 0, y(Element[epoints, E4found]), y(E4_sub)])
E5 = DynamicCoordinates(E5_sub, If[E5found > 0, x(Element[epoints, E5found]), x(E5_sub)], If[E5found > 0, y(Element[epoints, E5found]), y(E5_sub)])
xA0: x(A0)
xA1: x(A1)
xA2: x(A2)
yA2: y(A2)
yA1: y(A1)
yA0: y(A0)
text1: "" + statevariable + "_0=" + xA0 + ""
text4: "" + statevariable + "_1=" + yA0 + ""
text5: "" + statevariable + "_2=" + yA1 + ""
text6: "" + statevariable + "_3=" + yA2 + ""
text7: "(" + statevariable + "_0," + statevariable + "_1)=" + A0 + ""
text8: "(" + statevariable + "_1,," + statevariable + "_2)=" + A1 + ""
text9: "(" + statevariable + "_2," + statevariable + "_3)=" + A2 + ""
text2: "" + statevariable + "_1=" + xA1 + ""
text3: "" + statevariable + "_2=" + xA2 + ""
xlabeldisplayed: "" + (LaTeX[statevariable]) + "_{" + (LaTeX[timevariable]) + "}"
ylabeldisplayed: "" + (LaTeX[statevariable]) + "_{" + (LaTeX[timevariable]) + "+1}"