Daniel B. answered 05/12/21
A retired computer professional to teach math, physics
In general, the rational function will be of the form
R(x) = A P(x)/Q(x)
where A is a constant, and P(x), Q(x) are polynomials with leading coefficient 1.
1) Horizontal asymptote of y = 5 implies that
A = 5, and P and Q must be of the same degree.
This is the reason:
If degree(P) < degree(Q) then R(x) -> 0 when x -> ∞ or -∞
If degree(P) > degree(Q) then R(x) -> ∞ or -∞ when x -> ∞ or -∞
If degree(P) = degree(Q) then P(x)/Q(x) -> 1 when x -> ∞ or -∞
2) Vertical asymptotes of x = 3 and x = -8 implies that
Q(x) must have the roots 3 and -8, and P(x) must not have those root.
If Q(x) did not those roots that R(3) and R(-8) would be defined.
If P(x) had a root 3 or -8, then R(3) or R(-8) would be a hole, not a vertical asymptote.
3) Continuous for all x not equal to 3 or -8 implies that
Q(x) cannot have any other roots besides those two.
The simplest rational function satisfying those constraints is
R(x) = 5x²/(x-3)(x+8)