# A question about calculators (are $\sin^2 49^{\circ}$ and $\cos^2 49^{\circ}$ irrational?)

Are $(\sin 49^{\circ})^2$ and $(\cos 49^{\circ})^2$ irrational numbers?

When you enter, $(\sin 49^{\circ})^2$ in a calculator, it shows a long number (and if it is irrational, then clearly the calculator cannot calculate that number to the last digit. i.e., it gives you an approximate for $(\sin 49^{\circ})^2$).

Now save that number in the memory of the calculator, and then calculate $(\cos 49^{\circ})^2$. Now add these numbers up. You will get $1$.

But how this happens?

I am almost sure that the numbers $\sin^2 49^{\circ}$ and $\cos^2 49^{\circ}$ are irrational, and I don't know how does the calculator gives the exact $1$ when you add these up.

• Why are you asking about irrationality???? – quanta Apr 11 '11 at 10:38
• "Are these irrational, because if so, the calculator must discard some accuracy, so how come they still add up to 1?" – Rawling Apr 11 '11 at 10:52
• For any real number $\alpha$, $(\sin{\alpha})^2 + (\cos{\alpha})^2 = 1$. And if you know that and your only question is about calculator, then probably it rounds up and down somewhere so that's how they equal 1. – user5501 Apr 11 '11 at 11:04
• Since it hasn't been pointed out explicitly yet: two numbers can be irrational and still add up to 1. – Jesse Madnick Apr 11 '11 at 11:40
• Rawling, forget irrationality, A calculator can only hold 10 digits! – quanta Apr 11 '11 at 14:04

First, the way many scientific calculators work is to calculate more digits than they show, and then they round the value before displaying it. This happens even if you calculate something like $1/7 \times 7$. The calculator may believe the result is slightly lower than $1$, but the rounded number is $1$. You can test how many digits of precision your calculator uses by multiplying by $10^n$ and then subtracting the integer part. This will often reveal a few more digits.

Second, those are irrational numbers. Proving that takes some number theory. Let $\xi = \cos 1^\circ + i \sin 1^\circ$, a $360$th root of unity. $\xi$ is conjugate to $\xi^n$ for each $n$ coprime to $360$ including $\xi^{49} = \cos 49^\circ + i \sin 49^\circ$. The minimal polynomial of $\xi$ and $\xi^{49}$ has degree $\phi(360)=96$. If $\cos^2 49^\circ$ were rational, then $(\xi^{49} + \xi^{-49})^2$ would be rational, which would mean that $\xi^{49}$ satisfies a polynomial with rational coefficients of degree $4 \lt 96$. Similarly, $\sin^2 49^\circ = (\xi^{49} - \xi^{-49})^2/4$ is not rational.

• @Douglas, what is $\phi$? – mpiktas Apr 11 '11 at 11:21
• @mpiktas: It is Euler's totient function. – Zach Langley Apr 11 '11 at 11:24
• @quanta, yes, but reading the answer $\phi$ pops out of nowhere. If link is given for $\xi$, why not for $\phi$?. Note I am just nitpicking, I've upvoted the answer, I think it is very good. – mpiktas Apr 11 '11 at 14:35
• Actually, I think the main idea introduced in that sentence was "minimal polynomial," and it's not trivial to prove that the cyclotomic polynomials are irreducible. That's the hidden hard part of the proof. – Douglas Zare Apr 11 '11 at 15:11
• Could you please explain why "the minimal polynomial of $\xi$ and $\xi^{49}$ has degree $\phi(360)=96$"? – Hans Nov 26 '15 at 9:16

You only get 1 when you sum them because the calculator is rounding the values. BTW, these values are irrational. See Niven's Irrational Numbers for instance.

Most operations on irrational numbers can yield rationals (or even integers) if the irrationals are well chosen. Your example is one such, others are $\sqrt{2}$(-,*,/) $\sqrt{2}$. A calculator may or may not report the result as an integer-as others have said, these numbers (and most rationals, as well, irrationality doesn't come into it) cannot be represented exactly in the standard floating point representation. Keeping guard digits makes this work most of the time, but not always. I don't have my scientific calculator handy, but you could try $\cos(\theta)-1+\frac{\theta ^2}{2}$ compared with $\frac{\theta^4}{4!}$ for $\theta$ about $10^{-3}$ to $10^{-5}$. Subtracting nearly equal quantities is a good way to lose precision.

Maple gives me this for the irreducible polynomial satisfied by $\cos^2(49\pi/180)$ ... $$2 x^{25} - 3 x^{24} - 5 x^{23} + 5 x^{22} - 3 x^{21} - 6 x^{20} + 7 x^{19} - 9 x^{18} + 17 x^{17}- 8 x^{16} - 12 x^{15} + 2 x^{14} + 12 x^{13} + 10 x^{12} + 3 x^{11} - 5 x^{10} + 7 x^{9}+ 20 x^{8} + 12 x^{7} - 29 x^{6} + 12 x^{5} + 29 x^{3} + 5 x^{2} - 3 x - 2$$