Talk:Lagrange polynomial

message: Do we really have to multiply everything by four, so that we get integers? It gave me something of a double-take. I think it would be more intuitive the other way, so it is easier to figure out what numbers came from where. Sim 16:29, 6 March 2007 (UTC)
replies: text: I assume you're talking about using factors like (4x-3) in the construction of the Lagrange polynomial, instead of (x-\tfrac34) , in which case, I agree that it's better to do it the other way. Please go ahead and change it. -- Jitse Niesen (talk) 09:36, 7 March 2007 (UTC)
replies: text: agreed.  I wasted a good 30 minutes wondering if I had completely forgot how to do algebra because my numbers didn't match what was given here (and worse, there is NO indication that some transformation has been done).  It is VERY confusing for people who are attempting to digest and understand how something works, when they don't really know what to expect anyway, and then there are unstated transformations being done in the formulas. I'm not going to change the formulas, but I will make a note of the multiplication by four. Omnirizon (talk) 21:37, 9 January 2010 (UTC)
thread_title:  Multiplying by four 

message: Any chance of a brief discussion of errors for Lagrange interpolation, preferably by someone who understands it properly (i.e., not me!)? me_and 21:21, 9 June 2007 (UTC)
thread_title:  Errors 

message: instead of
      for (int j = 0; j < degree; ++j) {
         // The i-th term has to be skipped
         if (j != i) {
            weight *= (desiredPos - pos[j]) / (pos[i] - pos[j]);
         }
      }
it is more efficient to do two for loops
      for (int j=0; j
This avoid the cost of a test at each iteration.  —Preceding unsigned comment added by 199.212.17.130 (talk) 14:44, 6 August 2008 (UTC)
thread_title:  Efficient code 

message: :It was first discovered by Edward Waring in 1779 and later rediscovered by Leonhard Euler in 1783.
Is that likely to really be right?  It's a pretty straightforward idea and it wouldn't surprise me if it goes back to the beginnings of algebra in the middle ages and has been rediscovered many times.  I discovered it myself in 10th grade and I'm not all that good at math. 66.127.55.192 (talk) 18:35, 5 February 2010 (UTC)
replies: text: True but as all discoveries go, they are 'discovered' by the person who first puts in on paper and publishes the result/knowledge to the public so that they may use it. And it is not inconceivable that this was first done by Edward Waring in 1779 and later independently also by Leonhard Euler in 1783. Jeroendv (talk) 14:13, 24 October 2010 (UTC)
replies: text:  Lagrange interpolation formula has a determinant form. 70.53.231.164 (talk) 23:52, 23 January 2015 (UTC)
thread_title:  Discovery 

message: How is barycentric first form supposed to work? It says it avoids the cost of recomputing the whole lot of numbers on each query but it has the (x - x[j]) denominator in w[j]/(x-x[j]) which is potential division by zero.  — Preceding unsigned comment added by 93.85.168.72 (talk) 22:53, 24 November 2013 (UTC)
replies: text: Yes, I think it should be added somewhere that this form may become pathologic when one tries to interpolate too close to a x(j) position.  — Preceding unsigned comment added by PBenard (talk • contribs) 09:14, 30 January 2014 (UTC)
replies: text:  I added some explanation of why this is okay. In computer implementations, when your formula results in NaN, you must double-check if the input was one of the nodes and if so return the corresponding value. –jacobolus (t) 04:30, 20 June 2022 (UTC)
thread_title:  Barycentric 

message: In the section 'Main idea' the mathematical text is italicized, which is right, but the brackets are too, which isn't.
86.185.221.253 (talk) 17:52, 10 February 2015 (UTC)
thread_title:  Type setting problem 

message: Hello fellow Wikipedians,
I have just modified one external link on Lagrange polynomial. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
*Added archive https://web.archive.org/web/20101013180326/http://www2.maths.ox.ac.uk/chebfun/ to http://www.maths.ox.ac.uk/chebfun/
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
Cheers.—InternetArchiveBot (Report bug) 14:20, 15 December 2017 (UTC)
thread_title:  External links modified 

message: I think the classic Runge's example, as shown e.g. in https://www.math.usm.edu/lambers/mat772/fall10/lecture5.pdf is even more illustrative of the problem with Lagrange interpolation. This is a problem likely to occur with real-world data, to even worse degrees, and I worry that the article might not give enough prominence to it.  — Preceding unsigned comment added by 77.61.180.106 (talk) 16:05, 1 January 2021 (UTC)
replies: text: Runge's phenomenon is essentially a problem with equally spaced nodes. In practice it's not a problem since if the function being interpolated is smooth, using Chebyshev or Legendre nodes is guaranteed to converge to the function being interpolated, see https://epubs.siam.org/doi/10.1137/060659831 or https://www.ams.org/journals/mcom/2012-81-278/S0025-5718-2011-02549-4/ AwkwardWhale (talk) 12:43, 3 November 2021 (UTC)
thread_title:  Runge's example 

message: Newton's method and all similar forward and backward difference formulations require that the points be spaced equally, something that Lagrangian polynomials do not require. However, I did not see this mentioned and should be mentioned early to alert users of the viability of this solution.
Source: "Applied Numerical Analyis", 3rd Edition, 1984, Authors: Curtis F. Gerald/Patrick O. Wheatley, Publisher: Addison Wesley
Yamex5 (talk) 17:48, 6 November 2021 (UTC)
thread_title:  Missing equidistant point constraint 

message: The first two sentences of the article are as follows:
"In numerical analysis, Lagrange polynomials are used for polynomial interpolation. For a given set of points (x_j,y_j) with no two x_j values equal, the Lagrange polynomial is the polynomial of lowest degree that assumes at each value x_j the corresponding value y_j, so that the functions coincide at each point."
There has been no reference whatsoever to any "function" other than the Lagrange polynomial. So it is ridiculous to say "the functions coincide".
I hope someone knowledgeable about this subject can rewrite this nonsense. 2601:200:C000:1A0:A811:7DCB:E6BC:FA8A (talk) 18:41, 12 November 2021 (UTC)
replies: text: I rewrote the intro. Is that clearer? –jacobolus (t) 04:32, 20 June 2022 (UTC)
thread_title:  The second sentence is nonsense