How does one solve the following functional equation when $f:\mathbb{R}\rightarrow\mathbb{R}$
$$f(x+y)=f(x)+f(y)-(xy-1)^2$$
When I assumed it was a polynomial equation, it can be seen through induction that $$f(nx)=nf(x)-\sum _{ i=1 }^{ n-1 }{ (ix^2-1)^2 } $$
for some natural number $n$.
This implies that $$f(n)-nf(1)+\sum _{ i=1 }^{ n-1 }{ (i-1)^2 }=0 $$ is true for all natural $n$, or that for all $n$ $$f(n)-nf(1)+\frac{(n-2)(n-1)(2n-3)}{6}=0$$
Since there are infinite number of solutions to $f(n)-nf(1)+\frac{(n-2)(n-1)(2n-3)}{6}=0$, it can be said that $$f(n)=nf(1)-\frac{(n-2)(n-1)(2n-3)}{6}$$ for all real number $n$.
This implies that $f(n)$ is of the degree $3$, but this is a contradiction since if $f(n)$ had a degree of $3$, the coefficient for $x^2y^2$ would be $0$.
So there appeared to be no polynomial solutions to this function. I further thought that there would be no functions that satisfied this equation.
How does one solve this equation? Any help would be appreciated.
$$f(x+y)=f(x)+f(y)-(xy-1)^2\\ f(2)=2f(1)\\ f(3)=f(2)+f(1)-1=3f(1)-1\\ f(2)+f(2)-9=f(4)=f(1)+f(3)-4\\ 4f(1)-9=4f(1)-5$$