Tipo:

lista: {"|a x + b| ≤ k", "|a x + b| < k", "|a x + b| ≥ k", "|a x + b| > k"}
op = SelectedIndex(lista)
a = 1 (slider from -5 to 5, step 0.1)
b = -2 (slider from -5 to 5, step 0.1)
c = -1 (slider from -5 to 5, step 0.1)
k = 4 (slider from -1 to 5, step 0.1)
f1(x) = (a * x) + b
f2(x) = ((-a) * x) - b
f3(x) = (a * x^(2)) + (b * x) + c
f4(x) = ((-a) * x^(2)) - (b * x) - c
f = If(op  <  5, abs((a * x) + b), abs((a * x^(2)) + (b * x) + c))
r: y = k
InfN = (-1000000, 0)
InfP = (1000000, 0)
A = Intersect(f2, r)
A': A
A0: (x(A), 0)
A0': A0
B = Intersect(f1, r)
B0: (x(B), 0)
B': B
B0': B0
s = Segment(A0, B0)
s0 = Segment(InfN, InfP)
D1, D2 = Intersect(f3, r)
C1, C2 = Intersect(f4, r)
C10: (x(C1), 0)
C20: (x(C2), 0)
D10: (x(D1), 0)
D20: (x(D2), 0)
C1': C1
C2': C2
D1': D1
D2': D2
C10': C10
C20': C20
D10': D10
D20': D20
d = Segment(A, A0)
e = Segment(B, B0)
g = Segment(D1, D10)
h = Segment(C1, C10)
i = Segment(C2, C20)
j = Segment(D2, D20)
s3 = Segment(C10, D10)
s4 = Segment(C20, D20)
s5 = Segment(D10, D20)
s6 = Segment(C10, C20)
s6a = Segment(InfN, D10)
s6b = Segment(InfP, D20)
s5a = Segment(InfN, C10)
s5b = Segment(InfP, C20)
M: (((-b)) / ((2 * a)), abs(f4(((-b)) / ((2 * a)))))
s5c = Segment(D10, D20)
f5(x) = (b * x) + c
f6(x) = ((-b) * x) - c
AH = Intersect(f6, r)
AH': AH
AH0: (x(AH), 0)
BH = Intersect(f5, r)
BH': BH
BH0: (x(BH), 0)
AH0': AH0
BH0': BH0
sH = Segment(AH0, BH0)
s1 = Segment(InfN, (Min[x(A0), x(B0)], 0))
s2 = Segment((Max[x(A0), x(B0)], 0), InfP)
l = Segment(BH, BH0)
m = Segment(C1, C10)
sHa = Segment(InfN, (Min[x(AH0), x(BH0)], 0))
sHb = Segment(InfP, (Max[x(AH0), x(BH0)], 0))
lista2: {"≤", "<", "≥", ">", "≤", "<", "≥", " >"}
signo = Element(lista2, op)
ff = Simplify(f)
texto1: "" + (LaTeX[ff]) + "" + (LaTeX[signo]) + "" + (LaTeX[k]) + ""