# How many points to prove a trigonometric identity?

I am taking a trigonometric identity from another post, arbitrarily.

$$\frac{2\sec\theta +3\tan\theta+5\sin\theta-7\cos\theta+5}{2\tan\theta +3\sec\theta+5\cos\theta+7\sin\theta+8}=\frac{1-\cos\theta}{\sin\theta}.$$

Besides the usual approach by reworking/simplifying the expressions using elementary identities, one could use a "lazy" approach, by evaluating both members for several $\theta$ and checking equality.

This works for polynomials, if you probe them at $d+1$ points, where $d$ is the degree.

Can we derive general rules about the number of equalities required to guarantee that trigonometric expressions of a certain complexity are indeed identical ?

• You might be led to believe that $sin (2x) = sin(x)$ for all $x$ if you only tested it at multiples of $\pi$. – bilaterus Apr 12 '16 at 17:52
• @bilaterus: yep, that belongs to the "general rules": the values may not be a period apart. – Yves Daoust Apr 12 '16 at 17:53
• Would you choose only numbers where you could evaluate the expression exactly, or would you use approximate floating-point calculations? – Jeppe Stig Nielsen Apr 12 '16 at 17:55
• In this case, all the trig functions can be expressed in terms of $\exp{i \theta}$ and so both sides are rational functions of $\exp{i \theta}$; thus it should be possible to reduce this to a question about polynomials. – Michael Lugo Apr 12 '16 at 17:56
• @JeppeStigNielsen: a theorician would prefer the first, a practitioner the second. – Yves Daoust Apr 12 '16 at 17:56

## 1 Answer

If the numerator and denominator of an trigonometric expression (supposed to equal $0$) are trigonometric polynomials of degree at most $k$ then the fraction is a rational function of $u = \exp(i \theta)$ of degree at most $2k$, and $4k+1$ distinct angles would be needed.

This matches the number of coefficients (minus 1 for scaling) needed to write a ratio of two trigonometric polynomials.

I don't see how one could make exact comparison of the values at so many distinct points without having a separate proof of the identity. For numerical evaluation the question of accuracy needed is similar to that for rational functions of the same degree and size of coefficients, but maybe there is some simplification from knowing $|u|=1$.

• Is there any theory about the required accuracy ? I guess that in normal circumstances, taking random values (a little more than required) would be safe. – Yves Daoust Apr 12 '16 at 18:03
• Approximation theory, especially capacity theory, of rational functions. – zyx Apr 12 '16 at 18:13
• Indeed, many exact values are known (maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/…) but they are often made of nested radicals, and processing them might require a similar of larger effort than direct proving. – Yves Daoust Apr 13 '16 at 7:16