Results 1 to 2 of 2

Math Help - Least Squares with Legendre Polynomials

  1. #1
    Newbie
    Joined
    Nov 2011
    Posts
    15

    Least Squares with Legendre Polynomials

    Find the second degree least squares approximation to f(x)=e^x on [-1, 1] using the Legendre polynomials.

    Using P(x)=a_0*c_0 + a_1*c_1 + a_2*c_2 where the c's are the Legendre polys and the a's are found using the formula a_j =
    int from -1 to 1 of c_j (x) f(x) dx / int from -1 to 1 of (c_j (x))^2 dx

    because the weight function = 1

    I have come up with -14.2556 +8.1548x+4.629x^2 which is very wrong. Could someone please walk me through this?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Aug 2011
    Posts
    249
    Thanks
    60

    Re: Least Squares with Legendre Polynomials

    Hello !

    I have come up with :
    a*P0(x) + b*P1(x) + c*P2(x) where a=1.175201 ; b=1.103638 ; c=0.357814
    P0(x), P1(x), P2(x) are Legendre polynomials.
    This result is the same as :
    A + B*x + C*x where A=0.996294 ; B= 1.103638 ; C=0.536722
    Classical polynomial regression leads exactly to the same result.
    In order to find where is the mistake in your calculus, you should show the details of what you did.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Zeros of Legendre polynomials
    Posted in the Differential Geometry Forum
    Replies: 0
    Last Post: November 7th 2011, 04:55 AM
  2. Using the generating function for the Legendre polynomials
    Posted in the Differential Geometry Forum
    Replies: 3
    Last Post: May 17th 2011, 11:28 AM
  3. Quadrature Using Legendre Polynomials
    Posted in the Advanced Applied Math Forum
    Replies: 2
    Last Post: December 29th 2010, 07:36 AM
  4. Legendre Polynomials
    Posted in the Calculus Forum
    Replies: 2
    Last Post: April 23rd 2008, 09:18 AM
  5. legendre polynomials
    Posted in the Calculus Forum
    Replies: 0
    Last Post: February 8th 2007, 07:23 AM

Search Tags


/mathhelpforum @mathhelpforum