Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

my aim is to fit data points by the use of Legendre Polynomials. Has anybody experience with this task? My final aim is to do this automatically with mathematica.

Thanks, rainer

share|cite|improve this question
"My final aim is to do this automatically with mathematica" - Look up Fit[] – J. M. Aug 20 '12 at 8:00

Is it enough to use to Legendre Polynomials as basis within the Fit[] Function. Fit[data,{LegendreP[1,x],LegendreP[2,x],LegendreP[3,x]},x] I would be glad about an explanation how it actually works. Thx rainer

share|cite|improve this answer
You've forgotten the constant term: Fit[data, {1, LegendreP[1, x], LegendreP[2, x], LegendreP[3, x]}, x] – J. M. Aug 21 '12 at 0:51
The problem is for an arbitrary set of data points this produces exactely the same solution as: Fit[data, {1,x,x^2,x^3}, x]. So I do not understand what the special thing about Legendre Approximation is. – rainer Aug 21 '12 at 5:51

Your Answer


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.