Ansatz
f(x) = a·x^3 + b·x^2 + c·x + d
Das Gleichungssystem
f(0) = 1.2 | d = 1.2
f(1) = 4.3 | a + b + c + d = 4.3
f(2) = 8.7 | 8·a + 4·b + 2·c + d = 8.7
f(3) = 12.5 | 27·a + 9·b + 3·c + d = 12.5
f(4) = 14.2 | 64·a + 16·b + 4·c + d = 14.2
In Matrizenschreibweise: A·x = b
[0, 0, 0, 1; 1, 1, 1, 1; 8, 4, 2, 1; 27, 9, 3, 1; 64, 16, 4, 1]·[a; b; c; d] = [1.2; 4.3; 8.7; 12.5; 14.2]
Normalengleichung: A^T·A·x = A^T·b
[0, 1, 8, 27, 64; 0, 1, 4, 9, 16; 0, 1, 2, 3, 4; 1, 1, 1, 1, 1]·[0, 0, 0, 1; 1, 1, 1, 1; 8, 4, 2, 1; 27, 9, 3, 1; 64, 16, 4, 1]·[a; b; c; d] = [0, 1, 8, 27, 64; 0, 1, 4, 9, 16; 0, 1, 2, 3, 4; 1, 1, 1, 1, 1]·[1.2; 4.3; 8.7; 12.5; 14.2]
[4890, 1300, 354, 100; 1300, 354, 100, 30; 354, 100, 30, 10; 100, 30, 10, 5]·[a; b; c; d] = [1320.2; 378.8; 116; 40.9]
Die Lösung des Gleichungssystems ergibt hier
a = - 17/60 ∧ b = 51/35 ∧ c = 821/420 ∧ d = 209/175
a = -0.2833 ∧ b = 1.4571 ∧ c = 1.9548 ∧ d = 1.1943
Damit lautet das Ausgleichspolynom
f(x) = - 17/60·x^3 + 51/35·x^2 + 821/420·x + 209/175