Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Learn to enjoy mathematics.
Google
Web CTK
Try our no ads browsing

Sites for teachers
Sites for parents
Terms of use
Awards

Interactive Activities
CTK Exchange
CTK Insights - a blog

Games & Puzzles
What Is What
Arithmetic/Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Stories for Young
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Other Math sites
Front Page
Movie shortcuts
Personal info
Privacy Policy

Guest book
News sites

Recommend this site

Games to relax

Tutor Match Tutoring and Homework Help

Sites for teachers
Sites for parents

Education & Parenting

Manifesto: what CTK is about Buying a book is a commitment to learning Table of content Try our no ads browsing Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

Lagrange Interpolation

Lagrange interpolation is a way to pass a polynomial of degree N-1 through N points. In the applet below you can modify each of the points (by dragging it to the desired position) and the number of points by clicking at the number shown in the lower left corner of the applet.


This applet requires Sun's Java VM 2 which your browser may perceive as a popup. Which it is not. If you want to see the applet work, visit Sun's website at http://www.java.com/en/download/index.jsp, download and install Java VM and enjoy the applet.


Buy this applet
What if applet does not run?

Note how dragging just one point affects the whole graph. Compare this to the behavior of the cubic spline.

Lagrange polynomials are the interpolating polynomials that equal zero in all given points, save one. Say, given points x1, x2, ..., xN, Lagrange's polynomial #k is the product

 
Pk(x)= (x - x1)/(xk - x1) · (x - x2)/(xk - x2) · ... · (x - xk-1)/(xk - xk-1) · (x - xk+1)/(xk - xk+1) ·...· (x - xN)/(xk - xN),

such that Pk(xk) = 1 and Pk(xj) = 0, for j different from k. There is a simpler way to write Lagrange polynomials. Let

  P(x) = ∏(x - xi),

where product is taken over all possible indices i (1 ≤ i ≤ N). Define also

  P'k(x) = ∏'(x - xi),

where the "prime" indicates the omission of one of the factors, viz., (x - xk). Using P'k Lagrange polynomials appear in a very compact form:

  Pk(x) = P'k(x) / P'k (xk).

In terms of Lagrange's polynomials the polynomial interpolation through the points (x1, y1), (x2, y2), ..., (xN, yN) could be defined simply as

(1) P(x) = y1P1(x) + y2P2(x) + ... + yNPN(x).

You can observe Lagrange's polynomials by clicking on the number to the right of "Show polynomial #". If the number is 0, the starting function is a parabola instead.

(The form (1) of the interpolating polynomial, while correct, is quite inconvenient in several respects for numerical computations. Usually, another one that makes use of Newton's divided differences is implemented instead. This is the route taken by the applet above.)

Graphs of Functions

Copyright © 1996-2008 Alexander Bogomolny

30749250Page copy protected against web site content infringement by Copyscape


Search:
Keywords:



Latest on CTK Exchange
try this puzzle ?/?? + ?/?? + ?/? ...
Posted by albert1950
5 messages
12:40 PM, Nov-18-08

Help me find Hisashi ABE, Pythago ...
Posted by likesmath
2 messages
11:11 AM, Oct-06-08

triangle construction
Posted by Elianto84
12 messages
07:06 PM, Oct-30-08

Gardner's Torus cutting puzzle... ...
Posted by itineracy
3 messages
11:22 PM, Nov-02-08

Three Concurrent Circles
Posted by billmillar
2 messages
12:26 PM, Oct-28-08

A Particular Triangle
Posted by Bui Quang Tuan
2 messages
09:41 AM, Nov-20-08

Error in Fractal Curves and Dimen ...
Posted by miguemate22
1 messages
08:51 AM, Nov-16-08