= Solution
Expand $(\cos\theta+i\sin\theta)^4$ using <De Moivre's theorem>, then divide its imaginary and real parts by $\cos^4\theta$. With $u=\tan\theta$, this gives
$$
\boxed{\tan4\theta=\frac{4u-4u^3}{1-6u^2+u^4}.}
$$
The quotient holds where its denominator and $\cos\theta$ are nonzero. At $\theta=\pi/8$, use the undivided real-part identity: $\cos4\theta=0$ implies $u^4-6u^2+1=0$. Thus $u^2=3\pm2\sqrt2$. Since $0<\tan(\pi/8)<1$, the smaller positive value applies:
$$
\boxed{\tan22.5^\circ=\sqrt{3-2\sqrt2}=\sqrt2-1.}
$$
This limiting step avoids treating an undefined value of $\tan4\theta$ as an ordinary finite number.
Back to article page