Home Login  |   Contact  |   About Us       Thursday, November 28, 2024   

Pj0182295- Back to Home
   Skip Navigation LinksHOME ›  AREAS OF EXPERTISE  #1 ›   Interpolation Apps ›  ~ Lagrange Method



Skip Navigation Links.



"Interpolation Solutions"
Lagrange Method
X =
Y =

Array X = { , , , , }
Array Y = { , , , , }
Specify New X values = { , , }



[ Initial ArrayValues X: {1,2,3,4,5} ]
[ Initial ArrayValues Y: {1,4,9,16,25} ]
[ Initial LagrangeX Values specified: {2,3,1} ]

IMPLEMENTATION
Lagrange Interpolation

The Lagrange interpolation is a classical technique for performing interpolation. Sometimes this interpolation is also called the polynomial interpolation. In the first order approximation, it reduces to a linear interpolation, a concept also applied in (see Cubic Spline Method).

Algorithm Creation

For a given set of n + 1 data points (x0,y0),(x1,y1),..., (xn,yn), where no two xi are the same, the interpolation polynomial in the Lagrange form is a linear combination:

y = f(x) = ∑i=0n li(x) f(xi)


Testing the Lagrange Method

In order to test the Lagrange method as defined above, a new TestLagrange() static method has been added and executed. Supporting code and methods are not shown.

           static void TestLagrange();
              {
                 ListBox1.Items.Clear();
                 ListBox2.Items.Clear();
                 double[] xarray = new double[] { t1, t2, t3, t4, t5 };
                 double[] yarray = new double[] { t6, t7, t8, t9, t10 };
                 double[] x = new double[] { t11, t12, t13 };
                 double[] y = Interpolation.Lagrange(xarray, yarray, x);
                 VectorR vx = new VectorR(x);
                 VectorR vy = new VectorR(y);
                 ListBox1.Items.Add(" " + vx.ToString());
                 ListBox2.Items.Add(" " + vy.ToString());
              }

We first defined a set of data points as xarray and yarray. We then compute the y values at the xLagrange values specified. The user can manipulate all values and try variations on the arrays themselves as well as specifying new xLagrange values.



Other Implementations...


Object-Oriented Implementation
Graphics and Animation
Sample Applications
Ore Extraction Optimization
Vectors and Matrices
Complex Numbers and Functions
Ordinary Differential Equations - Euler Method
Ordinary Differential Equations 2nd-Order Runge-Kutta
Ordinary Differential Equations 4th-Order Runge-Kutta
Higher Order Differential Equations
Nonlinear Systems
Numerical Integration
Numerical Differentiation
Function Evaluation


   Quotes

Consulting Services - Back to Home


Home

Home Math, Analysis,
  expertise..."

EIGENVALUE
SOLUTIONS...


> Rayleigh-Quotient Method

> Cubic Spline Method

 

Applied Mathematical Algorithms

Home

ComplexFunctions

Home

NonLinear
Home

Differentiation
Home

Integration
About Us


KMP Software Engineering is an independent multidisciplinary engineering consulting company specializing in mathematical algorithms.

      (About Us) →
Areas of
Expertise


SpecialFunctions
VectorsMatrices
OptimizationMethods
ComplexNumbers
Interpolation
CurveFitting
NonLinearSystems
LinearEquations
DistributionFunctions
NumericalDifferentiation
NumericalIntegration
DifferentialEquations
Smalltalk
FiniteBoundary
Eigenvalue
Graphics
Understanding
Mining


MiningMastery
MineralNews
MineralCommodities
MineralForum
Crystallography
Services


NumericalModeling
WebServices
MainframeServices
OutsourceServices

LINKED IN
MINE REVIEW(by G.Pacheco)
Brand





Home

Login

Contact
Since 2006 All Rights Reserved  © KMP Software Engineering LINKS | PRIVACY POLICY | LEGAL NOTICE