I have a few points for which I have to obtain a best fit. (I tried to use the least squares curve fitting method as Robert says, however, since it seems to be fitting rather poorly, any other suitable method would also work for me.)
However, the function is recursive and looks like this -
$f(x+1)= f(x) + k_1(f(x)-k_2)^3$
where the starting point $f(1)$ is known and fitting needs to be done only for positive integral values of $x$, from $1$ upto some natural no. $n$
I don't understand how would I apply the matrix method of minimizing the norm $\min(\lVert Ax-B\rVert^2)$ since I would have to consider all possible combinations of powers of $k_1$ and $k_2$ which makes my $x$ matrix terribly complex with every iteration.
This suggests that least square curve fitting is probably not the best way of doing this.
I tried to find other questions related to recursive curve fitting here, but I couldn't find any similar situation. Please help me solve this.