Lagrange Interpolationspolynom pur
Author: Prof. Dr. Dörte Haftendorn
Date: Mai 06

Man kann die Basispolynom zuschaften. Deren streckfähige Verisonen kan man durch das passene c anpassen.

Ha Mai 06

Interpolationspolynom, ziehe an den Punkten

Schalte dann la1c(x) dazu und bewege c1.
Ebenso für die anderen Nummern.

c0 = -0.4
D = (4.996296296296297, 1.5)
C = (3.5, 2.5)
B = (2, 1)
A = (0, 0.5)
c1 = -0.1 (slider from -5 to 5, step 0.01)
la1(x) = (x - x(A)) * (x - x(C)) * (x - x(D))
c2 = -1.5000000000000002
c3 = 0.20000000000000015
la0(x) = (x - x(B)) * (x - x(C)) * (x - x(D))
la3(x) = (x - x(A)) * (x - x(B)) * (x - x(C))
la2(x) = (x - x(A)) * (x - x(B)) * (x - x(D))
la(x) = y(A) / ((x(A) - x(B)) * (x(A) - x(C)) * (x(A) - x(D))) * (x - x(B)) * (x - x(C)) * (x - x(D)) + y(B) / ((x(B) - x(A)) * (x(B) - x(C)) * (x(B) - x(D))) * (x - x(A)) * (x - x(C)) * (x - x(D)) + y(C) / ((x(C) - x(A)) * (x(C) - x(B)) * (x(C) - x(D))) * (x - x(A)) * (x - x(B)) * (x - x(D)) + y(D) / ((x(D) - x(A)) * (x(D) - x(B)) * (x(D) - x(C))) * (x - x(A)) * (x - x(B)) * (x - x(C))
la0c(x) = c0 * la0(x)
la1c(x) = c1 * la1(x)
la2c(x) = c2 * la2(x)
la3c(x) = c3 * la3(x)
p(x) = la0c(x) + la1c(x) + la2c(x) + la3c(x)