ĐIều kiện:`x^2-7x+8>=0`
`<=>x^2-2*x*7/2+49/4-17/4>=0`
`<=>(x-7/2)^2-17/4>=0`
`<=>(x-7/2)^2>=17/4`
`<=>|x-7/2|>=sqrt{17}/2`
`<=>` \(\left[ \begin{array}{l}x \ge \dfrac{7+\sqrt{17}}{2}\\x \le \dfrac{-\sqrt{17}+7}{2}\end{array} \right.\)
`pt<=>x^2-7x+sqrt{x^2-7x+8}-12=0`
`<=>x^2-7x+8+sqrt{x^2-7x+8}-20=0`
Đặt `a=sqrt{x^2-7x+8}(a>=0)`
`pt<=>a^2+a-20=0`
`<=>a=4(tm),a=-5(l)`
`<=>x^2-7x+8=16`
`<=>x^2-7x-8=0`
`a-b+c=0`
`=>x_1=-1(tm),x_2=8(tm)`
Vậy `S={-1,8}`