4. Rational Function Simplifier — Theory
A rational function is a quotient of polynomials:
\[
f(x)=\frac{p(x)}{q(x)},\qquad q(x)\neq 0.
\]
The key idea in simplification is to factor \(p\) and \(q\), cancel common factors, and then interpret what cancellation means for the graph.
1) Domain of a rational function
The domain consists of all real numbers that do not make the denominator zero:
\[
\mathrm{Dom}(f)=\mathbb{R}\setminus\{x:\ q(x)=0\}.
\]
Even if a factor cancels later, the original function is still undefined where the original \(q(x)=0\).
2) Cancelling common factors
If \(p(x)\) and \(q(x)\) share a common factor \(g(x)\), we can write:
\[
p(x)=g(x)\,p_1(x),\qquad q(x)=g(x)\,q_1(x).
\]
Then for values where \(g(x)\neq 0\),
\[
\frac{p(x)}{q(x)}=\frac{g(x)p_1(x)}{g(x)q_1(x)}=\frac{p_1(x)}{q_1(x)}.
\]
The simplified expression matches the original everywhere the original is defined.
3) Holes (removable discontinuities)
If a factor \((x-a)\) cancels completely, then \(x=a\) is a removable discontinuity.
The simplified formula gives a finite value at \(a\),
but the original rational function is still undefined there. Graphically, this appears as a hole:
\[
\text{hole at } x=a,\quad \text{with } y=\frac{p_1(a)}{q_1(a)}.
\]
(The point \((a,\,p_1(a)/q_1(a))\) is marked as an open circle.)
4) Vertical asymptotes
If the reduced denominator still has a real root \(a\) (so \(q_1(a)=0\)), then \(x=a\) typically produces a vertical asymptote.
Cancellation distinguishes holes from asymptotes:
- Hole: \((x-a)\) cancels and the reduced denominator is nonzero at \(a\).
- Asymptote: the reduced denominator is still zero at \(a\).
5) Improper rational functions (optional division)
If \(\deg(p_1)\ge \deg(q_1)\), you can divide:
\[
\frac{p_1(x)}{q_1(x)} = Q(x) + \frac{R(x)}{q_1(x)},
\]
where \(\deg(R)<\deg(q_1)\). This makes end behavior (like slant/horizontal asymptotes) easier to analyze.
Tip: If you need a full discontinuity classification (removable/jump/infinite) across many points,
link this calculator to your Discontinuities in Functions tool.