Prof. Dr. I. Nasser Gram-Schmidt_Phys571_T131

Phys 571 T_131

October 22, 2013

Gram-Schmidt procedure (10.3 Page 641) To construct an orthonormalize vectors from un-orthonormalize vectors. The first two steps of the Gram–Schmidt process The sequence v1, ..., vn is the required system of orthogonal vectors, and the normalized vectors vˆ 1 , vˆ 2 ," , vˆ n form an orthonormal set. The calculation of the sequence v1, ..., vk is known as Gram–Schmidt orthogonalization, while the calculation of the sequence vˆ 1 , vˆ 2 ," , vˆ n is known as Gram–Schmidt orthonormalization as the vectors are normalized. To check that these formulas yield an orthogonal sequence, first compute ‹v1, v2› by substituting the above formula for v2: we get zero. Then use this to compute ‹ v1, v3 › again by substituting the formula for v3: we get zero. Geometrically, this method proceeds as follows: to compute vi, it projects ui orthogonally onto the subspace V generated by v1, ..., vi−1, which is the same as the subspace generated by u1, ..., ui−1. The vector vi is then defined to be the difference between ui and this projection, guaranteed to be orthogonal to all of the vectors in the subspace V.

G

G

Step 1: Let v1 = u1 , Step 2: Graphically,

G G G G G v 2 = u 2 − ( u 2 cos θ ) uˆ 1 = u 2 − ( u 2 cos θ )vˆ 1 N vˆ 1

G G Where ( u 2 cos θ ) uˆ 1 is the projection of u 2 on uˆ 1 . N vˆ 1

With the definition:

G v1 vˆ 1 = G , v1

and

G G G G G G u1 ⋅ u 2 = u1 u 2 cos θ = v1 u 2 cos θ

Then:

In general:

G G G G G u1 ⋅ u 2 v1 ⋅ u 2 ⇒ u 2 cos θ = G = G v1 v1

G G G G v1 ⋅ u 2 G v 2 = u 2 − G 2 v1 , v1

G G n −1 G G u n ⋅ vm G vn = u n − ∑ G 2 vm , m =1 v m

And in Dirac’s notation: n −1

u n vm

m =1

vm vm

vn = u n − ∑

Prof. Dr. I. Nasser ([email protected])

1

2

vm ,

Prof. Dr. I. Nasser Gram-Schmidt_Phys571_T131

Phys 571 T_131

October 22, 2013

Example: Let V = R 3 with the Euclidian inner product. Apply Gram-Schmidt algorithm to ⎛1⎞ ⎛1⎞ ⎛1⎞ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ orthogonalize the basis u1 = ⎜ −1⎟ , u 2 = ⎜ 0 ⎟ , and u3 = ⎜ 1 ⎟ . ⎜1⎟ ⎜1⎟ ⎜ 2⎟ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠

Ans: ⎛1⎞ ⎜ ⎟ v1 = u1 = ⎜ −1⎟ , ⎜1⎟ ⎝ ⎠

⎛1⎞ ⎜ ⎟ v1 = (1 −1 1) ⎜ −1⎟ = 3 ⎜1⎟ ⎝ ⎠ ⎛1⎞ ⎜ ⎟ 1 0 1) ⎜ −1⎟ ( ⎛1⎞ ⎜ 1 ⎟ ⎛ 1 ⎞ ⎛1⎞ 2 ⎛ 1 ⎞ 1 ⎛1⎞ u 2 v1 ⎜ ⎟ ⎝ ⎠ ⎜ − 1 ⎟ = ⎜ 0 ⎟ − ⎜ −1 ⎟ = ⎜ 2 ⎟ , v2 = u2 − v1 = ⎜ 0 ⎟ − 2 ⎜ ⎟ ⎜ ⎟ 3⎜ ⎟ 3⎜ ⎟ 3 v1 ⎜1⎟ ⎜ 1 ⎟ ⎜1⎟ ⎜1⎟ ⎜1⎟ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ 2

v2

⎡ ⎛ 1 ⎞⎤ ⎛1⎞ ⎢ 1 ⎜ ⎟⎥ ⎜ ⎟ (1 1 2 ) ⎜ −1⎟ 1 (1 1 2 ) ⎢ 3 ⎜ 2 ⎟ ⎥ ⎡ 1 ⎤ ⎛1⎞ ⎛ ⎞ ⎜ 1 ⎟⎛ ⎞ ⎢ ⎜⎝ 1 ⎟⎠ ⎦⎥ ⎢ 1 ⎜ ⎟ ⎥ u3 v1 u3 v 2 ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎣ v3 = u3 − v1 − v2 = ⎜ 1 ⎟ − 2 2 ⎢ 3 ⎜ 2 ⎟⎥ ⎜ −1 ⎟ − 2 3 v1 v2 ⎜ 2⎟ ⎜1⎟ ⎢⎣ ⎜⎝ 1 ⎟⎠ ⎥⎦ ⎝ ⎠ ⎝ ⎠ 3 ⎛1⎞ ⎛1⎞ ⎛1⎞ ⎛ −1⎞ ⎜ ⎟ 2⎜ ⎟ 5⎜ ⎟ 1⎜ ⎟ = ⎜ 1 ⎟ − ⎜ −1⎟ − ⎜ 2 ⎟ = ⎜ 0 ⎟ ⎜ 2⎟ 3 ⎜ 1 ⎟ 6 ⎜1⎟ 2 ⎜ 1 ⎟ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠

⎧⎛ 1 ⎞ ⎛ 1 ⎞ ⎛ −1⎞ ⎫ ⎪⎜ ⎟ 1 ⎜ ⎟ 1 ⎜ ⎟ ⎪ You can verify that ⎨⎜ −1⎟ , ⎜ 2 ⎟ , ⎜ 0 ⎟ ⎬ forms an orthogonal basis for V = R 3 . ⎪⎜ 1 ⎟ 3 ⎜ 1 ⎟ 2 ⎜ 1 ⎟ ⎪ ⎩⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎭ Normalize the vectors in the orthogonal basis we have: ⎛1⎞ 1 2 ⎜ ⎟ 2 v1 = A (1 −1 1) ⎜ −1⎟ = 1 ⇒ A = . 3 ⎜1⎟ ⎝ ⎠ ⎡ ⎛ 1 ⎞⎤ 1 3 2 ⎢ 1 ⎜ ⎟⎥ 2 1 v 2 = B (1 2 1) ⎢ ⎜ 2 ⎟ ⎥ = B 2 ( 6 ) = 1 ⇒ B = . 3 3⎜ ⎟ 9 2 ⎢⎣ ⎝ 1 ⎠ ⎥⎦ ⎡ ⎛ −1⎞ ⎤ 1 1 ⎢ 1 ⎜ ⎟⎥ v3 = C ( −1 0 1) ⎢ ⎜ 0 ⎟ ⎥ = C 2 ( 2 ) = 1 ⇒ C = 2. 2 2 4 ⎢⎣ ⎜⎝ 1 ⎟⎠ ⎥⎦ ⎧⎛ ⎞ ⎛ ⎞ ⎛ ⎞⎫ V = ⎪⎨⎜ 3 , − 3 , 3 ⎟ , ⎜ 6 , 6 , 6 ⎟ , ⎜ − 2 ,0, 2 ⎟ ⎪⎬ 3 3 ⎠ ⎝ 6 3 6 ⎠ ⎝ 2 2 ⎠ ⎭⎪ ⎩⎪⎝ 3 2

2

Prof. Dr. I. Nasser ([email protected])

2

2

=

2 3

Prof. Dr. I. Nasser Gram-Schmidt_Phys571_T131

Phys 571 T_131

October 22, 2013

Example 10.3.1 (page 644): Legendre Polynomials by GS Orthogonalization. Consider the set: f 0 (x ) = 1, f 1 (x ) = x , f 2 (x ) = x 2 , f 3 (x ) = x 3 Which form a basis for the space of all real polynomials of degree ≤ 3 on the interval − 1 ≤ x ≤ 1 . This means that any polynomial p (x ) in this space can be written as: p (x ) = a0 + a1x + a2 x 2 + a3 x 3 a- Use the inner product: 1

fi f

= ∫ f i * (x )f j (x )dx

j

−1

And the Gram-Schmidt procedure to form the corresponding set of orthogonal polynomials on the interval −1 ≤ x ≤ 1 . b- Verify that the new set forms a mutually orthogonal set. c- Calculate the normalized set. Answer: apo (x ) = f 0 (x ) = 1, p1 (x ) = f 1 (x ) −

f 1 p0 p0

2

p0 = x −

f 1 p0 p0

2

p0 ;

⎫ ⎪ ⎪ −1 ⎬ ⇒ p1 (x ) = f 1 (x ) = x 1 2 p 0 = p 0 p 0 = ∫ 1 dx = 2 ⎪⎪ −1 ⎭ f 2 p0 f 2 p1 f 2 p0 f 2 p1 p 2 (x ) = f 2 (x ) − p0 − p1 = x 2 − p0 − p1 ; 2 2 2 2 p0 p1 p0 p1 1

f 1 p 0 = ∫ x dx = 0

1

1 ⎫ 2 p 0 = p 0 p 0 = ∫ 1 dx = 2 ⎪ −1 ⎪ 1 ⎪⎪ f 2 p1 = ∫ x 3dx = 0 ⎬ ⇒ −1 ⎪ 1 ⎪ 2 2 ⎪ p1 = p1 p1 = ∫ x 2dx = 3 −1 ⎭⎪

f 2 p 0 = ∫ x 2dx = −1

p 3 (x ) = f 3 (x ) −

f 3 p0 p0

2

2 , 3

p0 −

f 3 p1 p1

2

p1 −

f 3 p2 p2

2

p2 = x 3 −

⎫ ⎪ −1 ⎪ 1 1 2 2⎪ 2 f 3 p1 = ∫ x 4dx = , p1 = p1 p1 = ∫ x 2dx = ⎪ 5 3⎪ −1 −1 ⎬⇒ 1 1 ⎪ 3 2 f 3 p 2 = ∫ x (x − )dx = 0 ⎪ 3 −1 ⎪ 1 ⎪ 1 2 8 2 2 p 2 = p 2 p 2 = ∫ ( x − ) dx = ⎪ 3 45 ⎪⎭ −1

f 3 p0 p0

2

p 2 (x ) = x 2 −

p0 −

f 3 p1 p1

2

1 3

p1 −

1

f 3 p 0 = ∫ x 3dx = 0

Prof. Dr. I. Nasser ([email protected])

3

p 3 (x ) = x 3 −

(2 / 5) 3 x =x3− x (2 / 3) 5

f 3 p2 p2

2

p2 ;

Prof. Dr. I. Nasser Gram-Schmidt_Phys571_T131

Phys 571 T_131

October 22, 2013

c- The normalized set p 0 (x ) =

po ( x ) 1 = , p0 2

p1 (x ) =

p1 (x ) x 3 = = x, p1 2 2/3

⎛ 2 1⎞ x − ⎟ p (x ) ⎜⎝ 5 3⎠ 3x 2 − 1 , p 2 (x ) = 2 = = 8 p2 8 / 45

(

)

⎛ 2 3 ⎞ x − x⎟ p (x ) ⎜⎝ 7 5 ⎠ p 3 (x ) = 3 5x 3 − 3x , = = 8 p3 8 /175

(

Prof. Dr. I. Nasser ([email protected])

)

4

Prof. Dr. I. Nasser Gram-Schmidt_Phys571_T131

Phys 571 T_131

October 22, 2013

Example: Let V = R 3 with the Euclidian inner product. Apply Gram-Schmidt algorithm to

⎛2⎞ ⎛1⎞ ⎛3⎞ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ orthogonalize the basis u1 = ⎜ −1⎟ , u 2 = ⎜ 0 ⎟ , and u3 = ⎜ 7 ⎟ . ⎜0⎟ ⎜ −1⎟ ⎜ −1⎟ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠

Ans: ⎛2⎞ ⎜ ⎟ v1 = ⎜ −1⎟ , ⎜0⎟ ⎝ ⎠ ⎛2⎞ ⎜ ⎟ 1 0 −1) ⎜ −1⎟ ( ⎛1⎞ ⎜ 0 ⎟ ⎛ 2 ⎞ ⎛ 1 ⎞ 2⎛ 2 ⎞ 1⎛ 1 ⎞ u 2 v1 ⎜ ⎟ ⎝ ⎠ ⎜ − 1 ⎟ = ⎜ 0 ⎟ − ⎜ −1 ⎟ = ⎜ 2 ⎟ v2 = u2 − v1 = ⎜ 0 ⎟ − 2 ⎛ 2 ⎞ ⎜⎜ ⎟⎟ ⎜⎜ ⎟⎟ 5 ⎜⎜ ⎟⎟ 5 ⎜⎜ ⎟⎟ v1 ⎜ −1 ⎟ ⎝ ⎠ 2 −1 0 ⎜ −1⎟ ⎝ 0 ⎠ ⎝ −1⎠ ⎝0⎠ ⎝ −5 ⎠ ( )⎜ ⎟ ⎜0⎟ ⎝ ⎠ ⎡ ⎛ 1 ⎞⎤ ⎛2⎞ 1 ⎜ ⎟ ( 3 7 −1) ⎢⎢ ⎜⎜ 2 ⎟⎟ ⎥⎥ 3 7 −1) ⎜ −1⎟ ( 5 ⎡ ⎛ 1 ⎞⎤ ⎛3⎞ ⎜ 0 ⎟⎛ 2 ⎞ ⎢ ⎜⎝ −5 ⎟⎠ ⎦⎥ ⎢ 1 ⎜ ⎟ ⎥ u3 v1 u3 v 2 ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎣ 2 −1 − v3 = u3 − v1 − v2 = ⎜ 7 ⎟ − 2 2 ⎛ 2 ⎞ ⎜⎜ ⎟⎟ ⎡ ⎛ 1 ⎞ ⎤ ⎢ 5 ⎜⎜ ⎟⎟ ⎥ v1 v2 ⎜ −1 ⎟ ⎢ −5 ⎥ 1 ⎝ ⎠ 2 −1 0 ⎜ −1⎟ ⎝ 0 ⎠ 1 ( )⎜ ⎟ (1 2 −5 ) ⎢⎢ ⎜⎜ 2 ⎟⎟ ⎥⎥ ⎣ ⎝ ⎠ ⎦ 5 5 ⎜0⎟ ⎢⎣ ⎜⎝ −5 ⎟⎠ ⎥⎦ ⎝ ⎠ ⎛2⎞ ⎛ 1/ 5 ⎞ ⎛8⎞ ⎛3⎞ ⎟ 1⎜ ⎟ ⎜ ⎟ (−1) ⎜ ⎟ (22 / 5) ⎜ 2 / 5 ⎟ = ⎜16 ⎟ −1 − =⎜ 7 ⎟− 5 ⎜⎜ ⎟⎟ ( 30 / 25 ) ⎜⎜ ⎟ 3⎜ 8 ⎟ ⎜ −1 ⎟ ⎝0⎠ ⎝ −5 / 5 ⎠ ⎝ ⎠ ⎝ ⎠

The normalization could be calculated as follows: ⎛2⎞ 1 2 ⎜ ⎟ 2 v1 = A ( 2 −1 0 ) ⎜ −1⎟ = 1 ⇒ A = . 5 ⎜0⎟ ⎝ ⎠

⎡ ⎛ 1 ⎞⎤ 1 1 5 ⎢ 1 ⎜ ⎟⎥ . v 2 = B 2 (1 2 −5 ) ⎢ ⎜ 2 ⎟ ⎥ = B 2 ( 30 ) = 1 ⇒ B = 5 5⎜ ⎟ 25 6 ⎢⎣ ⎝ −5 ⎠ ⎥⎦ ⎡ ⎛ 8 ⎞⎤ 1 2 ⎢ 1 ⎜ ⎟⎥ 2 1 v 3 = C ( 8 16 8 ) ⎢ ⎜16 ⎟ ⎥ = C 2 ( ?? ) = 1 ⇒ C = ?. 3 3 9 ⎢⎣ ⎜⎝ 8 ⎟⎠ ⎥⎦ 2

Prof. Dr. I. Nasser ([email protected])

5

Prof. Dr. I. Nasser Gram-Schmidt_Phys571_T131

2-

Phys 571 T_131

October 22, 2013

a) f o =1 , f1 = x , f 2 = x 2 , f 3 = x 3

Given that

To produce a set of orthoginal polynomials using G.S process: let

w 1 = f o =1

w 2 = f1

w3 = f2

w f − 1 1 w1 w1 w1

But

w 1 f 1 = ∫ x dx = 0 ⇒ w 2 = f 1 = x −1

1

w f w f − 1 2 w1 − 2 2 w 2 w1 w1 w2 w2 1

And

1

w 1 f 2 = ∫ x 2 dx = −1

w4 = f3 −

w1 f3 w1 w1

w1 −

2 3

But

w 2 f 2 = ∫ x 3 dx = 0 −1

1

&

w 1 w 1 = ∫ dx = 2

w2 f3 w2 w2



w3 =x2 −

−1

w2 −

w3 f3 w3 w3

w3

⎫ ⎛ x3⎞ w 3 f 3 = ∫ ⎜ x 5 − ⎟ dx = 0 ⎪ 3 ⎠ −1 −1 ⎝ ⎪ ⎪ ⎬ ⇒ ⎪ 1 1 2 2 ⎪ = ∫ x 4 dx = & w 2 w 2 = ∫ x 2 dx = ⎪⎭ 5 3 −1 −1 1

w 1 f 3 = ∫ x dx = 0 &

1 3

1

3

w2 f3

∴ The set of orthogonal polynomials: 1 3 ⎫ ⎧ 2 3 ⎨w 1 =1 , w 2 = x , w 3 = x − , w 4 = x − x ⎬ 3 5 ⎭ ⎩

b)

Prof. Dr. I. Nasser ([email protected])

6

3 w4 =x3− x 5

Prof. Dr. I. Nasser Gram-Schmidt_Phys571_T131

⎫ ⎪ −1 ⎪ 1 ⎪ 1⎞ 1 1 1 1 ⎛ ⎪ = ∫ ⎜ x 2 − ⎟ dx = − − + = 0 3 3 3 3 3 ⎪ ⎝ ⎠ −1 ⎪ 1 1 3 1 3 ⎛ 3 3 ⎞ = ∫ ⎜ x − x ⎟ dx = − − + = 0 ⎪ ⎪⎪ 5 ⎠ 4 10 4 10 −1 ⎝ ⎬ ⇒ 1 1 1 1 1 ⎛ 3 1 ⎞ = ∫ ⎜ x − x ⎟ dx = − − + = 0 ⎪ ⎪ 3 ⎠ 4 6 4 6 −1 ⎝ ⎪ 1 ⎪ 1 1 1 1 ⎛ 4 3 2⎞ = ∫ ⎜ x − x ⎟ dx = − + − = 0 ⎪ 5 ⎠ 5 5 5 5 −1 ⎝ ⎪ 1 ⎪ 14 1 ⎞ ⎛ ⎪ = ∫ ⎜ x 5 − x 3 + x ⎟ dx = 0 15 5 ⎪⎭ ⎝ ⎠ −1 1

w 1 w 2 = ∫ x dx = w1 w3 w1 w 4 w2 w3 w2 w4 w3 w4

Phys 571 T_131

October 22, 2013

1 1 − =0 2 2

w 1 , w 2 , w 3 , w 4 are orthogonal

c) v1 = v2 = v3 = v4 =

w1 w1 w1 w2 w2 w2 w3 w3 w3 w4 w4 w4

, w1 w1 = 2

⎫ ⎪ ⎪ ⎪ x ⎪ = ⎪ 2/3 ⎪ ⎬ Normalized set 2 x − (1/ 3) ⎪ = ⎪ 8 / 45 ⎪ 3 x − (3 / 5)x ⎪ ⎪ = 4 /175 ⎪ ⎭

⇒ v1 = 1

, w 2 w 2 = ∫ ( x 2 ) dx = −1

2 3

⇒ v2

1

2 1⎞ 8 ⎛ , w 3 w 3 = ∫ ⎜ x 4 − x 2 + ⎟ dx = 3 9⎠ 45 −1 ⎝

⇒ v3

1

6 9 4 ⎛ ⎞ , w 4 w 4 = ∫ ⎜ x 6 − x 4 + x 2 ⎟ dx = 5 25 ⎠ 175 −1 ⎝

Prof. Dr. I. Nasser ([email protected])

7

⇒ v4

1 2

Gram-Schmidt procedure.pdf

Step 1: Let v u, 1 1 = G G. Step 2: Graphically,. N .... Which form a basis for the space of all real polynomials of degree ≤ 3 on the ... Gram-Schmidt procedure.pdf.

148KB Sizes 0 Downloads 245 Views

Recommend Documents

No documents