[SOLVED] Metric Space basic definition

• Sep 3rd 2008, 12:51 PM
Paperwings
[SOLVED] Metric Space basic definition
Problem:
Let $X = C([0,1 ], R)$. Find d(f,g) for each of the following pairs of functions:
a. $f(x) =x$ and $g(x)=cos(x)$ for each x in [0, 1]
b. I did not bother to write down this part; I just need to understand the notation properly.
=======================
Definition:

$d(p,q) = \sqrt{\sum_{i=1}^n (p_{i}-q{i} )^2}$

So for part (a), I let $p_{i} = x$ and $q_{i}=cosx$ and n = 1, since this is in $\mathbb{R}$.

$d(f, g) = \sqrt{\sum_{i=1}^1 (x - cos(x))^2}$

but here I am confused. Would the d(f, g) be

$d(f, g) = \sqrt{(1-cos(1))^2 + (0 - cos(0))^2}$ ?

Thank you for your help. Much appreciated.
• Sep 3rd 2008, 02:52 PM
Plato
Quote:

Originally Posted by Paperwings
Problem: Let $X = C([0,1 ], R)$. Find d(f,g) for each of the following pairs of functions: $f(x) =x$ and $g(x)=cos(x)$ for each x in [0, 1]

I think that you have not understood the definition of the metric on this space.
Do you understand the there are many different ways to define metrics?
One sees the so called supremum metric for this space of continuous functions:
$d\left( {f,g} \right) = \mathop {\sup }\limits_{x \in \left[ {0,1} \right]} \left| {f(x) - g(x)} \right|$.

Here is another possible metric: $d\left( {f,g} \right) = \int\limits_0^1 {\left| {f(x) - g(x)} \right|dx}$.

Thus you need to see what is the definition for the metric your textbook expects you to use on the space.
• Sep 3rd 2008, 05:07 PM
Paperwings
For $C([a,b],R)$, my textbook defines the metric space as

$d(f,g) = max { \left| f(x)-g(x) \right| | x \in [a,b]}$, which is the supremum metric that you've pointed out.

So, pertaining to the problem, d(f,g) it is asking for the greatest/maximum distance between the function x and cosx in the interval [0, 1], correct?
• Sep 3rd 2008, 05:15 PM
Plato
Quote:

Originally Posted by Paperwings
For $C([a,b],R)$So, pertaining to the problem, d(f,g) it is asking for the greatest/maximum distance between the function x and cosx in the interval [0, 1], correct?

Yes that is correct.
• Sep 4th 2008, 03:47 AM
Paperwings
Plato, is there a way to find the maximum distance of two functions mathematically instead of looking at the graphs such as a formula? For in this problem, I can tell by graphing that d(f, g) = 1 for f(x) = x and g(x) = cosx since at x = 0, then f(0) = 0, and f(x) = 1.

If for example if $f(x) = 4x^4$ and $g(x) = 6x^2 -3x$ for $x \in [0, 1]$, how would I find the maximum distance? Thank you.
• Sep 4th 2008, 03:59 AM
Plato
Well, you have done that is basic calculus. Have you not?
Find the max of $f(x)-g(x)$ and $g(x)-f(x)$ to account for the absolute value.
• Sep 4th 2008, 04:11 AM
Paperwings
I see. At first, thinking of an integral formula but that made no sense. Thank you.