Q:

How calculators do trigonometry

I need to use a calculator to find trigonometric ratios like $\sin(41),\cos(32)$.
How do calculators work for trigonometry? Also, as calculators are invented by the human mind can we do it mentally? Is there any binary trick or something like that?

A:

Here is a page on the TI-Knowledge base asserting that TI calculators use a well established algorithm called the CORDIC algorithm. This algorithm is well described on Wikipedia and in a great paper from the College Math Journal.
To be clear, while Taylor series (referred to in all the previous answers) are very important in numerical analysis they are not the tool of choice for computation of trig functions at arbitrary values.

A:

Generally speaking, for routines that are used over and over like those for trig functions, calculators and computers have a table of precomputed values and use those to generate other values. The details of this depend on the problem. A common scheme is to use polynomial interpolation or piecewise polynomial interpolation of computed values of the desired functions. The CORDIC algorithm is often used for trig functions in particular, and it does something else, which is nicely discussed in the Wikipedia article. Maybe this is of interest to you, but I always find it a bit unsatisfying when I get these answers, because they usually don't say where the precomputed values came from.
Here is a simple algorithm for computing $\sin$ with little precomputing required. It's based on Taylor approximation. To make it work, you need to already know $\pi$, and you also need to precompute the number of Taylor terms that will be used. The latter is discussed below.
First we'll use some basic trigonometric identities to reduce to a function sin1 which is restricted to the first quadrant. (This is written in Matlab syntax.)
function y=mysin(x)
z=mod(x,2*pi);
if 3*pi/2<=z
  y=-sin1(2*pi-z);
elseif pi<=z
  y=-sin1(z-pi);
elseif pi/2<=z
  y=sin1(pi-z);
else
  y=sin1(z);
end

Now we will reduce that to the first half of the first quadrant. We can do that by just computing cosine after reflecting through the line $y=x$.
function y=sin1(x)
if x>pi/4
  y=cos1(pi/2-x);
  return
end

So let's deal with the ones that didn't need to get reduced to cosine. Here Taylor's theorem tells us
$$\sin(x)=\sum_{n=0}^N \frac{(-1)^n x^{2n+1}}{(2n+1)!} + R_N$$
where $|R_N| \leq \frac{|x|^{2N+2}}{(2N+2)!}$. So we need to identify $N$ such that $\frac{|\pi/4|^{2N+2}}{(2N+2)!}<10^{-16}$ (around the usual error tolerance for IEEE double precision). Just directly checking some values reveals that it is enough to take $N=8$. So we can finish the second half of our "sin1" function like this:
n=0:8;
m=2*n+1;
y=sum((-1).^n.*x.^(m)./factorial(m));

Then you can do basically the same thing to define cos1, to finish the overall problem:
function y=cos1(x)
n=0:8;
m=2*n;
y=sum((-1).^n.*x.^(m)./factorial(m));

Note that this can be made considerably more efficient without actually changing the mathematical character of it by precomputing the coefficients and evaluating the polynomial using Horner's method.
Note that not all the reductions that I did here were strictly necessary. We do need to reduce to one period (otherwise the method would need to dynamically choose $N$ and would be very slow for large arguments). But if we do that and don't reduce to the first quadrant, we can just raise $N$ to $20$. Alternately, we could just reduce to the first quadrant itself and stop, provided we raise $N$ to $11$. 
Also, I tested the above a little bit. It deviates a little bit from Matlab's sin function for large arguments; for instance sin(50000)= -0.999840189089790 and mysin(50000)= -0.999840189089824. The problem appears to be entirely caused by arithmetic error in the first step, since (within Matlab) sin(mod(50000,2*pi))==mysin(50000). Perhaps someone could comment on a good way to fix this?

A:

"and as calculators are invented by human mind can we do it mentally?" 
Oh, that's a big fallacy. It would probably take you your entire life to calculate what a modern arithmetic circuit can do in a second.
However, there are many ways to "calculate" (i.e. approximate with desired accuracy) trigonometric functions. One way would be linear approximation between lookup tables. Another way would be using the Taylor polynomial.
I'll show the Taylor way for your $\sin(41^\circ) = \sin(\pi \cdot 41/180)$ where $\pi \cdot 41/180$ is slightly smaller than $\pi/4$, so let's develop a first-order Taylor series of $\sin(x)$ about $x = \pi/4$:
\begin{align*}
\sin(x) &\approx \sin(\pi/4) + \left.\left( \frac{d}{dx} \sin(x) \right) \right|_{x=\pi/4} \cdot (x - \pi/4) \\
&= \sin(\pi/4) + \cos(\pi/4) \cdot (x - \pi/4) \\
&= 1/\sqrt{2} + 1/\sqrt{2} \cdot (x - \pi/4)
\end{align*}
In your case
\begin{align*}\sin(41^\circ) &= 1/\sqrt{2} + 1/\sqrt{2} \cdot \pi (41/180 - 45/180) \\
&= 1/\sqrt{2} - 1/\sqrt{2} \cdot \pi \ 4/180 \\
&= 0.6577
\end{align*}
The actual result is $0.6561$, so we are already very close. A calculator would probably use something like a ninth-order Taylor approximation and be extremely close.

