What is the maximum value of f(f(x)) in the domain 4≤x≤7 for the function

f(x)=x^2−10x+22?

let y = f(f(x))

= (x^2 - 10x + 22)^2 - 10(x^2 - 10x + 22) + 22

dy/dx = 2(x^2 - 10x + 22)(2x - 10) - 20x + 100
= 0 for a max

(x^2 - 10x + 22)(2x-10) - 10(2x - 10)=0
(2x-10)(x^2 - 10x + 22 - 10) = 0
x = 5 or x = appr 8.6 or appr 1.4 , both of which lie outside our given domain

f(f(5)) = 61
f(f(4)) = 46
f(f(7)) = 13

So the max in the given domain is 61