Let start with some basic theory of quadratics
If f(x)=ax2+bx+c a,b,c ∈R a≠0 f(x)=ax2+bx+c a,b,c ∈R a≠0 has 2 2 roots r1 r1 and r2 r2 than it can take the form f(x)=a(x−r1)(x−r2).f(x)=a(x−r1)(x−r2).
The maximum or minimum value of f(x) f(x) is M=−(b2–4ac)4a M=−(b2–4ac)4a
If a>0 a>0 then M M is the minimum value and if a<0 a<0 then M M is the maximum value.
Lets go now to the question
Since 2 2 and 7 7 are the roots our function will be f(x)=a(x−2)(x−7), a∈R f(x)=a(x−2)(x−7), a∈R
so f(x)=a(x2