Quadratic in form solver
The quadratic in form solver handles equations that become ordinary quadratics after one expression is renamed as u.
Run — free
Enter the three coefficients and choose whether u represents x squared or the principal square root of x. The solver finds the substituted roots, applies the required domain restriction, and then back-substitutes to return every real value of x. It also displays the discriminant and a compact sequence of steps, making the result useful for checking homework, preparing examples, or validating an algebra workflow.
Recognize a quadratic hidden inside another expression
An equation is quadratic in form when the same expression appears once to the first power and once squared. A biquadratic equation such as x to the fourth minus five x squared plus four equals zero contains x squared and its square, x to the fourth. Setting u equal to x squared changes it into u squared minus five u plus four equals zero. The same pattern occurs with radicals: if an equation contains x and the square root of x, then x is the square of that root, so setting u equal to the square root of x produces an ordinary quadratic. This solver asks for coefficients a, b, and c in the transformed pattern a times u squared plus b times u plus c equals zero. Choose the substitution that matches the original expression. This separation is valuable because it keeps the familiar quadratic calculation distinct from the later domain and back-substitution work, where solutions are most often lost or added incorrectly.
Solve for u, then enforce its domain
After substitution, the solver computes the discriminant b squared minus four ac. A negative discriminant means there are no real values of u and therefore no real values of x for the supported forms. A zero discriminant gives one repeated u value, while a positive discriminant gives two candidates. Those candidates are not automatically valid. Both supported substitutions produce a nonnegative u: a real square x squared cannot be negative, and the principal square root of x is also never negative. The solver therefore reports all quadratic roots in u_solutions and separately reports the roots that survive in admissible_u_solutions. This makes a rejected candidate visible instead of silently discarding it. The calculation uses a numerically stable form of the quadratic formula when the roots differ, reducing avoidable cancellation for coefficients of very different sizes. Coefficients must be finite real numbers, and a must be nonzero because otherwise the transformed equation is linear rather than quadratic in form.
Back-substitute without missing or inventing roots
Back-substitution depends on what u means. When u equals x squared, each positive admissible u creates two real answers: positive and negative square root of u. A zero u creates only x equals zero, not two distinct copies. This is why a fourth-degree equation can have four, two, one, or no distinct real solutions even though its substituted quadratic has at most two roots. When u equals the principal square root of x, solving square root of x equals u gives x equals u squared. Only one x comes from each admissible u, because the radical denotes the nonnegative principal root. The solver sorts and deduplicates the final values and returns solution_count alongside them. You should still compare the chosen substitution with the structure of the original equation before using the result. The tool solves the declared quadratic form; it does not parse arbitrary algebraic notation or infer coefficients from a typed equation. For automation, the same deterministic result is available for $0.002 per request.
What you can do with it
Solve a biquadratic equation
Replace x squared with u, solve the resulting quadratic, and recover both positive and negative real x values where appropriate.
Handle an equation quadratic in a radical
Use the principal square root as u, reject negative substituted roots, and square the admissible values to recover x.
Check an instructional solution
Compare the discriminant, all u roots, domain-valid u roots, and final sorted solutions with a hand-worked derivation.
FAQ
What equation should I enter?
Enter a, b, and c for the transformed equation au² + bu + c = 0, then select the expression represented by u.
Does the solver return complex solutions?
No. It returns real solutions only. A negative discriminant produces an empty real solution list.
Why can a u solution be rejected?
Both x squared and the principal square root of x are nonnegative for real x, so a negative u cannot be back-substituted into either supported form.
Why does a positive u give two answers for x squared?
If x² equals a positive number, both its positive and negative square roots satisfy the equation.
Why is there only one answer when u is the square root of x?
The principal square root is nonnegative, and squaring an admissible u gives the single corresponding value x = u².
How much does an API request cost?
Each API request costs $0.002; the same deterministic solver can run free in the browser.
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/quadratic-in-form \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"a":1,"b":-5,"c":4,"substitution":"x_squared"}'const res = await fetch("https://api.kit.forhosting.com/algebra/quadratic-in-form", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"a": 1,
"b": -5,
"c": 4,
"substitution": "x_squared"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/quadratic-in-form",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"a": 1,
"b": -5,
"c": 4,
"substitution": "x_squared"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/quadratic-in-form", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"a":1,"b":-5,"c":4,"substitution":"x_squared"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"a":1,"b":-5,"c":4,"substitution":"x_squared"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/quadratic-in-form", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"a": 1,
"b": -5,
"c": 4,
"substitution": "x_squared"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.quadratic_in_form",
"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. |