f(x) =   \frac{ a x²+b x+ c }{ A x²+B x+ C } 

A = 1 (slider from -5 to 5, step 0.1)
c = 2 (slider from -5 to 5, step 0.1)
b = -3 (slider from -5 to 5, step 0.1)
a = 1 (slider from -5 to 5, step 0.1)
n(x) = a * x^(2) + b * x + c
rN: {Root[n]}
rNx: x(rN)
raícesN = If(Defined[Root[n]], 2, 0)
B = 0 (slider from -5 to 5, step 0.1)
C = -1 (slider from -5 to 5, step 0.1)
d(x) = A * x^(2) + B * x + C
rD: {Root[d]}
rDx: x(rD)
raícesD = If(Defined[Root[d]], 2, 0)
rO = Sort(Join[{rNx, rDx}])
comunes = If(raícesN * raícesD ≟ 0, 0, 2 + Min[Length[rDx], Length[rNx]] - Length[Union[rO, {}]])
rR = RemoveUndefined(Sequence[If[Element[rO, s] ≟ Element[rO, s + 1], Element[rO, s], ""], s, 1, Length[rO] - 1])
d2 = Simplify(d(x) / (x - Element[rR, 1]))
rDx2b = KeepIf((x ≟ Element[rR, 1] ∨ x ≟ Element[rR, 2]) ∧ Length[rD] ≟ 1 ∧ (A ≠ 0) ∧ (rNx ≠ rDx), rDx)
rDx2a = KeepIf((x ≠ Element[rR, 1]) ∧ (x ≠ Element[rR, 2]), rDx)
f(x) = n(x) / d(x)
texto1: "f(x) = " + f
n2 = Simplify(n(x) / (x - Element[rR, 1]))
d3 = If(comunes ≟ 2, If[Length[rR] ≟ 2, Simplify[d2(x) / (x - Element[rR, 2])], Simplify[d2(x) / (x - Element[rR, 1])]])
n3 = If(comunes ≟ 2, If[Length[rR] ≟ 2, Simplify[n2(x) / (x - Element[rR, 2])], Simplify[n2(x) / (x - Element[rR, 1])]])
g = If(Defined[n3], n3(x) / d3(x), If[Length[rR] > 0, n2(x) / d2(x), f])
rDx2 = Join({rDx2a, rDx2b})
puntosIndefinidos = Sequence((Element[rR, s], g(Element[rR, s])), s, 1, Length[rR])
av = Sequence(Line[(Element[rDx2, s], 0), (Element[rDx2, s], 1)], s, 1, Length[rDx2])
ahValor = If(a ≟ 0 ∧ A ≟ 0 ∧ b ≟ 0 ∧ B ≟ 0 ∧ (C ≠ 0), c / C, If[a ≟ 0 ∧ A ≟ 0 ∧ (B ≠ 0), b / B, If[A ≠ 0, a / A]])
ah: 1 * y = ahValor
ao = If(a ≟ 0 ∧ A ≟ 0 ∧ (b ≠ 0) ∧ B ≟ 0 ∧ (C ≠ 0), (b * x + c) / C, If[(a ≠ 0) ∧ A ≟ 0 ∧ (B ≠ 0), 1 / B * (a * x + b - a * C / B)])