/LagrangeInterpolation

Lagrange Interpolating Polynomial

Primary LanguageJava

LagrangeInterpolation

Lagrange Interpolating Polynomial

This program takes in user inputted x and y coordinates and returns as output the lowest degree polynomial function that intersects all coordinates

The lagrange polynomial can be expressed in either fraction and decimal forms

The output has been configured to allow the user to simply copy and paste the output into the graphing calculator at https://www.desmos.com/calculator

SAMPLE

[(-5.0,3.0), (2.0,6.0), (-3.5,-3.0), (6.0,-5.0)]

f(x)= (-337.0/2926.0)x^3 + (331.0/5852.0)x^2 + (1162.0/417.0)x^1 + (469.0/418.0)x^0

output1

output