f(x) = -x 3 + bx 2 + cx + d
f(x) = 0 with x 0 = 0, x 1 = 1, x 2 = k
Because of x 0 we know: d = 0
So we have the equation f(x) = -x 3 + bx 2 + cx
f(1) = -(1 3) + b(1 2) + c1 = 0 b + c = 1 b = 1-c
Remainder of division is 8, so we conclude:
(-x 3 + bx 2 + cx):(x-3) = -x 2 + x(b-3) + (c + 3(b - 3)) + 3(c + 3(b - 3))/(x-3)
3(c + 3(b - 3)) = 8 = 3c + 9b - 27 3c + 9b = 35
Insert b = 1-c into the last equation and solve for c:
3c + 9(1-c) = 35 = 3c + 9 - 9c = 9 - 6c c = -26/6 = -13/3
Insert c = -13/3 into f(1):
b = 1-(-13/3) = 16/3
So we have the final equation: f(x) = -x 3 + (16x 2)/3 - 13x/3 = -x(x 2 - 16x/3 + 13/3)
Now just solve x 2 - 16x/3 + 13/3 = 0
[input]x^2 - 16x/3 + 13/3 = 0[/input]
Edit: Misread. Actual roots are x 0 = 1, x 1 = 2, x 2 = k
So we have:
f(1) = -(1 3) + b(1 2) + c1 + d = 0 b + c + d = 1
f(2) = -(2 3) + b(2 2) + 2c + d = -8 + 4b + 2c + d = 0 4b + 2c + d = 8
f(k) = -(k 3) + b(k 2) + kc + d = 0
So the actual division would result into:
(-x 3 + bx 2 + cx + d):(x-3) = -x 2 + x(b-3) + (c + 3(b - 3)) + (3(c + 3(b - 3)) + d)/(x-3)
(3(c + 3(b - 3)) + d) = 8 9b + 3c + d = 35
Gauss-Jordan:
[1] 1 1 1 1
[2] 4 2 1 8
[3] 9 3 1 35
[2] - [1], [3] - [1]
[1] 1 1 1 1
[2] 3 1 0 7
[3] 8 2 0 34
[3] - 2x[2]
[1] 1 1 1 1
[2] 3 1 0 7
[3] 2 0 0 20 2b = 20 b = 10
Insert b = 10 into [2]
3*10 + c = 7 c = 7-30 = -23
Insert b = 10 and c = -23 into [1]
10 - 23 + d = 1 d = 14
Final equation f(x) = -x 3 + 10x 2 - 23x + 14