At school we are studying the parabola and our teacher said that the formula for the axis of a parabola is $x=-\frac{b}{2a}$ without giving us the demonstration; so I tried to come up with a nice prove for the equation by myself.
Here's what I thought:
The axis of a parabola passes from his vertex $v$ that is the point equidistant from both the solution of the equation.
$$v=\frac{x_2-x_1}{2}\rightarrow v=\frac12\left(\frac{-b+\sqrt{b^2-4ac}+b+\sqrt{b^2-4ac}}{2a}\right)=\frac{\sqrt{b^2-4ac}}{2a}$$
Where did I go wrong?
The middle point is with a plus, not a minus:
The solutions are
$$x_1=\frac{-b+\sqrt{\Delta}}{2a}\;,\;\;x_2=\frac{-b-\sqrt{\Delta}}{2a}\;\;,\;\;\;\Delta:=b^2-4ac\implies$$
$$\text{Middle point}\,:\;\;\frac{x_1+x_2}2=-\frac b{2a}$$