TrigFactor[expr]
factors trigonometric functions in expr.
TrigFactor
TrigFactor[expr]
factors trigonometric functions in expr.
Details
- TrigFactor operates on both circular and hyperbolic functions.
- TrigFactor splits up sums and integer multiples that appear in arguments of trigonometric functions, and then factors resulting polynomials in trigonometric functions, using trigonometric identities when possible.
- TrigFactor automatically threads over lists, as well as equations, inequalities, and logic functions.
Examples
open all close allBasic Examples (3)
Factor a trigonometric expression into a product of terms:
TrigFactor[Sin[x] ^ 2 + Tan[x] ^ 2]Factor a hyperbolic trigonometric expression:
TrigFactor[Cosh[x] ^ 2 - Cosh[x] ^ 4]Factor trigonometric expressions of several variables:
TrigFactor[Sin[x + y] ^ 2 + Tan[x + y]]Scope (6)
Factor a univariate trigonometric expression:
TrigFactor[Sin[x] ^ 2 - Cos[x] ^ 2]Factor a multivariate trigonometric expression:
TrigFactor[Cos[x + y] + Sin[x]Sin[y]]Factor a hyperbolic trigonometric expression:
TrigFactor[Cosh[x] ^ 2 - Cosh[x] ^ 4]Factor a rational combination of trigonometric functions:
TrigFactor[Cosh[x + y] / (Sin[x] ^ 2 - Cos[x] ^ 2) + 1 / Sinh[x]]TrigFactor threads over lists:
TrigFactor[{Sin[x] + Cos[x], Sinh[x] ^ 2 + Tanh[x] ^ 2}]TrigFactor threads over equations and inequalities:
TrigFactor[1 < Cos[x] + Cos[y] < 2]Applications (2)
Solve a trigonometric polynomial equation:
TrigFactor[Cos[x]^3 + 3 Cos[x]^2 Sin[x] + 3 Cos[x] Sin[x]^2 + Sin[x]^3 == 2]Reduce it to elementary trigonometric equations:
Reduce[%, Sin[Pi / 4 + x]]Detect common roots of trigonometric polynomials:
p = Sin[x] ^ 2 + Tan[x] ^ 2;
q = -2Cos[x] ^ 2 + Sin[2x] ^ 2 / 4;TrigFactor[p]TrigFactor[q]Common roots of
and
are the roots of
:
Solve[3 + Cos[2 x] == 0, x]Using the original polynomials yields a more complicated result:
Solve[p == 0 && q == 0, x]To show that the root sets are equal, it suffices to check within one period:
FunctionPeriod[{p, q}, x]Solve[3 + Cos[2 x] == 0 && 0 ≤ Re[x] < Pi, x]Solve[p == 0 && q == 0 && 0 ≤ Re[x] < Pi, x]FullSimplify[TrigToExp[(x /. %%) - (x /. %)]]Properties & Relations (2)
Compare TrigExpand, TrigReduce, and TrigFactor on the same expression:
TrigFactor[Sin[x] ^ 2 + Tan[x] ^ 2]TrigExpand[Sin[x] ^ 2 + Tan[x] ^ 2]TrigReduce[Sin[x] ^ 2 + Tan[x] ^ 2]TrigFactor threads element‐wise over lists, inequalities, equations, and logical operations:
TrigFactor[Sin[x] + Cos[x] == 0]Possible Issues (1)
A trigonometric expression can be factored in many different ways:
TrigFactor[Sin[2x] + 2Cos[x]]ExpToTrig[Factor[TrigToExp[Sin[2x] + 2Cos[x]] /. x -> I Log[t]] /. t -> E ^ (-I x)]Simplify[%% - %]2Sin[x] + 3Cos[x] /. (a_.)Sin[x_] + (b_.)Cos[x_] /; Positive[a] && Positive[b] :> Sqrt[a ^ 2 + b ^ 2]Cos[x - ArcCos[b / Sqrt[a ^ 2 + b ^ 2]]]Simplify[% - (2Sin[x] + 3Cos[x])]See Also
TrigExpand TrigReduce TrigToExp Factor Simplify FullSimplify
Function Repository: TrigContract
Related Guides
Related Links
History
Introduced in 1996 (3.0) | Updated in 2007 (6.0)
Text
Wolfram Research (1996), TrigFactor, Wolfram Language function, https://reference.wolfram.com/language/ref/TrigFactor.html (updated 2007).
CMS
Wolfram Language. 1996. "TrigFactor." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/TrigFactor.html.
APA
Wolfram Language. (1996). TrigFactor. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TrigFactor.html
BibTeX
@misc{reference.wolfram_2026_trigfactor, author="Wolfram Research", title="{TrigFactor}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/TrigFactor.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_trigfactor, organization={Wolfram Research}, title={TrigFactor}, year={2007}, url={https://reference.wolfram.com/language/ref/TrigFactor.html}, note=[Accessed: 13-June-2026]}