Lagrange Polynomial Interpolation

In summary, the conversation is about finding a polynomial of degree 20 that satisfies certain conditions. The Lagrange polynomial is suggested as a possible solution, but the conversation ends without finding a definitive answer.
  • #1
xkellyy
5
0

Homework Statement


Find the polynomial p(x) of degree 20 satisfying:
p(-10) =p(-9) = p(-8) = ...=p(-1) = 0
p(0) = 1
p(1) = p(2) = p(3) = ...p(10) = 0


Homework Equations



L(x) := \sum_{j=0}^{k} y_j \ell_j(x)

The Attempt at a Solution



i tried using the formula above:

a = p(-10) / (-1)(-2)(-3)...(-20) = 0

and got zero for all the coefficients excluding the 20th coefficient, which i got 1/0

then i thought about it graphically - it looks like a cos graph so i tried using the maclaurin series expansion but realized that it only works from n to infinity.

any tips?
 
Physics news on Phys.org
  • #2
A few suggestions. Throw some itex and tex tags around your latex to make them render. Next, could you define some of things you're using? What are [itex] y_j, \ell_j,a [/itex]? It is impossible for us to guess what these are supposed to be.

Now assuming I've guess your notation correctly, the Lagrange polynomial is given by

[tex] L(x) = \sum_{j=0}^{20} p(x_j) \ell_j(x) [/tex]
where
[tex] \ell_j(x) = \prod_{i\neq j, i=0}^{20} \frac{ (x -x_j) }{(x_j-x_i)} [/tex]

in which case you are correct, all terms except the j=0 term disappear. So what is [itex] \ell_0 [/itex]?
 
  • #3
Kreizhn said:
A few suggestions. Throw some itex and tex tags around your latex to make them render. Next, could you define some of things you're using? What are [itex] y_j, \ell_j,a [/itex]? It is impossible for us to guess what these are supposed to be.

Now assuming I've guess your notation correctly, the Lagrange polynomial is given by

[tex] L(x) = \sum_{j=0}^{20} p(x_j) \ell_j(x) [/tex]
where
[tex] \ell_j(x) = \prod_{i\neq j, i=0}^{20} \frac{ (x -x_j) }{(x_j-x_i)} [/tex]

in which case you are correct, all terms except the j=0 term disappear. So what is [itex] \ell_0 [/itex]?

so to find the nth coefficient for the x^n-1 term

a(n) = p(n)/(x-x1)(x-x2)(x-x3)...

x1, x2 terms are the x values of the data points provided from ascending order excluding the x(n) point if that makes sense

but what I'm saying is, i get zero or 1/0 (for P(0) = 1) point for all the coefficients i calculate which is where I'm stuck :/
 
  • #4
Okay, I understand the x(n) notation but you still haven't defined what [itex] y_j [/itex] is, what [itex] \ell_j [/itex] is, or how a(n) fits into the definition of the Lagrange polynomial. It's impossible to help you unless you make these things clear.
 
  • #5
yj is the y co-ordinate of the data point...lj is the coefficient of x^n, where n is the varying degrees of the polynomial (in this example, 0-20 because there are 21 data points)

a(n) was just my way of explaining lj.
 
  • #6
Ah, okay.

Well, the [itex] \ell_j [/itex] are never zero. Take a look at how I defined [itex] \ell_j [/itex] in one of my previous posts and you'll see that this is true. What is the formula you are using to calculate them?
 

What is Lagrange Polynomial Interpolation?

Lagrange Polynomial Interpolation is a mathematical method used to approximate a function by constructing a polynomial that goes through a given set of points. It is named after mathematician Joseph-Louis Lagrange.

How does Lagrange Polynomial Interpolation work?

The method works by using a set of known points to construct a polynomial of the lowest degree that passes through those points. This polynomial can then be used to estimate values for the function at other points.

What are the advantages of using Lagrange Polynomial Interpolation?

Some advantages include its simplicity and ability to approximate complex functions with a small number of points. It also provides a unique polynomial for each set of points, unlike other interpolation methods.

What are the limitations of Lagrange Polynomial Interpolation?

One limitation is that as the number of points used increases, the degree of the polynomial also increases, which can lead to numerical instability. It also does not work well with irregularly spaced points.

What are some real-world applications of Lagrange Polynomial Interpolation?

This method is commonly used in fields such as engineering, physics, and computer graphics to approximate data and fill in missing values. It can also be used in signal processing and image reconstruction.

Similar threads

  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
524
  • Calculus and Beyond Homework Help
Replies
7
Views
706
  • Calculus and Beyond Homework Help
Replies
13
Views
2K
Replies
5
Views
383
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
553
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
Back
Top