How find this maximum $f=\dfrac{8a^2-6ab+b^2}{4a^2-2ab+ac}$ The quadratic equation $ax^2+bx+c=0$ has two roots in the interval $[0,2]$,Find the maximum of
$$f=\dfrac{8a^2-6ab+b^2}{4a^2-2ab+ac}$$
my idea:we have 
(1):if $a>0$,then let $g(x)=ax^2+bx+c$
$$\Delta=b^2-4ac>0,g(0)\ge 0,g(2)\ge 0$$
then we have $$b^2>4ac,c\ge0,4a+2b+c\ge0$$
(2):if $a<0$,then we have
$$b^2-4ac>0,c\le 0,4a+2b+c\le 0$$.
so I think  this method is very ugly. can someone have nice methods? Thank you 
by the @Yimin hint:we have
$x_{1}+x_{2}=-\dfrac{b}{a},x_{1}x_{2}=\dfrac{c}{a}$,then we have $$f=\dfrac{8a^2-6ab+b^2}{4a^2-2ab+ac}=\dfrac{8-\dfrac{b}{a}+\left(\dfrac{b}{a}\right)^2}{4-2\dfrac{b}{a}+\dfrac{c}{a}}=\dfrac{8+x_{1}+x_{2}+(x_{1}+x_{2})^2}{4+2(x_{1}+x_{2})+x_{1}x_{2}},0\le x_{1},x_{2}\le 2$$

Suppose the roots are $x_1,x_2$, then represent the objective function with the roots.
