Let f(x) be a monic 4th degree polynomial such that f(1) = 1, f(2) = 8, f(3) = 27, f(4) = 64. Find f(5).
f(x) = x^4 + ax^3 + bx^2 + cx + d
1 + a + b + c + d = 1
16 + 8a + 4b + 2c + d = 8
81 + 27a + 9b + 3c + d = 27
256 + 64a + 16b + 4c + d = 64
Solution of simultaneous equations
(it turns out python has such a function in the sympy library)
{a: -9, b: 35, c: -50, d: 24}
f(x) = x^4 - 9x^3 + 35x^2 - 50x + 24
x f(x)
0 24
1 1
2 8
3 27
4 64
5 149
f(5) = 149
|
Posted by Larry
on 2025-01-12 08:54:17 |