Interesting approximations using trigonometry

Today on Twitter John D. Cook, writing as @AlgebraFact, posted the following tweet:

In radians, sin(11) is very nearly -1.

(It happens to be -0.9999902…)

I thought that was awesome! So, I (@divbyzero) replied that cos(333) is approximately 1. (It is 0.999961…)

Then @michiexile chimed in, pointing out that cos(355) is closer to -1 than cos(333) is to 1. (It is -0.9999999995…)

Finally, I countered with cos(103993), which is 0.9999999998…

So what’s going on here?

All of this comes from the continued fraction for \pi,

{\pi =3+\cfrac {1}{7+\cfrac {1}{15+\cfrac {1}{1+\cfrac {1}{292+\cfrac {1}{1+\cdots }}}}}}.

It is well known that the convergents of a continued fraction (i.e., the fraction you obtain by truncating a continued fraction at some point) are the best rational approximations for the number. The first ten convergents of {\pi } are

{3}, {\displaystyle \frac{22}{7}}, {\displaystyle \frac{333}{106}}, {\displaystyle \frac{355}{113}}, {\displaystyle \frac{103993}{33102}}, {\displaystyle \frac{104348}{33215}}, {\displaystyle \frac{208341}{66317}}, {\displaystyle \frac{312689}{99532}}, {\displaystyle \frac{833719}{265381}}, {\displaystyle \frac{1146408}{364913}}.

Notice that {\displaystyle \pi \approx \frac{22}{7}}, so {\displaystyle 11\approx \frac{7\pi }{2}}. Thus {\displaystyle \sin (11)\approx \sin \big (\frac{7\pi }{2}\big )=-1}. This was John D. Cook’s observation.

Similarly, {\displaystyle \pi \approx \frac{333}{106}}, so {\displaystyle 333\approx 106\pi }, and {\cos (333)\approx \cos (106\pi )=1}. The other two approximations come from the next two convergents.

After the conversation on Twitter, I started playing a little more.

First, I noticed that

{\tan (111)\approx \sqrt {3}}.

({\tan (111)-\sqrt {3}\approx -0.011\ldots })

This comes from the third convergent. Since {\displaystyle \pi \approx \frac{333}{106}} implies that {\displaystyle 111\approx 2\pi \cdot 17+\frac{4\pi }{3}}, {\displaystyle \tan (111)\approx \tan \big (2\pi \cdot 17+\frac{4\pi }{3}\big )=\tan \big (\frac{4\pi }{3}\big )=\sqrt {3}}.

Actually, we can do better than that:

-\tan(69447)\approx \sqrt{3}.

(-\tan(69447)-\sqrt{3}\approx-0.000011\ldots)

The approximation, \displaystyle \pi\approx\frac{208341}{66317} implies that \displaystyle 69447\approx 2\pi\cdot66317+\frac{5\pi}{3}, so  \displaystyle \tan(69447)\approx \tan\big(2\pi\cdot66317+\frac{5\pi}{3}\big)=\tan\big(\frac{5\pi}{3}\big)=-\sqrt{3}.

Next, I noticed that

{\sec (26087)\approx \sqrt {2}}.

({\sec (26087)-\sqrt {2}\approx -0.0000039\ldots })

This comes from {\displaystyle \pi \approx \frac{104348}{33215}}, which implies that {\displaystyle 26087\approx 2\pi \cdot 4151+\frac{7\pi }{4}}. Thus {\displaystyle \sec (26087)\approx \sec \big (2\pi \cdot 4151+\frac{7\pi }{4}\big )=\sec \big (\frac{7\pi }{4}\big )=\sqrt {2}}

Finally, I noticed that

{-\sec (26087)-\sec (95534)\approx \sqrt {6}}.

({-\sec (26087)-\sec (95534)-\sqrt {6}\approx 0.0000046\ldots })

In this case, {\displaystyle \pi \approx \frac{1146408}{364913}} gives {\displaystyle 95534\approx 2\pi \cdot 15204+\frac{17\pi }{12}}, and {\displaystyle \sec (95534)\approx \sec \big (2\pi \cdot 15204+\frac{17\pi }{12}\big )=\sec \big (\frac{17\pi }{12}\big )=-\sqrt {6}-\sqrt {2}}. We obtain the result by substituting the previous approximation for {\sqrt {2}}.

Of course, we also have

\sqrt{6}=\sqrt{2}\sqrt{3}\approx -\sec(26087)\tan(69447).

(-\sec(26087)\tan(69447)-\sqrt{6}=0.0000086\ldots)

14 Comments

  1. John says:

    That’s great! You really ran with this.

    One footnote: Good approximations to pi lead to great approximations to 1 when you take sines. Taylor series says sin(pi/2 + h) is approximately 1 – 0.5 h^2 for small h. So the error in the approximation for pi gets squared.

  2. John,
    Thanks for pointing that out. I did notice that some approximations were better than others, but hadn’t thought about why.

    Dave

  3. Nemo says:

    Reminds me of my favorite calculator trick.

    Set your calculator to degrees mode (NOT radians).

    Type in a bunch of 5’s: 555555, or whatever.

    Press “1/x”.

    Press “sin”.

    Examine the mantissa of the result. Magic!

    1. Excellent, I’d never seen that before! Good use of \sin x\approx x and the radians-to-degrees conversion. I’ll have to show that to my students.

  4. Walt says:

    Found a small typo in your typesetting: the CF of pi is 3; 7, 15, 1, 292 – you forgot the 1 after the 15 in your nested fraction.

    1. Wow, good eyes. Thank you for catching that. I updated the post.

  5. Awesome.. You guys really doing some good approximation and bringing some fun to it. How I wish Twitter had been there in my school days.

  6. Ragesh G R says:

    Hi, seems like you have done gross approximations.

    Tan 4pi/3 is no way near sec 4pi/3 . Same goes for 5pi/3. Unless i am missing something :)

    1. Thanks for catching the typos. They’re fixed now.

  7. batbrat says:

    I read through the post several times and discussed it with my friends. I am unable to understand why have you approximated tan(111) using sec(111) and tan(69447) using sec(69447).

    This is especially puzzling when I consider that computing sec(4*pi/3) in radians yields -2 and tan(4/3 * pi) is 1.7320! They aren’t even close! I’m utterly puzzled.

    I’d really appreciate some insight into your thought process.

    On an aside, I’d much appreciate it if you deleted my previous comment. I can’t really edit my comment, so I re-posted.

    1. Thanks for catching those typos.

      1. batbrat says:

        No problem. :)

Comments are closed.