[Math] Finding a Sine Wave That Goes Through a Set of Given Points

data analysiswave equation

This question is coming from a thought experiment I was having by myself.
Let's say I have 3 random points on a x-y plane (with different x values). Let them be (1,3), (2,5), (5, 1). Is there a sine wave that goes through all 3 of these points, and if there is how would one find it?

I was thinking that:
If we simplify the sine equation by saying it will have a fixed amplitude of 10 and no offset on x or y, giving y = 10 * sin(x * freq) then we just need to find "freq". As the value of freq goes to infinity the sine wave gets closer to going through every point between y = -10 to y = 10. This gif makes it easy to visualize: Sine wave as the frequency increases

Does this mean that for any given set of points smaller than the absolute of the amplitude of the sine wave, we can find a frequency such that the sine wave goes through every point? If this is the case would there be a way to find it?

If my reasoning is wrong and it isn't necessarily possible to find such a sine wave just by finding the frequency with fixed amplitude and offsets, is it possible to find a sine wave if we search for not only the frequency but also the amplitude and the offsets on x and y directions?

TL;dr, my question is:

Is there always a sine wave $A\times sin((x-j)\times freq)+k$ with $A,freq,j,k \in \Bbb{N}$, that goes through all the points of a set of points $\\{(x_{0}, y_{0}), (x_{1}, y_{1}), … , (x_{n}, y_{n})\\}$ with $n\in [0, \infty],$ $x_{i} \ne x_{j}\text{ for all i,j with } i \ne j,$ and $|y_{i}|<|A| \text{ for all } i \in [0, n]$ for any such set? If so, how would one find it?

Best Answer

Another way to look at it: three simultaneous equations $$A \times \sin {freq \times (x_i + k)} = y_i .$$ Three unknowns ($A$, $freq$, and $k$), three equations. Solve the equations for $x_i$ and $freq$, and see what constraints those solutions put on $A$ (and vice versa). I think you'll find that there are an infinite number of solutions reachable by increasing $freq$ and/or $A$. Your reasoning about the density of points reached by increasing $freq$ is good.