ForHosting KIT · Math

Double-angle identities

One angle in radians, all three double-angle values at once: for π/6 (0.5235987756) you get sin(2x) ≈ 0.8660254038, cos(2x) of 0.5 and tan(2x) ≈ 1.7320508076, each with the identity that produced it. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Angle
0.5235987756
You get
Double angle
1.0471975512
Sin 2x
0.8660254038
Cos 2x
0.5
Tan 2x
1.7320508076

Double-angle identities rewrite the sine, cosine, and tangent of twice an angle in terms of the sine and cosine of the angle itself: sin(2x) equals two sin(x) cos(x), cos(2x) equals cos²(x) minus sin²(x), and tan(2x) is their ratio when cos(2x) is nonzero.

What the double-angle identities say and where they come from

The double-angle identities are the special case of the angle-addition formulas where both summands are the same angle. Setting a and b equal to x in sin(a+b) = sin(a)cos(b) + cos(a)sin(b) collapses to sin(2x) = 2 sin(x) cos(x). Doing the same with the cosine addition formula gives cos(2x) = cos²(x) − sin²(x), which textbooks also present in the equivalent forms 2cos²(x) − 1 and 1 − 2sin²(x) via the Pythagorean identity.

The tangent identity tan(2x) = sin(2x)/cos(2x) follows directly from the quotient definition of tangent, and it carries the one real domain restriction of the family: it fails exactly where cos(2x) is zero, that is, where 2x is an odd multiple of π/2. These three formulas are the workhorses of trigonometry courses, contest preparation, and any numeric pipeline that must expand a doubled rotation—physics integrators, graphics rotations, Fourier manipulation—without reaching for a full computer-algebra system.

Search intent around this topic clusters on phrases like double angle identities, sin 2x formula, cos 2x identity, and evaluate double angle online, and what users want is usually a concrete number they can check against an answer key, not another symbolic restatement. This capability delivers exactly that: one finite radian measure in, three evaluated identity values out, with the formulas echoed in the response so downstream consumers can assert which family of identities produced the numbers.

How this evaluator validates input and computes the three values

The contract is a single required field, angle, interpreted as radians. Once the angle is confirmed finite, the engine computes sin(x) and cos(x) with the platform math library and applies the identities directly: sin(2x) as twice the product, cos(2x) as the difference of squares, and tan(2x) as their quotient after a strict near-zero check on cos(2x).

Computing tangent through the sine-over-cosine path, rather than through 2tan(x)/(1−tan²(x)), is deliberate: the tan(x) form wrongly fails when cos(x) itself is zero even though tan(2x) is perfectly well defined there and equals zero, while the quotient form handles every case through a single consistent code path. A classic check: angle π/6 (about 0.5235987756 radians) returns sin(2x) = √3/2 ≈ 0.8660254038, cos(2x) = 0.5, and tan(2x) = √3 ≈ 1.7320508076.

Practical use, limits, pricing, and delivery channels

Use the free browser tool when you want the three double-angle values immediately while checking homework, verifying a unit-circle sketch, or confirming a rotation step without installing anything. The computation is fully deterministic: identical input always yields identical output, with no language model, no external service, and no randomness involved, which makes the capability safe to pin inside continuous-integration checks and reproducible teaching materials. There are two honest limits to know.

First, input is radians only—convert degrees by multiplying by π/180 before calling if your source data is in degrees. Second, the near-zero domain check on cos(2x) treats values within 1e-12 of zero as exactly zero, so angles extremely close to an odd multiple of π/4 are reported as undefined tangent rather than as an astronomically large finite value, which is the behavior graders and numeric pipelines almost always prefer.

Does the angle have to be in radians?

Yes. Input is interpreted as radians only. Convert degrees first by multiplying by π/180 if your source data is in degrees.

When is tan(2x) undefined?

When cos(2x) is zero—equivalently when 2x is an odd multiple of π/2, i.e. x is an odd multiple of π/4.

What happens if the angle is not a finite number?

Non-numeric values, empty strings, NaN, and infinities are rejected before any identity is applied; those calls are not charged.

Is the double-angle identities tool free?

The browser tool runs free on your device.

Why is tan(2x) worked out as sin(2x) divided by cos(2x)?

Because the other form, built on tan(x), fails wherever cos(x) is zero, even though tan(2x) is perfectly defined there and equals zero. Dividing sin(2x) by cos(2x) handles every angle the same way.

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.

POSThttps://api.kit.forhosting.com/math/double-angle-identities

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.

curl -X POST https://api.kit.forhosting.com/math/double-angle-identities \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"angle":0.5235987756}'
{
  "angle": 0.5235987756
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.double_angle_identities",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

This capability takes one finite angle in radians, evaluates all three identities deterministically, and returns the three values as structured JSON. Angles where the tangent of the double is undefined—when cos(2x) is zero—are rejected with invalid_input and are not charged.

How this evaluator validates input and computes the three values

JSON numbers and numeric strings such as 0.5235987756 are accepted; words, empty strings, null, booleans, NaN, and positive or negative infinity all fail with invalid_input before any trigonometry runs, and failed validation is never charged. The response echoes the input angle, reports double_angle as 2x in radians, lists the three identity formulas used, and tags method as double_angle_identities so automated pipelines can verify provenance without re-deriving the formula family.

Practical use, limits, pricing, and delivery channels

Each successful request is one billable item at $0.002; failed validation—including angles where tan(2x) is undefined—does not consume balance. The accepted input is any finite real number in radians for which cos(2x) is nonzero; the response returns sin_2x, cos_2x, tan_2x, double_angle, the identity formulas, and the method tag. Typical integrations include double-angle drill generators, answer-key verifiers, animation helpers that expand a doubled heading from a base orientation, and any floating-point pipeline that prefers explicit domain errors over silent infinities leaking into downstream JSON consumers.

Homework and drill verification

Students and graders confirm sin(2x), cos(2x), and tan(2x) for radian measures, including a clear invalid_input rejection when tan(2x) is undefined instead of a silent infinity.

Deterministic test fixtures

Pipelines that seed unit tests or interactive unit-circle demos can call a pure double-angle oracle instead of reimplementing the identities and the asymptote check in every language.

Rotation and animation math

Scripts that need sine, cosine, or tangent of a doubled heading recover stable, rounded floating-point values as structured JSON for shaders, logs, or UI without a computer-algebra dependency.

How do I evaluate double-angle identities with this API?

Send the required field angle, a finite number in radians, to math.double_angle_identities. The response returns sin_2x, cos_2x, tan_2x, the doubled angle, and the identity formulas used.

Read the full KIT documentation →