ForHosting KIT · Developer Utilities

Product-to-sum cosine calculator

The cosine product-to-sum calculator rewrites a product of two cosines as one half of the sum of two cosine terms.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter angles A and B in degrees or radians, and it applies cos(A) cos(B) = 1/2[cos(A - B) + cos(A + B)]. The response shows the original expression, the transformed expression, the sum and difference angles, and matching numerical values for both forms. It is useful for checking algebra, preparing integrals, simplifying trigonometric expressions, and understanding exactly where each term in the identity comes from.

Enter the two cosine angles

Start with an expression that is exactly a product of two cosine factors, such as cos(60°) cos(30°). Put the first angle in angle A and the second in angle B, then select degrees or radians for both. The calculator requires finite numeric angles because its purpose is to perform a precise transformation and return a checked value, not to guess how an unrestricted symbolic expression should be parsed. Negative angles and angles outside one revolution are valid; cosine is periodic, so there is no need to reduce them first. Keep both inputs in the same unit. For example, do not enter 60 as degrees and pi/6 as though it were a numeric radian value in the same request. If your source expression contains a coefficient outside the product, transform the cosine product here and multiply the entire returned right-hand side by that outside coefficient afterward. This keeps the identity application transparent and prevents a coefficient from being lost during manual work.

Read the product-to-sum transformation

The rule used is cos(A) cos(B) = 1/2[cos(A - B) + cos(A + B)]. The calculator first subtracts B from A for the difference angle, then adds A and B for the sum angle. It places those two angles into separate cosine terms and multiplies their sum by one half. Order matters only in the displayed difference: reversing A and B changes A - B to B - A, but cosine is even, so cos(B - A) equals cos(A - B) and the final value remains the same. The result includes a standard identity field as well as expressions with your actual numbers substituted. It also reports difference_angle and sum_angle separately, which makes it easier to audit signs before copying the expression into homework, a proof, or an integration step. Parentheses and the outer factor of one half are essential: the half multiplies the sum of both cosine terms, not merely the first term.

Verify the value and use the result

The original_value field evaluates cos(A) times cos(B) directly. The transformed_value field independently evaluates one half times the sum of cos(A - B) and cos(A + B). They should agree, apart from harmless floating-point rounding, because the transformation is an identity. Values are rounded to twelve decimal places so results such as a theoretical zero do not appear as tiny scientific-notation artifacts. The transformed form is especially useful when integrating products of trigonometric functions, because a sum of individual cosine terms is usually easier to integrate than a product. It also helps in Fourier analysis, signal calculations, and classroom exercises that ask you to rewrite rather than merely evaluate. Preserve the selected unit when using the combined angles elsewhere: the returned difference and sum are expressed in the same unit as the inputs. If you need an exact symbolic form involving pi, use the displayed identity as the algebraic template; this calculator intentionally evaluates finite numeric angles rather than accepting symbolic constants or variables.

Prepare a trigonometric integral

Rewrite a cosine product as a sum before integrating each cosine term separately.

Check an identity exercise

Compare the substituted expression and both numerical values to catch sign or half-factor mistakes.

Analyze combined frequencies

Expose the difference-frequency and sum-frequency cosine components produced by two angles.

What identity does the calculator use?

It uses cos(A) cos(B) = 1/2[cos(A - B) + cos(A + B)].

Can I use degrees and radians?

Yes. Select deg or rad, and use that same unit for both input angles.

Why are original_value and transformed_value both returned?

They evaluate the two forms independently, providing a numerical check that the transformation was applied correctly.

Does it accept variables or expressions containing pi?

No. Inputs must be finite numeric angles. The returned identity still provides the template for symbolic work.

What does the API request cost?

The API base price is $0.002 per request. The browser calculator is free to run on this page.

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/trig/product-to-sum-coscos

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/trig/product-to-sum-coscos \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"angle_a":60,"angle_b":30}'
{
  "angle_a": 60,
  "angle_b": 30
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "trig.product_to_sum_coscos",
  "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.

Read the full KIT documentation →