p3(x) = If[(0 ≤ x) ∧ (x ≤ 11), 2 + log(x + 1)]
B1 = Segment((0, -5), (0, 6))
A1 = Point(B1)
p2(x) = If[(0 ≤ x) ∧ (x ≤ 11), 1 + abs(x - 5.5) / 5.5]
p1(x) = If[(0 ≤ x) ∧ (x ≤ 7), 2 + sqrt(x), If[(x > 7) ∧ (x ≤ 11), 2 + sqrt(11 - x)]]
lista1: {"Ejemplo1", "Ejemplo2", "Ejemplo 3", "Ejemplo 4"}
índice = SelectedIndex(lista1)
h: 1.1
base = Segment((0, 0), (11, 0))
X = Point(base)
B11 = Segment((11, -5), (11, 6))
Vesq1 = (0, -2)
Vesq2 = Point(Ray[Vesq1 + (0.2, 0), Vesq1 + (1, 0)])
Vesq3 = Point(Ray[Vesq2 + (0, 0.2), Vesq2 + (0, 1)])
alto: y(Vesq3 - Vesq1)
B10 = Segment(Vesq1 + (9 * (h, 0)), Vesq1 + (9 * (h, 0)) + (0, alto))
A10 = Point(B10)
B9 = Segment(Vesq1 + (8 * (h, 0)), Vesq1 + (8 * (h, 0)) + (0, alto))
A9 = Point(B9)
B8 = Segment(Vesq1 + (7 * (h, 0)), Vesq1 + (7 * (h, 0)) + (0, alto))
A8 = Point(B8)
B7 = Segment(Vesq1 + (6 * (h, 0)), Vesq1 + (6 * (h, 0)) + (0, alto))
A7 = Point(B7)
B6 = Segment(Vesq1 + (5 * (h, 0)), Vesq1 + (5 * (h, 0)) + (0, alto))
A6 = Point(B6)
B5 = Segment(Vesq1 + (4 * (h, 0)), Vesq1 + (4 * (h, 0)) + (0, alto))
A5 = Point(B5)
B4 = Segment(Vesq1 + (3 * (h, 0)), Vesq1 + (3 * (h, 0)) + (0, alto))
A4 = Point(B4)
B3 = Segment(Vesq1 + (2 * (h, 0)), Vesq1 + (2 * (h, 0)) + (0, alto))
A3 = Point(B3)
B2 = Segment(Vesq1 + (h, 0), Vesq1 + (h, 0) + (0, alto))
A11: (11, y(A1))
A2 = Point(B2)
p4(x) = If[0 ≤ x ≤ 11, Polynomial[{A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11}]]
hh = If(índice ≟ 1, p1(x(X)), If[índice ≟ 2, p2(x(X)), If[índice ≟ 3, p3(x(X)), p4(x(X))]])
n = 19 (slider from 3 to 20, step 1)
ancho: x(Vesq2 - Vesq1)
L: A1:A11
condición: índice ≟ 4
P: (x(X), hh)
segPX = Segment(P, X)
a = Tangent(P, If[índice ≟ 1, p1, índice ≟ 2, p2, índice ≟ 3, p3, p4])
p1'(x) = p1'(x)
p2'(x) = p2'(x)
p3'(x) = p3'(x)
p4'(x) = p4'(x)
b = Segment(A1, A11)