AngouriMath

Navigation

← Back to list of members

SymbolicFormOfCosine​(AngouriMath.​Entity)

 Method (no overloads)

Summary

Finds the symbolic form of cosine, if can
For example, cos(9/14) is cos(1/2 + 1/7) which
can be expanded as a cosine of sum and hence
an analytical (symbolic) form.

Parameter "angle"

The angle in radians

Returns

The cosine's symbolic form
or null if cannot find it

Example

using System;
using static AngouriMath.MathS.Compute;
using static AngouriMath.MathS;

Console.WriteLine(SymbolicFormOfSine(pi / 3));
Console.WriteLine(SymbolicFormOfSine(pi / 7));
Console.WriteLine(SymbolicFormOfSine(9 * pi / 14));
Console.WriteLine("------------------------------");
Console.WriteLine(SymbolicFormOfCosine(pi / 3));
Console.WriteLine(SymbolicFormOfCosine(pi / 7));
Console.WriteLine(SymbolicFormOfCosine(9 * pi / 14));

Prints
sqrt(3) / 2
sqrt(1/2 - 1/2 * sqrt(1 - sqrt(1 - (1/6 * (-1 + ((7 + 21 * sqrt(-3)) / 2) ^ (1/3) + ((7 - 21 * sqrt(-3)) / 2) ^ (1/3))) ^ 2) ^ 2))
sqrt(1 - sqrt(1/2 - 1/2 * sqrt(1 - sqrt(1 - (1/6 * (-1 + ((7 + 21 * sqrt(-3)) / 2) ^ (1/3) + ((7 - 21 * sqrt(-3)) / 2) ^ (1/3))) ^ 2) ^ 2)) ^ 2)
------------------------------
1/2
sqrt(1 - sqrt(1/2 - 1/2 * sqrt(1 - sqrt(1 - (1/6 * (-1 + ((7 + 21 * sqrt(-3)) / 2) ^ (1/3) + ((7 - 21 * sqrt(-3)) / 2) ^ (1/3))) ^ 2) ^ 2)) ^ 2)
-sqrt(1/2 - 1/2 * sqrt(1 - sqrt(1 - (1/6 * (-1 + ((7 + 21 * sqrt(-3)) / 2) ^ (1/3) + ((7 - 21 * sqrt(-3)) / 2) ^ (1/3))) ^ 2) ^ 2))

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1534 pages online