# What are the asymptotes of f(x)?

Finds the asymptotes and holes of a rational function.

- Page: https://www.acalculator.org/math/asymptote-calculator
- JSON spec: https://www.acalculator.org/math/asymptote-calculator.json
- Version: 4a9c49a2c12c

## Default answer

Example with the default inputs (Function f(x) (x^2 - 4x + 1)/(x + 2)): The vertical asymptotes of (x^2 - 4x + 1)/(x + 2) are x = -2.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| f | Function f(x) | A rational function of x. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| vertical | Vertical asymptotes x = | Where f → ±∞. |
| other | Horizontal or slant asymptote y = | The line f nears at ±∞. |
| holes | Holes at x = | Where f is undefined. |

## Method

Vertical: zeros of the denominator where f grows without bound.

## Assumptions

- Zeros searched for in ±10^6.

## Worked examples

1. f = (x^2 - 4x + 1)/(x + 2) gives vertical = -2, other = x - 6 (slant), holes = none. Source: OpenStax (Abramson, 2021), College Algebra 2e, section 5.6 Rational Functions, Example 7(b).
2. f = (x - 2)/(x^2 - 4) gives vertical = -2, other = 0 (horizontal), holes = 2. Source: OpenStax (Abramson, 2021), College Algebra 2e, section 5.6 Rational Functions, Example 6.

## FAQ

### What is an asymptote?

A line the graph approaches. A vertical asymptote x = c is where f(x) goes to ±∞ as x approaches c. A horizontal asymptote y = L is a value f(x) approaches as x → ±∞. A slant (oblique) asymptote y = mx + b is a line that f(x) − (mx + b) approaches 0 along.

### How do I find vertical asymptotes?

Write f as one fraction and find the real zeros of the denominator. A zero that does not cancel with the numerator is a vertical asymptote; one that cancels completely is a hole. For (x − 2)/(x² − 4) = (x − 2)/((x − 2)(x + 2)), x = −2 is a vertical asymptote and x = 2 is a hole.

### How do I find a horizontal asymptote?

Compare degrees. If the top has lower degree than the bottom, y = 0. If the degrees are equal, y = (leading coefficient of the top)/(leading coefficient of the bottom). If the top is one degree higher, there is a slant asymptote instead; two or more degrees higher, neither.

### How do I find a slant asymptote?

Divide the top by the bottom. The quotient, a line mx + b, is the slant asymptote, and the remainder over the bottom goes to 0. (x² − 4x + 1)/(x + 2) = x − 6 + 13/(x + 2), so the slant asymptote is y = x − 6.

### What is a hole?

A point where f is undefined but its graph is otherwise unbroken, because the factor that makes the bottom 0 cancels with the top. (x² − 1)/(x − 1) equals x + 1 everywhere except x = 1, where it is undefined: a hole at x = 1, and no vertical asymptote.

### How is the answer checked?

The zeros of the denominator are found both by a computer algebra system and by a sign scan on a fine grid, so none is missed. The horizontal or slant asymptote comes from partial fractions, checked numerically, and f(x) minus it must shrink towards 0 at x = ±10⁴ and ±10⁶.

## Sources

- OpenStax, College Algebra 2e, section 5.6 Rational Functions: https://openstax.org/books/college-algebra-2e/pages/5-6-rational-functions
