# Legendre Polynomial fitting

Discussion in 'Math' started by sytem_recon, Jun 11, 2010.

1. ### sytem_recon Thread Starter Active Member

Apr 21, 2009
52
0
I have experimental data of an equation of type: y = a1*e^(b*x) where e is the exponential(antilog) for the y experimental data corresponding to x. My task is to fit the legendre polynomial of order 4, how i can do it. For this in the legendre equation what values i should use x or y or both. I have no idea that how to fit the legendre polynomial to experimental data. Please help anyone in this.

2. ### someonesdad Senior Member

Jul 7, 2009
1,577
142
From this post and your previous one on linear regression, it appears you are a student. Your problem is not well-posed, so you'd get better answers if you posted the problem exactly as it was given to you.

It would also help if you explain the background of your problem, as it doesn't really make sense. The second derivative of the exponential function is monotonic, but the second derivative of the fourth Legendre polynomial is not, so why would you want to fit a function that's inherently not a good fit? Or are you only concerned about a small domain where the functions could be made to match pretty well?

The reason I said your problem is poorly posed is because the Legendre polynomial is a well-defined fourth order polynomial. There are no parameters in the definition and, to fit a function, you generally want a family of functions, which means you need one or more parameters in the equation to be fit.

3. ### sytem_recon Thread Starter Active Member

Apr 21, 2009
52
0
The problem given to me is to calculate alpha from experimental (I) data where alpha follows the eqation:
alpha = d/dt(ln I(t)) and for this the following statement is also given:
(check attachment). Now, how i use legendre polynomial for this.

File size:
37.7 KB
Views:
26
4. ### sytem_recon Thread Starter Active Member

Apr 21, 2009
52
0
The problem given to me is to calculate alpha from experimental (I) data where alpha follows the eqation:
alpha = d/dt(ln I(t)) and for this the following statement is also given:
(check attachment). Now, how i use legendre polynomial for this.

File size:
126.5 KB
Views:
28

Apr 21, 2009
52
0

6. ### someonesdad Senior Member

Jul 7, 2009
1,577
142
If you have I(t) data and you want to fit it to Legendre polynomials up to fourth order, then you'd write a model equation like

$I = a_0 L_0 + a_1 L_1 + ...$

where the L's are the Legendre polynomials. Here, the $a_i$ would be regression constants, so this is a simple multiple linear regression problem. In fact, if you rewrite it algebraically after substituting the Legendre polynomials in, you'll just get fourth-order polynomial, so you might as well start with that. I can't see any practical benefit by trying to expand in orthogonal polynomials.

7. ### sytem_recon Thread Starter Active Member

Apr 21, 2009
52
0
Instead of ledendre can we use spline fitting for this problem.