Trig identity verifier
Check the identities your homework relies on at 30° or any angle you choose, and see sine squared plus cosine squared come out at exactly 1 while the other four identities hold as well. Undefined values are flagged, never printed as infinity. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Angle
- 30
- Radians
- 0.5235987756 degrees
- Sin
- 0.5
- Cos
- 0.8660254038
- Tan
- 0.5773502692
The trig identity verifier turns a single finite angle into a numerical stress test of the identities every student and engineer relies on. At that angle it evaluates sine, cosine, tangent, cotangent, secant, and cosecant, then measures how far five classic statements drift from exact equality: the three Pythagorean forms sin squared plus cos squared equals one, one plus tan squared equals sec squared, and one plus cot squared equals csc squared, plus the two quotient forms tan equals sin over cos and cot equals cos over sin. Each identity returns left and right sides, an absolute residual, and a holds flag against your tolerance. The path is fully deterministic: no network, no randomness, no clock.
Why Pythagorean and quotient identities matter in practice
Trigonometric identities are not decorative textbook theorems; they are the algebraic backbone of unit-circle geometry, Fourier analysis, rotation matrices, and every library that rewrites expressions before differentiating or simplifying them. The fundamental Pythagorean identity sin squared theta plus cos squared theta equals one is the statement that a point on the unit circle has radius one. From it, dividing by cos squared or sin squared yields the companion forms that relate tangent to secant and cotangent to cosecant.
The quotient identities tan equals sin over cos and cot equals cos over sin are the definitions that connect ratio language to coordinate language. Students meet them when they simplify homework expressions; engineers meet them when a CAD or signal-processing pipeline rewrites an expression and must stay within floating-point tolerance of the original. Numerically checking residual error at a concrete angle is the fastest way to catch a mode error, a degree-versus-radian bug, or a hand-derived formula that almost holds but fails near a singularity.
This tool focuses on that verification contract: one angle in, five residual reports out, with an honest failure when any of the six core functions is undefined. It does not attempt symbolic proof; it answers the practical question of how large the floating-point residual is right here, which is what automated tests and grading scripts actually need.
Where identity verification fits in study, teaching, and automation
Students use residual checks when they want confidence that a calculator and a textbook identity agree at thirty degrees, at pi over four, or at an awkward angle their homework invented. Teachers can generate live demos that flip the angle and show every residual update in the browser without trusting opaque apps that stay stuck in the wrong unit mode. Authors of property-based tests can sample many angles, skip or expect failures at the axes where functions are undefined, and assert that max residual stays below a chosen epsilon.
Game and robotics developers who store orientations in degrees but feed radians into engines can verify that intermediate trig rewrites still obey Pythagorean structure within machine precision. Survey and CAD pipelines that rewrite elevation formulas benefit from a cheap gate that rejects undefined angles instead of propagating Infinity into a mesh. Pair it with degree–radian conversion when you need unit labels, with unit-circle helpers when you need exact textbook points, and with inverse trigonometric tools when you start from a ratio instead of an angle.
What you can do with it
Homework identity spot-checks
Pick a worksheet angle, verify all five Pythagorean and quotient identities, and read residual error without guessing calculator mode.
Teaching singularities and domains
Show students that ninety degrees and zero degrees fail honestly because tan/sec or cot/csc are undefined, while nearby angles still hold.
FAQ
What does the trig identity verifier cost?
It is free in your browser on this page.
Which identities are checked?
Three Pythagorean identities (sin²+cos²=1, 1+tan²=sec², 1+cot²=csc²) and two quotient identities (tan=sin/cos, cot=cos/sin).
What happens at 0°, 90°, or other axes?
When sin is zero, cot and csc are undefined; when cos is zero, tan and sec are undefined.
Is the algorithm randomized?
No. It uses deterministic Math.sin and Math.cos with fixed conversion constants. The same angle, unit, precision, and tolerance always yield the same result.
Does sin² + cos² = 1 hold at 30°?
Yes. Both sides come out at 1 and the leftover difference is 0. At that angle the other Pythagorean forms and the two quotient identities also hold, so every check is marked as passed.
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/trig/pythagorean-identity \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"angle":30}'const res = await fetch("https://api.kit.forhosting.com/trig/pythagorean-identity", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"angle": 30
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/trig/pythagorean-identity",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"angle": 30
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/trig/pythagorean-identity", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"angle":30}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"angle":30}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/trig/pythagorean-identity", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"angle": 30
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "trig.pythagorean_identity",
"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
When sine or cosine is zero, tangent, secant, cotangent, or cosecant are undefined, so the tool rejects the request with invalid_input instead of printing Infinity. Explore free in the browser for homework and teaching demos, or call the API at $0.002 per successful request when scripts need reproducible residual reports.
How the angle is read and how residuals are computed
Internally the engine converts degrees to radians with a fixed pi constant, evaluates sine and cosine, and aborts if either absolute value is at or below one times ten to the minus twelve, because then tan and sec or cot and csc are undefined. Otherwise it forms tan, cot, sec, and csc, evaluates left and right for each of the five identities, takes the absolute difference as residual, and records whether residual is at most the tolerance. The required field is angle as a JSON number, with aliases value, theta, x, and degrees so forms, spreadsheets, and query strings can reuse one contract. Optional unit, with aliases from and input_unit, accepts degrees, radians, deg, or rad and defaults to degrees so classroom angles work without extra fields. Decimal strings such as thirty or negative forty-five point five are accepted after trim; empty strings, hex prefixes, and non-numeric tokens fail with invalid_input. Optional precision, with aliases decimals and dp, is an integer from zero through fifteen that defaults to twelve decimal places on numeric response fields. Optional tolerance, with aliases tol and epsilon, is a non-negative finite threshold that defaults to one times ten to the minus ten and drives the holds and all_hold flags. The response echoes angle and unit, reports radians and the six function values rounded to precision, nests the five identity records, and includes max_residual and all_hold.
Where identity verification fits in study, teaching, and automation
On this page the work runs entirely in your browser; through the API each successful verification costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result.
Integration use cases
CI and property-test fixtures
Generate deterministic residual reports for unit tests that assert max_residual stays under a fixed tolerance across many angles.
Technical questions
How do I interpret residual and holds?
Residual is the absolute difference between left and right sides. holds is true when residual is at most your tolerance (default 1e-10). all_hold is true only if every identity holds.