Finding true error between two curves In the image below, the orange curve is the true function, the dots are samples from the true function plus a unit variance gaussian, while the blue curve are the estimated function using linear regression with polynomial basis.

I want to find a meaningful way to compute the true error between the blue and orange curves. I used $$
\epsilon=\|f(x)-\hat f(x)\|_2
$$
where $f(x), \hat f(x)$ are the vector of all the outputs in the interval and $x$ consists of small increments (points) in the X-axis.
The problem is that the true error increases as I let the increments become small to smoothen the plot of the curve. What shall I divide with my true error function to make them more meaningful like staying between 0 and 1 for example?

The "total error" you are looking for may be something like the distance between functions.
You are currently computing:
$$error = \Sigma (f(x_i) -g(x_i))^2 $$
This will, as you have found, not converge to a single answer when you vary your sampling 'increment'.
What you should be computing is something more like:
$$error = \Sigma (f(x_i) -g(x_i))^2 \Delta x $$
where $\Delta x$ is the 'increment' in $x$ you use to estimate the error.
This should produce the converging results that you expected.
