Explanation:
f(4) means x = 4.
what function definition can we use ? the second one for x >= 4
so,
4² - 10×4 + 21 = 16 - 40 + 21 = -3
f(4) = -3
f(0) means x = 0.
so, we use the first function definition (x < 4).
0 - 4 = -4
f(0) = -4
f(x) = 0
for the first function definition this would only be possible for x = 4. but again, for x = 4 this is invalid.
so, we can only look at the second function definition.
x² - 10x + 21 = 0
a squared equation is solved by
x = (-b ± sqrt(b² - 4ac))/(2a)
in our case
a = 1
b = -10
c = 21
x = (10 ± sqrt(100 - 84))/2 = (10 ± sqrt(16))/2 =
= (10 ± 4)/2 = 5 ± 2
x1 = 5 + 2 = 7
x2 = 5 - 2 = 3, which contradicts again the validity of the second function definition (x >=4).
so, the only valid solution is x = 7