Searching for a simple polynomial curve fitting example

Thank you!

Can I ask for learning purposes what is the practical difference between fixing coefficients (or setting bounds) and defining constraints ?

Edit: I found the answer in another thread: fixing-vs-constraining-a-variable-in-jump

P.S. For others reference, I ended up adding

set_optimizer_attribute(m, "tol_bnd",  1e-11 )

before the results stabilised and the absolute errors looked suitably like Chebychev equi-oscillation (with obvious root at x=1).