62

In school, we just started learning about trigonometry, and I was wondering: is there a way to find the sine, cosine, tangent, cosecant, secant, and cotangent of a single angle without using a calculator?

Sometimes I don't feel right when I can't do things out myself and let a machine do it when I can't.

Or, if you could redirect me to a place that explains how to do it, please do so.

My dad said there isn't, but I just had to make sure.

Thanks.

Jam
  • 10,325
  • 9
    Yes. When I was in school, we used lookup tables known as log books. – copper.hat Sep 22 '13 at 20:53
  • 1
    Some angles are easy to get an exact answer, some are not. All can be approximated by their Taylor Polynomials though... – Jemmy Sep 22 '13 at 20:53
  • 1
    Depends. Do you want to find, say $\sin (\pi/3)$ without a calculator? Because that's easy. For that matter, you can certainly find $\sin \left ( \frac{a}{b} \pi \right)$ without a calculator. But it's often painful. – davidlowryduda Sep 22 '13 at 20:53
  • 4
    You can always work out an answer, or a close approximation, it just depends on how much time and energy you have. The calculator works out approximations (good ones, of course) for many angles. – copper.hat Sep 22 '13 at 20:54
  • 1
    Got a good measuring device (of length & angle)? Draw yourself a right triangle with the given angle. – Karl Kroningfeld Sep 22 '13 at 20:56
  • 1
    Have a look at http://math.stackexchange.com/questions/395600/how-does-a-calculator-calculate-the-sine-cosine-tangent-using-just-a-number. – copper.hat Sep 22 '13 at 21:06
  • 1
    I don't have an exact answer, but I know where you can find it. In ancient India where the sine and cosine functions were invented. They did the calculation based on arc length. I'm assuming since it is the oldest way of doing trig that it must have also been the simplest. I don't know where you can get access to the method, but that is probably the best way to go about it. – Neil Apr 10 '15 at 21:36
  • 1
    If you accept approximation, you can simply project on the horizontal side of a protractor (using a large rule or a set-square). – Fabrice NEYRET Oct 10 '15 at 17:42
  • 8
    If there weren't a way to evaluate trig functions without a calculator, then how would anyone be able to program the calculators? – Dan Oct 18 '15 at 17:43
  • 4
    "My dad said there isn't" Superstitions like this amaze me. Obviously there were trigonometric tables before there were calculators, and obviously calculators were created by humans, who could not have created them without knowing some way to compute the functions that they compute. – Michael Hardy Aug 06 '20 at 23:48
  • 1
    @MichaelHardy It's interesting looking back. I was twelve when I asked this (don't ask about the age restriction; I didn't know about it then). Now I know that my dad definitely does know about Taylor series through a standard engineering college education, so I'm assuming his answer was some kind of simplification, or I misunderstood his response. To your and Dan's point however, I might have believed that a lookup table could have been created (empirically) and perhaps the calculator used some sort of interpolation. – Jonathan Lam Sep 27 '21 at 19:31
  • 1
    @JonathanLam : I've added another answer below. Power series are definitely not the only method. – Michael Hardy Sep 28 '21 at 17:02
  • @JonathanLam The lookup table + interpolation is actually used in practical applications like computer graphics an such. As using power series is too slow for practical purposes. – ScienceDiscoverer Dec 01 '23 at 07:10

8 Answers8

60

Congratulations! You've stumbled in to a very interesting question!

In higher mathematics, we often notice that some things which are really easy to talk about but difficult to express rigorously have a property which is really easy to express rigorously but something that we probably wouldn't have thought of to begin with.

The trig functions are one of these things. With (a lot of) effort, you can show that

$$\sin x = x - \frac{x^3}{6} + \frac{x^5}{120} - \frac{x^7}{5040} + \frac{x^9}{362880} - \cdots $$

where the patterns of increasing the powers of $x$ by $2$, and switching between $+$ and $-$ signs continues forever. (The denominators also have a pattern: take the power that $x$ is raised to in the term and multiply it by all of the smaller numbers down to $1$; that is the number in the denominator). Note that you have to use radians for this exact formula to work; of course you could come up with one for degrees as well.

When you start realizing that circles are actually quite tricky objects to define, formulas like that one start to look more appealing. I have had multiple mathematics textbooks take this infinitely long expression as the definition of the sine function. (It turns out to be the same thing as the circle definition, but… well, circles get complicated.)

Of course, we can't sit around multiply and add for the rest of our lives just to compute sin $1$, but we can just cut off the operations after a couple terms. If you go out to the $x^7$ term, you can guarantee that your answer is accurate to at least 3 decimal places as long as you use angles between $-\frac{\pi}{2}$ and $\frac\pi 2$. (These are the only angles you really need, if you get rid of multiples of $\pi$ properly.)

The cosine formula, in case you are interested, is similar: $$\cos x = 1 - \frac{x^2}{2} + \frac{x^4}{24} - \frac{x^6}{720}+ \frac{x^8}{40320}-\cdots$$

The internet has formulas for the other trig functions, but you can always just combine these.

As copper.hat says, there are also these large books where people did the calculations once and wrote them down so that nobody would have to do them again. Of course, these were made long before computers existed; nobody makes them anymore! But somebody from your parents' or grandparents' generation probably still has one sitting in their house.

Eric Stucky
  • 12,758
  • 3
  • 38
  • 69
  • 1
    I have a log book on my shelves. They were supplied at public examinations (intermediate & leaving certificate, and matriculation exams back then) in Ireland. The also included many useful mensuration formulae & trigonometric identities, which were a boon for those like myself that have difficult committing such things to memory! – copper.hat Sep 23 '13 at 01:29
  • 1
    And lots and lots more lovely expansions at the DLMF. This book is the successor to the well-beloved Abramowitz and Stegun, which included expansions such as this as well as log and other tables. – Norman Gray Apr 09 '15 at 23:37
  • 1
    Well, close enough to zero. But ok, with order 8 and playing symetries, it's working. – Fabrice NEYRET Oct 10 '15 at 17:40
  • 1
    @FabriceNEYRET: I think you might have posted this in the wrong thread. (What are you saying is zero?) – Eric Stucky Oct 11 '15 at 01:19
  • 1
    A Taylor series around zero is good not too far to zero or you have to use very high level polynomials that get unconvenient for manual computation. – Fabrice NEYRET Oct 11 '15 at 07:15
  • 1
    Ah, okay. I didn't give any technical details, but some hint as to the usability of the approximation, in the paragraph before the cosine formula. – Eric Stucky Oct 11 '15 at 07:37
  • 1
    @EricStucky Strange to think that this question was asked before I was in high school and now I've finally learned what Taylor Series are in calculus. I've been looking forward to this for a long time! – Jonathan Lam Apr 23 '18 at 03:06
  • 1
    Awesome... I've always hated hearing "and now just plug this into the sin function on your calculator." I wish more instructors would just show the first couple expressions of the summation so you can get a better idea on what the calculator is doing at that step. – ThinkingInBits Jan 24 '19 at 12:31
  • 1
    I am inclined to disbelieve this answer. If you're creating a table and you're computing $\sin19^\circ$ to enter it into the table, you would have us believe that you find $19\pi/180$ to a sufficient number of decimal places and then put that into the power series and crunch the numbers, and that that is a sufficiently efficient way to do it that that is how it's done in practice. This seems like a naive purist's answer. – Michael Hardy Aug 06 '20 at 23:52
  • 1
    We have three equivalent definitions for $\sin(x)$, as series, as infinite product and as inversion of an integral: $$\sin(x)=\sum_{n=0}^{\infty}\frac{(-1)^nx^{2n+1}}{(2n+1)!}=\prod_{n=1}^{\infty}\left(1-(\frac{x}{n\pi})^{2n}\right)\ x=\int_0^{\sin(x)}\frac{dt}{\sqrt{1-t^2}}$$ – Piquito Nov 05 '22 at 14:09
20

Use Taylor Series:

$$\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} + \cdots = \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n+1)!} x^{2n+1}$$

$$\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} + \cdots = \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n)!} x^{2n}$$

For others you can look here

Stefan4024
  • 35,843
12

Tailored Taylor

You can use Taylor but first you need to pack your angle into the region $x_1=0,2\pi$. simply by $x \mod 2\pi$

Once you are there if $x_1>\pi$ take the result as $\sin(x_1)=-\sin(x_1 - \pi)$ reducing it to $x_2=0,\pi.$

Now if $x_2>\frac{\pi}{2}$ calculate the result as $\sin(x_2)=\sin(\pi-x_2)$.

So all this above is easily shifting it all to $x_3=0,\frac{\pi}{2}$

If needed use further

$$ \sin(x)=2\sin(\frac{x}{2})\cos(\frac{x}{2})$$

with

$$ \cos(\frac{x}{2})=\sqrt{1-\sin(\frac{x}{2})^2}$$

in case $x_3>1.$

All this is making the Taylor expansion much more accurate within a lesser number of steps as $x^n$ in it for $x<1$ will rapidly go to $0$ besides the help from factorial. Next you represent Taylor series of $\sin(x)$ in a much more handy way

$$\sin(x)=x(1-\frac{x^2}{3 \cdot 2}(1-\frac{x^2}{5 \cdot 4}(1-\frac{x^2}{7 \cdot 6}(…$$

Notice that $x^2$ is repeating. So choose $k$ as big as you are willing to calculate and have

$$f(0)=1-\frac{x^2}{(2k+1) \cdot 2k}$$ $$f(n)=1-\frac{x^2}{(2(k-n)+1) \cdot 2(k-n)}f(n-1)$$

Finally

$$\sin(x)=xf(k-1)$$

Binary ladders

For this method as well you need to bring the angle as much down as you can as explained above.

If you do not want to deal with division, otherwise you can use $\tan(x)$, the task is possible with multiplication only. Take the small $m$ and

$$ \sin(m)\approx m = x_0$$ $$\cos(m) \approx 1-\frac{m^2}{2} = y_0$$

Then have:

$$M_{2^0} = \begin{bmatrix}y_0 & x_0 \\-x_0 & y_0 \end{bmatrix}$$

$$M_{2^{k+1}} = (M_{2^{k}})^{2}$$

this is just based on duplication formula for $\sin(x)$ and $\cos(x)$

Now it is up to you what small $m$ you will use as a reference. It can be for example $\frac{1}{2^{10}}$ or $0.00001$ or any other small number. Smaller it is, a better precision you have.

Now you find the integer $n$ so that $nm \leq x < (n+1)m$

The game can start.

Write $n$ in binary expansion.

$$\sum_{d=1}^{m}{2^{k_d} } = n$$

Using

$$\sin(x+y)=\sin(x)\cos(y)+\cos(x)\sin(y) $$

$$\cos(x+y)=\cos(x)\cos(y)-\sin(x)\sin(y)$$

which is in our case

$$\begin{bmatrix}y_p & x_p \\-x_p & y_p \end{bmatrix} \displaystyle \begin{bmatrix}y_q & x_q \\-x_q & y_q \end{bmatrix}$$

since we are dealing with evaluation of $\sin(x), \cos(x)$ all the time you additionally multiply

$$M_{2^{k_1}}M_{2^{k_2}} … M_{2^{k_m}}$$

where

$$\sum_{d=1}^{m}{2^{k_d} } = n$$

  • To this very interesting answer I'd like to add that the technique illustrated can also be seen as using complex numbers, because matrices such as $M_{2^0}$ are equivalent to $y_0 - \mathrm{i}\ x_0$ under multiplication, addition, and so on. See for example this answer. – pglpm Feb 10 '21 at 09:21
6

Bhaskara's approximation (Wikipedia) gives an approximation for $\sin x^\circ$ with less than $0.0016$ error for $0\leq x \leq 180$.

$$\sin x^\circ \approx \frac{4 x (180-x)}{40500 - x(180-x)}$$

The red curve is the approximation, barely seen:

enter image description here

Here's the difference between the formula and the sin function (maximum at x=11.544):

enter image description here

MCCCS
  • 1,625
  • This formula is amazing. To me, "without a calculator" means I need to compute by hand. The error is less than 0.001630. The answer computed is the same for rounding up to 2 decimal spaces. For Taylor's Series up to first 3 terms, the error is less than 0.004525. So I think the approximation of this formula is quite well and it is acceptable. Moreover, I have tried using this formula to compute some values for sine function by hand and also using computer to check the error and answer. And I like this formula more than Taylor's Series since it is easier and fast to compute by hand. – Tim Jul 04 '23 at 05:46
2

Approximate the Taylor series. In Taylor series we have to use the angle in radians and by converting it into degrees and by making some approximations we can get a simple formulas like $\sin X = 0.017*X$ for $X<33$ degrees and $\sin X = 0.016*X$ for $33 < X < 45$

$\cos X=1-0.000145 X^2$ for $X<45$ degrees

By using these two formulas we can calculate any sin and cos functions for any degrees by using methods $\sin(90+X)$ ,$\sin(90-X)$, $\cos(270+X)$ like...

which will give minimum 98% accuracy.

Jam
  • 10,325
2

Long before there were power series, in the second century A.D., Ptolemy, a man who wrote in Greek and probably lived in Alexandria, created a table of values of what amounts to the sine function.

See this page.

Chapter 10 of Book I of the ''Almagest'' presents geometric theorems used for computing chords. Ptolemy used geometric reasoning based on Proposition 10 of Book XIII of Euclid's Elements to find the chords of $72^\circ$ and $36^\circ.$ That Proposition states that if an equilateral pentagon is inscribed in a circle, then the area of the square on the side of the pentagon equals the sum of the areas of the squares on the sides of the hexagon and the decagon inscribed in the same circle.

He used Ptolemy's theorem on quadrilaterals inscribed in a circle to derive formulas for the chord of a half-arc, the chord of the sum of two arcs, and the chord of a difference of two arcs. The theorem states that for a quadrilateral inscribed in a circle, the product of the lengths of the diagonals equals the sum of the products of the two pairs of lengths of opposite sides. The derivations of trigonometric identities rely on a cyclic quadrilateral in which one side is a diameter of the circle.

To find the chords of arcs of $1^\circ$ and $\left(\tfrac 1 2\right)^\circ$ he used approximations based on Aristarchus's inequality. The inequality states that for arcs $\alpha$ and $\beta,$ if $0<\beta<\alpha<90^\circ,$ then $$ \frac{\sin \alpha}{\sin \beta} < \frac\alpha\beta < \frac{\tan\alpha}{\tan\beta}.$$

Ptolemy showed that for arcs of $1^\circ$ and $\left(\tfrac 1 2 \right)^\circ,$ the approximations correctly give the first two sexigesimal places after the integer part.

2

The wikipedia article gives some infinite series, which are probably what your calculator uses. The formulae for sine and cosine are the ones to focus on first. They converge very quickly, but you have to realise that the angles are measured in radians, where $2\pi$ radians $=360^{\circ}$. If you do the conversion, you'll be able to calculate quite quickly for yourself.

There are connections to a lot of beautiful and clever maths to be discovered, which explain why all this works. You have asked a great question. Keep going with the answer - there are more dimensions to it than you will see on the surface.

Mark Bennet
  • 100,194
1

I like continued fractions. For example, if x is in (-pi/2, pi/2), as mentioned above for power series,

sin(x) = x/1+ x^2/6+ x^2, which matches the first 8 terms of the Taylor series given above.

tan(x) = x/1- x^2/3- x^2/5- x^2/7. This also matches the first 8 terms of the Taylor series for tan(x).

These can be easily converted into rational functions (a polynomial divided by another polynomial) so that only one division is required.

Continued fractions are always worth a try because often, when they match the first few terms of the power series, the remaining terms of their power series are very close to those of the desired function. That is way better than setting those terms to zero, as when you truncate the power series.

Use of a calculator with CAS is extremely helpful in converting power series into continued fractions. Mine is an HP-Prime.