A while back I was looking for an approximation to $\cos(x)$ and I constructed a polynomial with zeros in the same places as the first few zeros of $cos(x)$:
$$c_n(x) = \frac{\prod_{i=1}^n (x-(n-\frac12)\pi) (x-(\frac12-n)\pi)}{\text{normalising constant}}$$
The normalising constant is chosen so that $c_n(0) = 1$. I wrote a program to determine whether this approximation was any good, and was astonished to discover that in the limit of large $n$ it is exact! At least to the numerical accuracy I was using.
I found the same thing for a similar approximation to $\sin(x)$:
$$s_n(x) = \frac{x \prod_{i=1}^n (x-n\pi)(x+n\pi)}{\text{normalising constant}}$$
This time the normalising constant is chosen so that $s_n'(0) = 1$.
I also tried making an approximation to $\tan(x)$, by making a function that has poles in the same places as the first few poles of $\tan(x)$:
$$t_n(x) = \sum_{i=1}^n \left(\frac{1}{x-(n-\frac12)\pi} + \frac{1}{x-(\frac12-n)\pi}\right)$$
Again I was surprised to discover that $\lim_{n\rightarrow\infty}t_n(x) = \tan(x)$ to numerical accuracy.
I think it is also possible to make similar series for $\sec(x)$ etc.
It was several years before I finally learnt how to prove these identities. It required advanced calculus techniques such as residues, and honestly I don't think I could reproduce the proofs now.
Moreover, the proofs were unsatisfactory, since each proof coped with a single case. I feel in my gut that something deeper is going on here. Why does every single dumb attempt work? Is it possible to prove a statement along the lines of "If two analytic functions have the same poles and zeros then they are equal"? (Obviously some details will need to be firmed up before this statement is true!)
Alternatively, is it possible to prove the identities by showing that the approximations satisfy the following defining characteristics of $\cos$, $\sin$ and $\tan$ (or some similar set):
$$\frac{d \lim_{n\rightarrow\infty}c_n(x)}{dx} = -\lim_{n\rightarrow\infty}s_n(x)$$
$$\frac{d \lim_{n\rightarrow\infty}s_n(x)}{dx} = \lim_{n\rightarrow\infty}c_n(x)$$
$$\lim_{n\rightarrow\infty}t_n(x) = \frac{\lim_{n\rightarrow\infty}s_n(x)}{\lim_{n\rightarrow\infty}c_n(x)}$$
I would be grateful for any insight you can provide.