# Integral Error

1. Nov 25, 2015

Consider two functions f, g that take on values at t=0, t=1, t=2.

Then the total error between them is:

total error = mod(f(0)-g(0)) + mod(f(1)-g(1)) + mod(f(2)-g(2))

where mod is short for module.

This seems reasonable enough.

Now, consider the two functions to be continuous on [0,2].
What is the total error now?

My guess is that it is the integral of the absolute value of their difference divided by the length of the interval:
total error =1/2 * integral from 0 to 2 of mod(f(x)-g(x)) dx

Is this right?

Or is the error evaluation done in a different way?

2. Nov 25, 2015

3. Nov 25, 2015

### pasmith

If $f(x) = 10^7 \sin \pi x$ and $g(x) = 0$ then $$\int_0^2 f(x) - g(x)\,dx = 0.$$ Does it seem reasonable to say that the error between $f$ and $g$ is zero?

Errors should be defined in terms of norms. There are many norms one can place on the space of continuous functions on $[0,2]$, for example $$\|f\|_{\infty} = \max \{|f(x)| : x \in [0,2]\}$$ or $$\|f\|_p = \left( \int_0^2 |f(x)|^p\,dx \right)^{1/p},\quad p \geq 1.$$

4. Nov 25, 2015

No. I take the module. I integrate the module. I specified this in the first post.

It is not zero if integrating the absolute value.

5. Nov 25, 2015

### pasmith

You then say "measuring the error between the curves using the area between them" - ie $\int_0^2 f(x) - g(x)\,dx$ - "is good enough", which of course it isn't.

6. Nov 25, 2015

What if I do the following thing.

So, consider the function f(x) that takes on values at x=0, x=1, x=2. So the space between two points on the x axis is 1.
And I want to sum the values:
sum = f(0)+f(1)+f(2)

Now, I want to make the space between the points infinitesimally small. For this I write like this:
sum = f(0) + f(0+Dx) + f(0+2Dx) where Dx = 1
And I make Dx to go to 0. Thus:

sum = f(0) + f(0+dx) + f(0+2dx)
And I sum like this from x = 0 to x = 2.

Then I do this for mod(f(x)-g(x)). So I sum the absolute value of their differences at each point dx on the x axis. Would this work? Something similar is made when going from Fourier series to Fourier transform.

I mean, the sum would have to be infinite. But, in theory, I think it is correct.
Or not. If it is infinite, who decides that it should stop at x=2 or x=10. For both it is sum from k=0 to inf of f(k*dx). I dont know.

Last edited: Nov 25, 2015
7. Nov 25, 2015

The absolute value of the area. It was self-implied from the first post.