1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Graham-Schmidt Polynomial Projection

  1. Feb 2, 2010 #1
    This is from my Vector Analysis course today. We've been doing a bit of abstract stuff since class began, but the professor said we're going to get to concrete stuff pretty quickly.

    I think the notation is throwing me off a bit. I'm not sure why the alphas change for each successive polynomial P. The only way it makes sense is for the alpha-m equation to have the Psub-m match the individual alpha, but the x-m exponent match the m-value for the polynomial P you're considering. I hope that makes sense.

    Like for P2, for the two alphas 0 and 1, x^2 appears in both equations, but the P-sub value depends on the alpha.

    We worked P2 alpha 0 in class. I worked P2 alpha 1 by myself. P3 is for homework. Thanks.

    hw3.jpg
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
  3. Feb 2, 2010 #2

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    I think you copied something down wrong. You should have had

    [tex]\alpha_r = \frac{(x^{m+1},P_r(x))}{(P_r(x),P_r(x))}[/tex]

    so that

    [tex]P_{m+1}(x) = x^{m+1}-\sum_{r=1}^{m} \alpha_r P_r(x)[/tex]

    Because the alphas depend on xm+1, they'll change when m changes.
     
  4. Feb 2, 2010 #3
    It seems I was right. The notation is a bit more clear now. Thank you.

    So I did the cumbersome integration of polynomials:

    P0 = 1
    P1 = x
    P2 = x^2 +(3/4)x - (1/3)
    P3 = x^3 - (1/4) - (3/5)x - (24/92)[x^2 + (3/4)x - (1/3)]
     
  5. Feb 2, 2010 #4

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Actually, you should have gotten the Legendre polynomials.
     
  6. Feb 2, 2010 #5
    Oh, I made a few arithmetical errors...
     
    Last edited: Feb 2, 2010
  7. Feb 3, 2010 #6
    Last edited: Feb 3, 2010
  8. Feb 3, 2010 #7

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    You've got it. Those are essentially the Legendre polynomials. They're just different by a constant factor, which doesn't affect their orthogonality. If you multiply your P2 by 3/2, for instance, you'd get the P2(x)=(1/2)(3x^2-1) on the MathWorld page.
     
  9. Feb 3, 2010 #8
    Okay. Yeah, I noticed I was getting a multiple of the Legendre polynomials listed. I'm now working on P0, P1, and P2 for the integral from 0 to 1 of p(x)q(x). I'll probably post those later for confirmation. None of our homework is for a grade. However, what's assigned as homework is going to look uncannily like the exam. Heh. So, I just want to make sure I'm understanding the procedure. Actually, I see that the last bit of homework has the polynomials listed on the MathWorld page.

    I believe I understand the concept. According to my notes and what I remember in class, we have an orthogonal set of non-zero vectors (R3), and this procedure yields a projection of a vector, say y, (x^(m+1)), onto the span of the orthogonal set of vectors. The vector y - the projection yields a vector orthogonal to the span of the orthogonal set of vectors (plane).
     
  10. Feb 3, 2010 #9

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    One way to check your answers is to calculate (Pm,Pn) and verify it comes out to zero whenever m and n are different.

    That's right. You're subtracting off the components of y in the direction of the other vectors, so what you're left with is orthogonal to them.
     
  11. Feb 3, 2010 #10
    So, since the projection is onto, or in, the orthogonal set/plane of vectors, it is of course orthogonal to the rest of the vectors in the set since it is a linear combination.

    For some reason the second part is a bit fuzzy. How is subtracting the projection subtracting off components of y that are in the direction of the other two orthogonal vectors?
     
  12. Feb 4, 2010 #11

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    The Pn(x)'s form a basis, so you can write xm as a linear combination of them:

    [tex]x^m = \sum_{r=0}^m \alpha_r P_r(x)[/tex]

    where the [itex]\alpha_r[/itex]'s are the same ones you calculated. Because the polynomials form an orthogonal basis, the component of xm in the direction of Pr is just [itex]\alpha_r P_r(x)[/itex]. If you subtract [itex]\alpha_r P_r(x)[/itex] from xm, you're removing the piece of xm that points in the direction of Pr. If you subtract everything except the Pm component, you just left with the piece that points in the direction of Pm.

    [tex]\alpha_m P_m(x) = x^m - \sum_{r=0}^{m-1} \alpha_r P_r(x)[/tex]

    which is what you have been calculating. It's like having a vector in R3. If you subtract off the x and y components, you're left with just the z component.
     
  13. Feb 5, 2010 #12
    Thanks. It's much easier to understand graphically. However, the professor has been adamant about us NOT thinking about these abstract ideas graphically. He says, "Okay, graph me an inner product in R4 or R5." Or something like that.

    I have another question concerning the index of summation. Rather than say R=1 to m, shouldn't it be R=0 to me? Because our first term is P0.

    If I remember correctly, we also discovered in class yesterday that the projection gives us the minimum distance from a vector to a point in the plane (subspace). I think I remember this from Cal 3.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Graham-Schmidt Polynomial Projection
  1. Gram-Schmidt process (Replies: 10)

  2. Gram Schmidt question (Replies: 6)

  3. Gram-Schmidt Process (Replies: 2)

Loading...