MATH 414 Lecture 5

From Notes
Jump to navigation Jump to search

« previous | Friday, January 24, 2014 | next »


Hyperbolic Trigonometric Functions

sinhx=exex2=isin(ix)


Gram-Schmidt Process

INPUT: basis vectors U={v1,v2,,vn} for a vector space V=Span{v1,v2,,vn}.

OUTPUT: orthonormal basis O={e^1,e^2,,e^n} for V

e^1:=v1v1
O:={e^1}
for i from 2 to n
pi:=k=1i1vi,e^ke^k
e^i:=vipivipi
O:=O{e^i}

Python Implementation

def gram_schmidt(basis):
    on_basis = [ normalize(basis[0]) ]
    for i in xrange(1, len(basis)):
        p = sum(inner_product(basis[i], e) * e for e in on_basis)
        next_e = normalize(basis[i] - p)
        on_basis.append(next_e)
    return on_basis


Trick

Calculating vipi=vipi,vipi; in L2[a,b] space, ab(vi(x)pi(x))2dx; can be a long and cumbersome process, but we can compute this length using values we already know:

Theorem. vipi=v2k=1n1vi,e^k2

Proof. Observe that pi and vipi are orthogonal by construction, so vi, pi, and vipi form a right triangle.

Therefore pi2+vipi2=vi2, in particular, vipi2=vi2pi2, by the Pythagorean theorem.

By definition, pi=k=1n1vi,e^ke^k. By generalizing the pythagorean theorem into multiple dimensions, we have pi2=k=1n1vi,e^ke^k2=k=1n1vi,e^ke^k2 because all vi,e^ke^k are orthogonal.

Factoring out the scalar value vi,e^k from the length of each component in the sum leaves just vi,e^k2e^k2, and of course the length of e^k is 1. Therefore,

pi2=k=1n1vi,e^k2

Plugging this definition into the pythagorean identity above yields the desired equation for vipi.

quod erat demonstrandum