I have a function approximated with a polynomial P(x) of degree 3, however I'm asked to give a linear set of equation (linear system) to approximate $\frac{P(x)}{\sqrt{x^2 + 1}}$ with the least square approximation methode.
We only learned how to approximate some points with just a polynomial $P(x)$ using least square methode, but now I'm asked to approximate $\frac{P(x)}{\sqrt(x^2 + 1)}$ and I have no idea how to achieve this
You have $n$ data points $(x_i,y_i)$ and you want to fit the data to the model $$y=\frac{P(x)}{\sqrt{x^2 + 1}}$$ where $P(x)$ is a polynomial of degree $k$. This means that $$y=\frac{\sum_{i=0}^k a_i x^i }{\sqrt{x^2 + 1}}=\sum_{i=0}^k a_i \frac{x^i}{\sqrt{x^2 + 1}}$$ So, define $$t_i=\frac{x^i}{\sqrt{x^2 + 1}}\implies y=\sum_{i=0}^k a_i t^i$$ which is a multilinear model with no intercept.
Warning
What you should not do is to write $$z={\sqrt{x^2 + 1}}\, y=\sum_{i=0}^k a_i x^i$$ because what is measured is $y$ and not any of its possible transforms.