7
$\begingroup$

f(x) = $e^x$.

g(x) = $.5(e-1/e) + 3x/e$.

How do you find||f-g||.

The inner product is defined as $\int_{-1}^1 f(x)g(x) dx$.

I've tried this: $\int_{-1}^1 (e^x - (.5(e- e^{-1} + 3x/e)))^2dx$. This does not give the right answer of 1 -7e^-2.

$\endgroup$
3
  • $\begingroup$ The definition is $d(f,g)= <f-g,f-g>^{1/2}$ , where $<,>$ is the inner-product. Can you do the rest? $\endgroup$
    – user99680
    Feb 14 '14 at 2:01
  • $\begingroup$ no. I've tried that, but I get the wrong answer. $\endgroup$
    – larry
    Feb 14 '14 at 2:03
  • $\begingroup$ Do you want $\|f-g\|$ or $\|f-g\|^2$? Sometimes the question is for the square of the norm to avoid the square roots (see below). $\endgroup$
    – JohnD
    Feb 14 '14 at 2:09
9
$\begingroup$

Well, the norm (at least the norm induced by an inner product) is related to the inner product via $$\|f\|=\langle f,f\rangle^{1/2}.$$

In your case, you want $\|f-g\|$ and you have been told $\langle f,g\rangle:=\int_{-1}^1 f(x)g(x)\,dx$, so proceed accordingly: $$ \|f-g\|=\langle f-g,f-g\rangle^{1/2}=\sqrt{\int_{-1}^1 [f(x)-g(x)]^2 dx}=\sqrt{1-7e^{-2}}\approx 0.229462. $$

$\endgroup$
1
  • 1
    $\begingroup$ i made a silly mistake and forgot to take the sqrt of 1-7e^-2. [face in palms.] $\endgroup$
    – larry
    Feb 14 '14 at 2:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.