Vertical asymptote calculator for rational functions
This vertical asymptote calculator examines the numerator and denominator of a rational function and reports every vertical line where the reduced denominator is zero.
Run — free
Enter each polynomial as coefficients in descending powers. The calculator finds real denominator zeros, checks their multiplicities against matching numerator zeros, and excludes factors that cancel completely. The result includes ready-to-use equations such as x = 2, along with multiplicity details that make the cancellation decision transparent.
Enter the rational function as coefficient lists
Represent the numerator and denominator separately, writing coefficients from the highest power of x down to the constant term. For example, x squared minus x minus 2 becomes [1, -1, -2], while x plus 1 becomes [1, 1]. Include zero placeholders for missing powers: x cubed minus 4x must be entered as [1, 0, -4, 0]. This convention removes ambiguity about signs, powers, multiplication, and parentheses, so the same input works reliably in the browser and through the API. The denominator must be nonconstant and its first coefficient cannot be zero. Both arrays accept finite numbers and support polynomials through degree twelve, which covers typical school, college, and symbolic preprocessing exercises. You do not need to factor either polynomial first. The calculator performs the real-root isolation and cancellation analysis directly from the coefficients. If the rational expression contains decimal coefficients, enter them as ordinary JSON numbers; the result is cleaned to stable, readable values without changing the underlying asymptote test.
Understand why cancelled zeros are not asymptotes
A vertical asymptote occurs at a real zero of the denominator only when at least one copy of that zero remains after common factors are cancelled. Suppose both numerator and denominator contain x minus 3 once. The original expression is undefined at x = 3, but cancellation leaves a removable hole rather than a vertical asymptote. Multiplicity matters when a factor repeats. If the denominator contains (x minus 3) squared and the numerator contains x minus 3 once, one copy remains below the fraction bar, so x = 3 is still a vertical asymptote. The calculator therefore does more than test whether the numerator is zero at each denominator root. It determines how many times the root occurs in both polynomials, cancels the smaller multiplicity, and retains the vertical line only when the denominator multiplicity is larger. Fully removed roots appear in cancelled_zeros for auditability, while surviving roots appear in vertical_asymptotes and in the compact equations list. Nonreal denominator roots never describe vertical lines on a real graph and are omitted.
Read and use the returned vertical lines
The equations array is the quickest answer: each entry is a vertical-line equation in the form x = a. The count field tells you how many distinct vertical asymptotes were found. For deeper checking, every vertical_asymptotes record includes the numeric x-coordinate, the equation, the root's original denominator multiplicity, and the multiplicity removed through cancellation. A cancelled_multiplicity of zero means the numerator did not remove that denominator factor. A positive value means cancellation occurred but at least one denominator copy survived. The separate cancelled_zeros list records roots that disappeared from the reduced denominator completely, helping distinguish holes from asymptotes. An empty equations list is a valid mathematical result: it means the denominator has no real zeros or all of its real zeros cancel fully. Plotting software, tutoring systems, and grading pipelines can use the numeric x values directly, while worksheets and explanations can display the equation strings. The algorithm is deterministic, performs no network request, and produces the same output for identical coefficient arrays.
What you can do with it
Check algebra homework
Confirm the vertical-line equations after factoring and reducing a rational expression by hand.
Prepare a rational-function graph
Separate genuine vertical asymptotes from removable holes before sketching branches and discontinuities.
Validate generated exercises
Use deterministic coefficient input and structured output to verify rational-function question banks automatically.
FAQ
What does the calculator cost?
The API price is $0.002 per item, and the browser version can run locally for free.
Does every denominator zero create a vertical asymptote?
No. A real denominator zero creates a vertical asymptote only if its factor does not cancel completely with the numerator.
How do I enter a missing polynomial term?
Insert a zero coefficient for every missing power so the positions continue to represent descending powers.
What happens when a factor cancels only partly?
The root remains a vertical asymptote whenever its denominator multiplicity is greater than its numerator multiplicity.
Are complex denominator roots returned?
No. Vertical asymptotes are real vertical lines, so only real denominator roots are relevant.
Why can the equations list be empty?
The denominator may have no real roots, or every real denominator root may have been fully cancelled by the numerator.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/algebra/rational-vertical-asymptote \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"numerator":[1,1],"denominator":[1,-1,-2]}'const res = await fetch("https://api.kit.forhosting.com/algebra/rational-vertical-asymptote", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"numerator": [
1,
1
],
"denominator": [
1,
-1,
-2
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/rational-vertical-asymptote",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"numerator": [
1,
1
],
"denominator": [
1,
-1,
-2
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/rational-vertical-asymptote", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"numerator":[1,1],"denominator":[1,-1,-2]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"numerator":[1,1],"denominator":[1,-1,-2]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/rational-vertical-asymptote", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"numerator": [
1,
1
],
"denominator": [
1,
-1,
-2
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.rational_vertical_asymptote",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_degree | 12 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |