Ask your own question, for FREE!
Mathematics 12 Online
OpenStudy (mendicant_bias):

(PDE)(Gram-Schmidt Function Orthogonalization) I was wondering if somebody else can figure out where I'm (I think) making a mistake, I'm trying to make a given set of functions orthogonal via Gram-Schmidt.

OpenStudy (mendicant_bias):

@Pompeii00

OpenStudy (mendicant_bias):

@freckles , are you at all good with PDE/Gram-Schmidt?

OpenStudy (freckles):

I can look it up and try to help you with it.

OpenStudy (freckles):

But I will have to do so after lunch.

OpenStudy (mendicant_bias):

Alright, cool; thanks nonetheless.

OpenStudy (anonymous):

This was used in quantum mechanics to find a convenient basis. I'm not sure how much I remember about it though.

OpenStudy (freckles):

i'm back. like did you want to show the problem.

OpenStudy (mendicant_bias):

Yeah, just wanted to make sure somebody was sticking around before I committed. What I'm trying to do is, given three functions, f_0, f_1, and f_2, each being

OpenStudy (mendicant_bias):

\[f_0=1,\ \ \ f_1=x \ \ \ , f_2=x^2\]Respectively, where the relationship between them is \[f_n=x^n, \ \ \ n \in \mathrm{N}\]

OpenStudy (mendicant_bias):

Making those three functions orthogonal by the Gram-Schmidt process.

OpenStudy (mendicant_bias):

@dan815

OpenStudy (mendicant_bias):

The issue that I'm having is when I try to take the inner product of f_1 and g_2 as in the Gram-Schmidt procedure, I don't get a value of zero, which I need to get, AFAIK, in order for the functions to be demonstrably orthogonal.

OpenStudy (freckles):

what is g_2?

OpenStudy (mendicant_bias):

Wait a minute, one sec. Trying to find a bunch of new orthogonal vectors, \[g_0=f_0, \ \ \ \ \ \ \ \ g_1=f_1-\frac{(g_0,f_1)}{(g_0,g_0)}g_0\]

OpenStudy (mendicant_bias):

Where the things in parentheses are the inner product of the two functions.

OpenStudy (freckles):

\[(f,g)=\int\limits_0^1f \cdot g dx \text {\right }\]

OpenStudy (freckles):

or is it -1 to 1 instead of 0 to 1

OpenStudy (mendicant_bias):

Yep, exactly, so for the first one, it's just equal to itself (at least to be orthogonal), for the second one, it should be x minus the inner product of x and 1. It's 0 to 1.

OpenStudy (mendicant_bias):

\[g_0=1\]\[g_1=x-\frac{\int\limits_{}^{}(1)(x)dx}{\int\limits_{}^{}(1)(1)dx}(1)\]

OpenStudy (freckles):

g1=x-1/2

OpenStudy (mendicant_bias):

I would have gotten x-1/2, not sure how you got 3/2-yeah, and then, since those are orthogonal, if we take the inner product of the two of them, the result should be zero, right?

OpenStudy (freckles):

i did the integral of g1*g1 dx on bottom

OpenStudy (freckles):

mistakenly

OpenStudy (freckles):

i mean f1*f1 lol

OpenStudy (mendicant_bias):

\[\int\limits_{}^{}(1)\bigg(x-\frac{1}{2}\bigg)dx=\int\limits_{}^{}\bigg(x-\frac{1}{2}\bigg)dx=\frac{x^2}{2}-\frac{x}{2}\]

OpenStudy (freckles):

you get 1/2-1/2

OpenStudy (mendicant_bias):

Wait, nevermind, that makes sense now, doesn't it? 1/2-1/2=0. Alright, not sure where I screwed up originally, lol. But now I need to make them orthonormal as well.

OpenStudy (mendicant_bias):

So I need to divide each by its inner product with itself, which in the first case, we don't need to do (it already has magnitude 1) and need to do the second one as well.

OpenStudy (mendicant_bias):

\[\frac{x-1/2}{\int\limits_{}^{}(x-1/2)(x-1/2)dx}\]

OpenStudy (freckles):

\[\frac{x-\frac{1}{2}}{\frac{1}{3}-\frac{1}{2}+\frac{1}{4}}=\frac{12x-6}{4-6+3}=\frac{12x-6}{-2+3}=\frac{12x-6}{1}=12x-6\] if i didn't make a mistake

OpenStudy (mendicant_bias):

\[\int\limits_{0}^{1}\bigg(x^2-\frac{1}{4}x+\frac{1}{4}\bigg)dx=\frac{x^3}{3}-\frac{1}{8}x^2+\frac{1}{4}\bigg]_0^1\]

OpenStudy (mendicant_bias):

1/4x, that last part

OpenStudy (freckles):

\[(x-\frac{1}{2})(x-\frac{1}{2})=x(x-\frac{1}{2})-\frac{1}{2}(x-\frac{1}{2}) \\ =x^2-\frac{1}{2}x-\frac{1}{2}x+\frac{1}{4} \\ =x^2-\frac{1+1}{2}x+\frac{1}{4}\]

OpenStudy (freckles):

or recall (x-b)(x-b)=x^2-2xb+b^2

OpenStudy (mendicant_bias):

Ah, I gotcha, I see my mistake

OpenStudy (mendicant_bias):

Alright, but the problem is, that inner product needs to be zero.

OpenStudy (freckles):

and it will be

OpenStudy (freckles):

\[\int\limits_{0}^{1}(12x-6)(1) dx=\frac{12x^2}{2}-6x|_0^1=6-6=0\]

OpenStudy (mendicant_bias):

Do you evaluate the entire expression at zero to one? What's the basis for that? That would equal zero, but I don't see where that operation (evaluating that final amount) suddenly comes from.

OpenStudy (freckles):

i thought you said the inner product still needs to be zero

OpenStudy (freckles):

so that is what i was showing that the inner product of 1 and (12x-6) is 0

OpenStudy (freckles):

this means that they are orthogonal

OpenStudy (mendicant_bias):

Wait, what? I'm just getting lost/disoriented in the math, give me a moment.

OpenStudy (mendicant_bias):

Alright, so if I read correctly, our result 12x-6 is the ortho*normal* version of g_1? It's the unit vector version of (x-1/2)?

OpenStudy (freckles):

yeah

OpenStudy (mendicant_bias):

Alright, so since that is orthonormal and is also obviously orthogonal, the inner product with that and g_1 should also be zero.\[\int\limits_{}^{}(1)(12x-6)dx=\int\limits_{}^{}(12x-6)dx=(6x^2-6)\bigg]_0^1=0\]

OpenStudy (mendicant_bias):

Yay! Lol, alright, cool.

OpenStudy (freckles):

\[f_0=1,f_1=x,f_2=x^2 \\ g_1=f_1-\frac{(f_1 ,f_0)}{(f_0,f_0)} f_0=x-\frac{\frac{x^2}{2}|_0^1}{x|_0^1}(1)=x-\frac{\frac{1}{2}}{1}=x-\frac{1}{2} \\ \frac{g_1}{||g_1||}=12(x-\frac{1}{2})=12x-6\\ \text{ but I think we also need \to do } g_2=f_2-\frac{(f_2,f_0)}{(f_0,f_0)}f_0-\frac {(f_2,g_1)}{(g_1,g_1)}g_1 \text{ and then find } \\ \frac{g_2}{||g_2||}\]

OpenStudy (freckles):

like the orthogonal basis should be g0,g1,g2

OpenStudy (freckles):

and the orthornormal basis should be g0/||g0||,g1/||g_1||,g2/||g_2||

OpenStudy (freckles):

\[(f_2,f_0)=(x^2,1)=\frac{x^3}{3}|_0^1=\frac{1}{3} \\ (f_0,f_0)=(1,1)=x|_0^1=1 \\ (f_2,g_1)=(x^2,x-\frac{1}{2})=\frac{x^4}{4}-\frac{1}{2}\frac{x^3}{3}|_0^1=\frac{1}{4}-\frac{1}{6}=\frac{3}{12}-\frac{2}{12}=\frac{1}{12} \\ (g_1,g_1)=(x-\frac{1}{2},x-\frac{1}{2})=\frac{x^3}{3}-\frac{x^2}{2}+\frac{1}{4}x|_0^1=\frac{1}{3}-\frac{1}{2}+\frac{1}{4}=\frac{4}{12}-\frac{6}{12}+\frac{3}{12} \\\text{ so } (g_1,g_1)=\frac{1}{12}\]

OpenStudy (freckles):

\[g_2=f_2-\frac{(f_2,f_0)}{(f_0,f_0)}f_0-\frac {(f_2,g_1)}{(g_1,g_1)}g_1 \\ g_2=x^2-\frac{\frac{1}{3}}{1}(1)-\frac{\frac{1}{12}}{\frac{1}{12}}(x-\frac{1}{2}) \\ g_2=x^2-\frac{1}{3}-(x-\frac{1}{2}) \\ g_2=x^2-x-\frac{1}{3}+\frac{1}{2} \\ g_2=x^2-x-\frac{2}{6}+\frac{3}{6} \\ g_2=x^2-x+\frac{1}{6}\]

OpenStudy (freckles):

\[\frac{g_2}{||g_2||}=\frac{x^2-x+\frac{1}{6}}{\int\limits_{0}^{1}(x^2-x+\frac{1}{6})(x^2-x+\frac{1}{6}) dx}\]

OpenStudy (freckles):

which should be just 180x^2-180x+30

OpenStudy (mendicant_bias):

Alright, cool; yeah, I understand this now, which is as much as I wanted to go. I have one last question (going to open up a new thing for it) just relating to doing a fourier expansion given some function and an orthonormal basis.

OpenStudy (freckles):

\[\text{ answer is } \\ (\frac{g_0}{||g_0||},\frac{g_1}{||g_1||},\frac{g_2}{||g_2||}) \\ =(1,12x-6,180x^2-180x+30)\]

OpenStudy (freckles):

if there was no mistake made

OpenStudy (freckles):

i can try

OpenStudy (mendicant_bias):

Alright, yeah, no worries. In any case, thank you!

OpenStudy (freckles):

honestly how to whip out my linear algebra book for that last problem a bit rusty i am

OpenStudy (freckles):

I want to make one more note here in case of confusion on notation I was taking ||g|| to mean (g,g) whch you know when int_0^1 g^2 dx

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!