I'm working on a computer program that has to express sines/cosines of angles discretely, and in trying to figure out a multiplier ($n$ below) I stumbled on a really interesting problem:
Given a trig function $\sin x$ or $\cos x$, the result of which is to be multiplied by an integer $n$ and then rounded, what kind of resolution in degrees do you get given a certain $n$?
Here's an example, where I use $[x]$ to denote rounding $x$ to the nearest integer. Let $M$ be the set of all achievable discrete sine/cosine pairs $\left
If $n$ is $2$, then $$[n\sin x]\in\{-2, -1, 0, 1, 2\} \\ [n\cos x]\in\{-2, -1, 0, 1, 2\} \\ M = \{\left<-2, -2\right>, \left<-2, -1\right>, \left<-2, 0\right>, \left<-2, 1\right>, \left<-2, 2\right>, \left<-1, -2\right>, \left<-1, -1\right>, \left<-1, 0\right>, \left<-1, 1\right>, \left<-1, 2\right>, \left<0, -2\right>, \left<0, -1\right>, \left<0, 0\right>, \left<0, 1\right>, \left<0, 2\right>, \left<1, -2\right>, \left<1, -1\right>, \left<1, 0\right>, \left<1, 1\right>, \left<1, 2\right>, \left<2, -2\right>, \left<2, -1\right>, \left<2, 0\right>, \left<2, 1\right>, \left<2, 2\right>\}$$
Except some of these values in $M$ are duplicates when you consider that to get from $M$ (sine/cosine) to $L$ (the angles that got you there), the most convenient formula is $L_k = \arcsin\left(\frac{{M_k}_y}{{M_k}_x}\right)$ and clearly some combinations above in $M$ yield the same angles, like $\left<-2, -2\right>, \left<-1, 1\right>, \left<0, 0\right>,$ $\left<1, 1\right>$ and $\left<2, 2\right>$, all of which yield $\pi/2$. In short, $L$ here is actually as follows:
$$L = \{-90°, -63.435...°, -45°, 0°, 45°, 63.435...°, 90°\}$$
Originally I tried to solve this algebraically, assuming a minimum-uniquely-resolvable angle $x$ (basically the resolution) and an iterator $k$ as follows, so as you increase the input angle by $x$, the minimum amount that will yield an increase in output after rounding, you increase the discrete output $n\sin x$ by 1. Note that $k$ had to be restricted to less than $\frac{2\pi}{x}$ because any further than that and you've gone a full circle: $$n\sin(x\cdot k) + 1 = n\sin\left(x\cdot(k+1)\right) \quad\forall\quad 0 \leq k \leq \frac{2\pi}{x}$$
However, after spending a while with trig identities and not finding anything fruitful, I realized that solving for $x$ given $n$ in trig functions was complicated enough without the additional variable $k$, so I tried simplifying or re-expressing it as $$n\sin(x) + 1 = n\sin(2x)$$ or alternatively with k serving as an adder instead of a multiplier between $-2\pi$ and $2\pi - x$ as $$n\sin(k) + 1 = n\sin(k + x)$$
And yet this too escapes algebraic solutions. It seems the results just can't be extracted from the sine function, so finally I resorted to graphical results. Graphed with $x$ on the $x$ axis and $n$ on the $y$ axis, this should show all possible values for $x$, with the minimum-uniquely-resolvable $x$, or resolution as the lowest possible value of $x$ at the desired $n$ $y$ value. I animated k, with our new version of the function outputting the minimum point in $x$ along the desired $n$ $y$ value that stays in place as $k$ changes, but SE wouldn't accept the animated image, so here's a shot 3D graphed with $k$ as the $z$ axis, which makes it pretty clear that the for all $0 \leq k \leq \frac{2\pi}{x}$ condition isn't going to happen because there is no one value of $x$ consistent across $k$ at $z$, proving that this whole exercise was made with the very faulty assumption that there's some set resolution $x$ instead of an average resolution.

How would I possibly find a reasonable result for this problem, now that you've seen a good part of my failed process above?