# Is there a way to get trig functions without a calculator?

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.

• Yes. When I was in school, we used lookup tables known as log books. Sep 22, 2013 at 20:53
• Some angles are easy to get an exact answer, some are not. All can be approximated by their Taylor Polynomials though... Sep 22, 2013 at 20:53
• 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. Sep 22, 2013 at 20:54
• 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, 2015 at 17:43
• "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. Aug 6, 2020 at 23:48

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.

• 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! Sep 23, 2013 at 1:29
• 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. Apr 9, 2015 at 23:37
• Well, close enough to zero. But ok, with order 8 and playing symetries, it's working. Oct 10, 2015 at 17:40
• @FabriceNEYRET: I think you might have posted this in the wrong thread. (What are you saying is zero?) Oct 11, 2015 at 1:19
• 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. Oct 11, 2015 at 7:15

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

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)$$

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. Feb 10, 2021 at 9:21

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:

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

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.

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.

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.

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.

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.