Why does $\sin(45)=\frac{\sqrt2}{2}$ when $45^{\circ}= \frac{\pi}{4}$ radians?

Typically, when computing inverse trig functions, people switch to arctangent: instead of $\arcsin \frac45$, compute $\arctan \frac43$. I'm not entirely sure why; maybe we don't like factorials?

There is a reasonably easy to remember Taylor series for arctangent: $$\arctan x = x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + \cdots.$$ This converges quickly when $x$ is small, and badly or not at all when $x$ is large. So our first step is to switch to $\arctan \frac34$ instead of computing $\arctan \frac43$: this will give us the complementary angle, the one that's approximately $37^\circ$ instead of the one that's approximately $53^\circ$.

But the series for $\arctan \frac34$ doesn't converge particularly quickly either: if we take $\frac34 - \frac{(3/4)^3}{3} + \frac{(3/4)^5}{5} - \frac{(3/4)^7}{7}$, we get $0.6377\dots$, which isn't very close to $\arctan \frac34 = 0.6435\dots$.

To speed things up, we try to make clever use of the identity $$\arctan x + \arctan y = \arctan \frac{x + y}{1 - xy}.$$ Specifically, if we want to compute $\arctan x$, we try to pick $y$ such that both $y$ and $\frac{x+y}{1-xy}$ are smaller than $x$.

In the case of the angles for Pythagorean triples, there is a built-in special case of this identity that makes our lives easier: in an $(a,b,c)$ right triangle, $$\arctan \frac ab = 2 \arctan \frac{c-b}{a}.$$ So instead of computing $\arctan \frac34$, we can compute $2 \arctan \frac13$ instead.

This works much better: even with just the first $3$ terms, we get $$2 \left(\frac13 - \frac{(1/3)^3}{3} + \frac{(1/3)^5}{5}\right) = \frac{782}{1215} \approx 0.6436\dots$$ which gets us three correct decimal digits and most of the way to a fourth.


Even better, when you want to compute $\arctan x$, is to approximate $x$ by a close but simpler $y$, and use a variant of the identity above: $$\arctan x = \arctan y + \arctan \frac{x-y}{1+xy}.$$ In the case of $\arctan \frac34$, we can approximate $\frac34$ by $1$, and get $$\arctan \frac34 = \arctan 1 + \arctan \frac{\frac34 - 1}{1 + \frac34 \cdot 1} = \frac\pi4 - \arctan \frac17.$$ Assuming you know lots of digits of $\pi$, we now have $$\arctan \frac34 \approx \frac\pi4 - \frac17 + \frac{(1/7)^3}{3} = 0.64351\dots$$ which is four digits of accuracy, after only two terms of the Taylor series!