Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How would I construct a second degree Legendre Polynomial for $f(x)=cos(x)$ on the interval $[-1,1]$? I am not understanding the explanation in the book. I just want to know how to start.

Thanks.

share|improve this question
    
What do you mean by "a Legendre Polynomial for $f(x)$"? Do you mean a partial sum of the Fourier-Legendre series? Exactly your example is done at en.wikipedia.org/wiki/Generalized_Fourier_series –  Robert Israel Nov 5 '12 at 19:40
    
Sorry, I meant a second degree Legendre least squares approximation to $f(x)=cos(x)$. Would I it be the same thing? –  Alti Nov 5 '12 at 19:43
    
Yes, the partial sums of the Fourier-Legendre series are the least squares approximations by linear combinations of Legendre polynomials. –  Robert Israel Nov 5 '12 at 21:44
    
Please change the title, since that is not what you look for. If you wish you might even add the answer yourself. –  AD. Aug 19 '13 at 16:31
add comment

1 Answer

A second order polynomial can be uniquely defined with three distinct points (in general, an order $n$ polynomial requires $n+1$ points).

What does $\cos x$ look like on $[-1,1]$? Well, $\cos$ is symmetric about the $y$-axis. So let's use $x = -1, 0, 1$ as our interpolating points. Then, we wish to find a polynomial such that $P(-1) = \cos (-1)$, $P(0) = \cos 0$, $P(1) = \cos 1$.

Then, it depends on how you're defining the Legendre polynomials. There is a common definition for the Legendre family of orthogonal polynomials, but I'm not entirely sure this is what you are looking for.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.