Is there an algorithm (on the inernet) that converts points into possible functions for the points? Is there an algorithm where the input is a bunch of points and the output would be a possible function which includes these points? I've only found one website that gives you the correlating linear function for two points you have entered. This feature is quite limited because I have more than two points and the function shouldn't be a linear function.
In my problem, there are 5 known maxima that each have the same y value but a different x value. I know that there are infinite maxima. What I don't know is, if there are more maxima in between my known maxima or not. The x values of the points are all negative. The distances between the points shrink while you go towards positive $∞$. I didn't find any pattern (yet) regarding how they shrink. My best approach was something like
$$f(x)=a\sin \left(\frac{b}{x-c}\right)$$
but I didn't find any fitting parameters just by trial and error. That's why I asked if there is an algorithm for that.
The known maxima are:
$P_1\approx(-13 800 000 000;z)$
$P_2\approx(-4 280 000 000;z)$
$P_3\approx(-540 000 000;z)$
$P_4\approx(-2 000 000;z)$
$P_5\approx(-1 600;z)$
(These are just roundings because the numbers are very big and it doesn't matter that much/it doesn't have to be exact. It's irrelevant where the y values of the maxima are, so I'll just say the highest possible point is $z$.)
 A: To make my suggestion more real, suppose you want a function that will have relative maxima at $(-1,1)$ and $(1,2)$. As is clear, there should also be a relative minimum in the middle somewhere, let's pick it in the middle at $(a,b)$ for any $a \in \mathbb{R}$, since we seem to be able to pick anything we like for the minima.
So we need a function with $3$ extrema, hence we will have a quartic polynomial $p(x)$. Its derivative is given by
$$
p'(x) = (x-1)(x-a)(x+1) = x^3-ax^2-x+a,
$$
since we know all the roots from the extrema. Now
$$
p(x) = x^4-\frac{ax^3}{3}-\frac{x^2}{2}+ax+C
$$
and we have
$$
\begin{split}
1 &= p(-1) &= C - \frac{2a}{3} + \frac12 \\
b &= p(0)  &= C \\
2 &= p(1)  &= C + \frac{2a}{3} + \frac12 \\
\end{split}
$$
Which is a system of 3 linear equations in 3 unknowns, which you can solve and this will take care of finding $p$ exactly.
From the second equation you see $C = b$, and adding first and third together yields $3=2C+1 \iff C=1$, which implies $a=3/4$. So the result is
$$
p(x) = x^4-\frac{x^3}{4}-\frac{x^2}{2}+\frac{3x}{4}+1
$$
