Rational root theorem
For 2x^3 - 3x^2 - 3x + 2 the possible rational roots are ±1, ±2 and ±1/2: six candidates built from divisors of the constant term over divisors of the leading coefficient. You get the list; testing them is your next step. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Coefficients
- 2, -3, -3, 2
- Degree
- 3
- Polynomial
- 2x^3 - 3x^2 - 3x + 2
- Leading coefficient
- 2
- Constant term
- 2
The rational root theorem is the first tool most algebra students reach for when a polynomial looks messy: before synthetic division or a graphing calculator, you need a finite list of possible rational roots. Given integer coefficients highest degree first, this capability returns every candidate of the form p over q where p divides the constant term and q divides the leading coefficient, including both signs and values reduced to lowest terms.
What the rational root theorem tells you
Take a polynomial with integer coefficients, such as 2x^3 - 3x^2 - 3x + 2. The rational root theorem says that any rational root, written in lowest terms as p over q, must have p dividing the constant term and q dividing the leading coefficient. Here both are 2, so p and q each come from 1 and 2. Pairing them, reducing each fraction and adding both signs gives six candidates: -2, -1, -1/2, 1/2, 1 and 2. No rational root can lie outside that list, which turns an open search into a short, finite check.
When to use the list and common mistakes
Use the list before synthetic division, factoring or graphing a cubic or quartic: test each candidate and keep those that make the polynomial zero. The list only contains possibilities; it does not say which of them are actual roots. Common slips are forgetting the negative signs, leaving fractions unreduced so the same value appears twice, and entering the coefficients out of order. Write them from the highest power down to the constant, and use 0 for any missing power of x in the middle.
How candidates are generated: factors, signs, and reduced fractions
The engine takes the absolute values of the constant term and the leading coefficient and enumerates every positive divisor of each. Those two divisor lists are the p-factor and q-factor sets. Every pair (p absolute, q absolute) is reduced by their greatest common divisor so that fractions appear in lowest terms, then both positive and negative signs are applied to the numerator.
Nothing in this path evaluates the polynomial at the candidates: listing possibles is intentionally separate from testing which ones are actual roots, so homework steps that ask only for the possible list stay honest.
What you can do with it
Homework and tutoring verification
Students and graders confirm the full possible rational root list for cubics and quartics before testing factors with synthetic division, including clear errors when the constant or leading coefficient is zero.
Curriculum and assessment generators
Automated problem banks build integer-coefficient exercises and verify that printed answer keys match this deterministic candidate oracle before publishing worksheets.
FAQ
Does this tell me which candidates are actual roots?
No. It only lists possible rational roots from the theorem. Test candidates with synthetic division or use a polynomial root finder if you need confirmed roots.
Is the rational root theorem calculator free?
The browser tool runs free on your device.
Must coefficients be integers?
Yes. The classical rational root theorem applies to integer coefficients.
What happens if the leading coefficient or the constant term is zero?
The calculation is refused. The theorem needs both values to be nonzero, so instead of guessing a lower degree or treating zero as an extra root, the calculator asks you to check the coefficients.
How do I enter the polynomial?
Type the integer coefficients from the highest power down to the constant term. For 2x^3 - 3x^2 - 3x + 2 that is 2, -3, -3 and 2, and the result is six candidates: ±1, ±2 and ±1/2.
Related tools
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-root \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"coefficients":[2,-3,-3,2]}'const res = await fetch("https://api.kit.forhosting.com/algebra/rational-root", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"coefficients": [
2,
-3,
-3,
2
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/rational-root",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"coefficients": [
2,
-3,
-3,
2
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/rational-root", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"coefficients":[2,-3,-3,2]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"coefficients":[2,-3,-3,2]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/rational-root", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"coefficients": [
2,
-3,
-3,
2
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.rational_root",
"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.
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. |
Technical notes
A zero leading coefficient or a zero constant term is rejected with invalid_input so callers never receive a silently truncated or infinite candidate set.
What the rational root theorem states and how to encode your polynomial
The degree is one less than the length of a well-formed array and must be at least one, so you always send both a leading term and a constant term. Middle coefficients may be zero; that simply means a missing power of x and does not change the theorem. Coefficients must be integers or near-integers that snap cleanly, because the classical statement of the theorem is for integer coefficient rings. Write a univariate polynomial with integer coefficients as a_n x to the n plus a_{n-1} x to the n-1 down to the constant term a_0. The input array is exactly those integers in that order: the first entry is the leading coefficient a_n and the last is the constant term a_0. The theorem says that every rational root written in lowest terms as p over q has p dividing a_0 and q dividing a_n. What must not be zero under this capability is the leading coefficient and the constant term: if either vanishes the request fails with invalid_input rather than guessing a lower degree or treating zero as a free root outside the classical finite list.
How candidates are generated: factors, signs, and reduced fractions
The response echoes the cleaned coefficients, the degree, a human-readable polynomial string, the leading and constant coefficients, the positive factor lists, the numeric candidates, parallel fraction strings such as 1/2 or -3, structured candidate_details with p, q, value, and fraction, the candidate_count, and a method label fixed to rational_root_theorem. Failed validation—missing array, non-integer entries, zero leading term, or zero constant term—raises invalid_input and is not charged.
Calling the API, reading the response, pricing, and how this fits real workflows
Use the free in-browser tool for one-off homework checks, lecture demos, and quick sanity tests without installing Maxima, SymPy, or a local CAS. Degree is capped and coefficient magnitudes are bounded for isolate safety; very large integers with many divisors remain finite but may produce long candidate lists, so prefer classroom-scale inputs. When you need actual real roots rather than candidates alone, pair this list with synthetic division or call a root-finding capability. Send a JSON body with the required coefficients array of integers, highest degree first; the alias coeffs is accepted for convenience. On success use candidates or candidates_as_fractions for display, and candidate_details when you need exact numerators and denominators for synthetic division loops or step-by-step explanations. Use the API when a tutoring platform, coding-assessment sandbox, curriculum generator, or data pipeline needs a stable contract under prepaid KIT balance at $0.002 per successful item. Source inputs follow the same retention rules as other KIT parse items, and validation failures never consume balance after the engine rejects the request.
Integration use cases
Step-by-step algebra pipelines
Apps that teach factoring first emit RRT candidates from this endpoint, then walk learners through testing each value without reimplementing divisor enumeration in every language.
Technical questions
How do I list rational root theorem candidates with this API?
Send JSON with coefficients as an integer array highest degree first (for example [2, -3, -3, 2] for 2x³ − 3x² − 3x + 2). The response lists every distinct candidate p/q with factors, fractions, and counts.
What happens if the leading coefficient or constant term is zero?
The request fails with invalid_input and a message that both the leading coefficient and the constant term must be non-zero. The failed call is not charged.