配方
y=ax^2+bx+c
=a(x^2+bx/a)+c
=a[x^2+2*(b/2a)*x+(b/2a)^2-(b/2a)^2]+c
=a(x+b/2a)^2-a*b^2/4a^2+c
=a(x+b/2a)^2-b^2/4a+4ac/4a
=a(x+b/2a)^2+(4ac-b^2)/(4a)
=a[x-(-b/2a)]^2+(4ac-b^2)/(4a)
所以顶点是[-b/2a,(4ac-b^2)/(4a)]
对称轴是x=-b/2a
配方
y=ax^2+bx+c
=a(x^2+bx/a)+c
=a[x^2+2*(b/2a)*x+(b/2a)^2-(b/2a)^2]+c
=a(x+b/2a)^2-a*b^2/4a^2+c
=a(x+b/2a)^2-b^2/4a+4ac/4a
=a(x+b/2a)^2+(4ac-b^2)/(4a)
=a[x-(-b/2a)]^2+(4ac-b^2)/(4a)
所以顶点是[-b/2a,(4ac-b^2)/(4a)]
对称轴是x=-b/2a