Tuesday, 21 May 2013

Maths on Steroids: 8

W0000! The Puzzle Hunt is over! Now I can finally get some work done. =P

Well, maybe not straight-away...maybe after I watch the entire first season of Pendleton Ward's (*) Bravest Warriors.

Blogging (**) is strange: there's something disarmingly private (even diary-esque?) about writing up a post, especially given how open blogging is as a medium. Okay...okay...okay...fair enough: no-one's actually going to ever read it, but there's still something sort of...umm...faintly and intangibly Huxleyan about all this.

Or not.

Hmm...whatevs, - it's not like I know what I'm on about.

Err...let's just do some maths.

I mentioned at the end of tute 8 that I would write up a solution to a non-standard Gram-Schmidt orthonormalisation question in the yellow book. Something like question 29:

Let \(P_2\) be the vector space of polynomials of degree at most two with the inner product\begin{align}\langle p,q\rangle :=\int_{-1}^{1}p(x)q(x)\,\mathrm{d}x.\end{align}Obtain an orthonormal basis for \(P_2\) from the basis \(\{1,x,x^2\}\) using the Gram-Schmidt process.

To begin with, we just pick one of the three vectors and normalise it. Let's use the vector \(1\in P_2\). We know that the magnitude of this vector is:\begin{align}||1||^2=\langle1,1\rangle=\int_{-1}^{1}1\cdot1\,\mathrm{d}x=2.\end{align}Therefore, the first vector in our orthogonal basis is: \(\frac{1}{\sqrt{2}}\cdot1\in P_2\).

The second step is to take another basis vector, like \(x\in P_2\), and to first remove the \(1\)-component from this vector, before normalising the result to form a new vector. So, consider the vector\begin{align}x-\langle x,\frac{1}{\sqrt{2}}1\rangle\cdot\frac{1}{\sqrt{2}}\cdot1=x-(\frac{1}{2}\int_{-1}^1 x\,\mathrm{d}x)\cdot1=x-0\cdot1=x.\end{align}
At this point, we've got two orthogonal vectors: \(\frac{1}{\sqrt{2}}1\) and \(x\), and we just need to normalise this latter vector to obtain: \begin{align}\{\frac{1}{\sqrt{2}}1,\sqrt{\frac{3}{2}}x\}.\end{align}In this last step, we take the final basis vector \(x^2\in P_2\) and remove the \(1\) and \(x\)-components from this vector, before normalising the result to form a new vector. So, consider the vector\begin{align}&x^2-\langle x^2,\frac{1}{\sqrt{2}}1\rangle\cdot\frac{1}{\sqrt{2}}1-\langle x^2,\sqrt{\frac{3}{2}}x\rangle\cdot\sqrt{\frac{3}{2}}x\\=&x^2-(\frac{1}{2}\int_{-1}^1x^2\,\mathrm{d}x)\cdot1-(\frac{3}{2}\int_{-1}^1x^3\,\mathrm{d}x)\cdot x=x^2-\frac{1}{3}.\end{align}After normalisation, we obtain the Gram-Schmidt orthonormalised basis: \begin{align}\{\frac{1}{\sqrt{2}},\sqrt{\frac{3}{2}}x,\sqrt{\frac{45}{8}}(x^2-\frac{1}{3}).\}\end{align}

Note that the answer to this problem is non-unique, because the basis that results from the Gram-Schmidt process depends a lot upon the order in that we feed the original basis into the orthonormalisation procedure. For example, shoving in the vectors in the order \(x^2,x,1\) results in the orthonormal basis: \(\{\sqrt{\frac{5}{2}}x^2,\sqrt{\frac{3}{2}}x,\sqrt{\frac{5}{8}}(1-3x^2)\}.\)

Well, that was that.

The other thing that I promised to do was to give answers to the tute 9 lab sheets. Psst: Turns out that that's going to have to wait because I left the lab sheets at uni again.  >____<

*: the creator of Adventure Time!
**: actually, when you think about it, this is pretty applicable to Twitter, Facebook, YouTube, heck - it's applicable to pretty much anything without a password on the internet.

No comments:

Post a Comment