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 V, the space of polynomials with complex coefficients from \mathbb{R} to \mathbb{C}. Then, for f,g\in V, define

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

I'm asked to find the distance between f(x)=x^2 and the subset of V spanned by \{1,x\}. 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 \infty:

x_1=1
x_2=x

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

The first projection:

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

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

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

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)

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

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

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.
 
Physics news 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.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top