4 Answers
4

Please note that == (Equal) should be used instead of a single equal sign (Set). More complicated trig identities can be difficult to reason about. Mathematica may not be able to properly determine whether they are true or not. You can still ask for Mathematica's opinion in these cases however.

If the identity is very difficult, you may consider using PossibleZeroQ :

PossibleZeroQ[Sin[x] - Tan[x] Cos[x]]

Instead of equating the left hand side with the right hand side, subtract them. Then give these expression to PossibleZeroQ. PossibleZeroQ tests whether it is likely that a given expression is equal to 0.

If you believe the identity is false but would like an example, you can get this using FindInstance. Here, we ask Mathematica to find an instance where Sin[x] does not equal (!=) Tan[x] Cos[x]:

FindInstance[Sin[x] != Tan[x] Cos[x], x]

Mathematica doesn't return any answer. This makes sense because both sides are equal.

There is no best general way to check if any two trigonometric expressions are equal. One can use TrigReduce, TrigExpand, TrigFactor, TrigToExp, Together and Apart (especially with the Trig->True option), Simplify, FullSimplify, etc. All these functions have their advantages and we discuss some of them. For more complicated examples when using Simplify and FullSimplify we can encounter problems with timings and/or memory allocation, we give an appropriate example later.

In case of your example I recommend to evaluate TrigReduce on the difference of the both expressions.

Sometimes you needn't use any simplifications, and quite inevident expressions are simplified automatically by built-in rewrite rules.

First we consider a few examples where no Mathematica functions are needed.

I'd use Abs but +1 this is how I think too (not sure that's good, but...)
–
aclJun 26 '12 at 14:34

@acl Abs does not return an analytical solution (in the 10 min I left it to run) for your example. This is why I used ^2
–
AjasjaJun 27 '12 at 7:29

1

I'd also do that numerically with NIntegrate to start with (and Quiet it to avoid complaints if it is zero). I don't trust mathematica to work reliably with analytical expressions (as in, I don't trust it to finish or choose the branches I want etc), so I almost never use it for that.
–
aclJun 27 '12 at 9:56

Mathematica is a registered trademark of Wolfram Research, Inc. While the mark is used herein with the limited permission of Wolfram Research, Stack Exchange and this site disclaim all affiliation therewith.