TITLE: What equation best represents this set of data?
QUESTION [2 upvotes]: Here is the graph. (It is the same as below.)

The points are symmetrical over the $y$-axis, but I cannot find an equation that accurately represents this graph.

REPLY [3 votes]: Well, observe that $y-x$ for $x>0$ are almost in arithmetical progression: $0, 3, 4.5, 6, 9, 12, 15, 30$. So we construct Lagrange polynomials for $y=y(t)$, $x=x(t)$ where $t=\frac{2}{3}(y-x)$:
$$x=t(t - 1),\ y=t(t + \frac{1}{2}).$$
We might leave this as an answer, but let's obtain $y(x)$.
$$t^2-t-x=0$$
$$t = \frac12 \left(1 \pm \sqrt{4 x + 1}\right)$$
$$t=\frac23(y-x)\Rightarrow y=\frac32 t+x$$
$$y=\frac34 \left(1 \pm \sqrt{4 x + 1}\right)+x$$
Now let's resolve the $\pm$.
\begin{array}{|l|c|c|c|c|c|c|c|c|}
\hline
x&0&2&6&12&30&56&90&380\\
\hline
y_1&0&1/2&3&15/2&45/2&91/2&153/2&703/2\\
\hline
y_2&3/2&5&21/2&18&39&68&105&410\\
\hline
\end{array}
$$\hbox{So }y(x)=\begin{cases}
\frac34 \left(1 + \sqrt{4 |x| + 1}\right)+|x|,&\hbox{for }x\ne 0,\\
0,&\hbox{for }x= 0.
\end{cases}$$

Edit: python script for computing the Lagrange polynomials
from sympy import *
R=Rational
from sympy.abc import x
xs=[0,2,6,12,30,56,90,380]
ys=[0,5,10+R(5,10),18,39,68,105,410]
def lp(xs,ys):
    monomes=[(x-R(i)) for i in xs]
    lps=[prod(monomes[:i]+monomes[i+1:]) for i in range(len(xs))]
    return simplify(sum(R(j)*f/f.subs({x:R(i)})
        for i,j,f in zip(xs,ys,lps)
                        ))
xs_=[(i-j)/R(3,2) for i,j in zip(ys,xs)]
print(lp(xs_,xs),lp(xs_,ys))

And it's output
x*(x - 1) x*(x + 1/2)
About $y-x$: observing $y-x$ is rather artificial and it is, but once you obtained it, you see that every $y-x$ is divisible by $3$, it's natural to divide by $3$. Also there's $1.5$ so it's natural to multiply by $2$ to get integer values. That's why $\frac 23$.
{"set_name": "stack_exchange", "score": 2, "question_id": 3758983}