Gram-Schmidt linear algebra help

Hjensen
Messages
22
Reaction score
0
I'm taking a course on Hilbert spaces, but this falls more into the category of linear algebra. If we consider [tex]V[/tex], the space of polynomials with complex coefficients from [tex]\mathbb{R}[/tex] to [tex]\mathbb{C}[/tex]. Then, for [tex]f,g\in V[/tex], define

[tex](f,g)=\int_{0}^{\infty}f(x)\bar{g(x)}e^{-x}dx[/tex]​

I'm asked to find the distance between [tex]f(x)=x^2[/tex] and the subset of [tex]V[/tex] spanned by [tex]\{1,x\}[/tex]. I am told the distance is 2, but I can't seem to get it right. I am using Gram-Schmidt - which I'm told should work - but I must have a mistake somewhere. If anyone could point it out, I'd be very grateful. I am using the notation of S.J Leon from his book on linear algebra. All integrals are from 0 to [tex]\infty[/tex]:

[tex]x_1=1[/tex]
[tex]x_2=x[/tex]

[tex]u_1=\frac{x_1}{\| x_1\|}=\frac{1}{\sqrt{\int e^{-x}dx}}=1[/tex]

The first projection:

[tex]p_1=(x_2,u_1)u_1=(x,1)=\sqrt{\int xe^{-x}dx}=1[/tex]

[tex]u_2=\frac{1}{\|x_2-p_1 \|}(x_2-p_1)=\frac{x-1}{\sqrt{\int (x-1)(x-1)e^{-x}dx}}=x-1[/tex]

For calculating the distance to x² I shall be needing:

[tex]p_2=(x^2,u_1)u_1+(x^2,u_2)u_2=\sqrt{\int x^2e^{-x}dx}+(x-1)\sqrt{\int x^2(x-1)e^{-x}dx}=\sqrt{2}+2(x-1)[/tex]

Now I'd think - and I could be wrong - that the desired distance can be found as the squareroot of

[tex]\| x^2-p_2\|=\int (x^2-2x+2-\sqrt{2})^2e^{-x}dx[/tex]

but calculating the integral gives me 8.37 and not 4. I don't know whether I've misunderstood something or simply made a miscalculation, but I can't seem to find the error. If anyone could give a helping hand I'd appreciate it.
 
on Phys.org


Unless your inner product is different than you defined it, you shouldn't have those square roots in your projections p1 and p2. (Clearly it doesn't matter for p1, but the principle is the same). If you eliminate those, everything works out fine.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 105 ·
4
Replies
105
Views
14K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K