why would this not work when roots don’t exist? even if complex roots, the discriminant cancels out and gives -b/2a ALWAYS.

EDIT: okay i realise it isn’t intuitive for you to take the midpoint of two complex numbers.

So i’ll introduce a bit of conic sections. A parabola can always be represented in the form

(x-h)\^2 = 4a(y-k).

vertex of the parabola are (h,k). and focus is (h,k+ a). This is only for a vertical parabola, no rotated or horizontal parabolas work like this. Also, you havent taken them into account so this satisfies the normal quadratic equation well. Try proving how you can go from ax\^2 + bx + c to here and how vertex and focus are found. You might have trouble if you don’t know exactly what a parabola is. A parabola is the locus of a point, the ratio of whose distance from a fixed line and a fixed point is 1. This ratio is called the eccentricity.

Now let’s talk a little about complex numbers. Think of them as vectors, and the real number part of the complex number is always on the x axis or the real line. You can almost think of it as being multiplied with the ihat unit vector. And think of iota or sqrt(-1) as the jhat unit vector. In the end the roots or a parabola with D < 0 will end up looking like m +/- i(n). m is the real part and n is the imaginary scalar. Now the midpoint of the two points that these vectors make them land at is still (m,0). Here an important distinction however is that the origin of a complex plane is not necessarily origin of the cartesian plane in which you plot the parabola.

IF THAT RAMBLE DOESN’T MAKE SENSE, read this. Remember how at the critical point we can say that the parabola is symmetric about it. Why not try doing that. Put in x = 0 in a parabola with no real roots. You’ll know the y intercept of it. Now let’s say the vertex has the coordinates (h,k). Then if you move h distance along the x axis backwards you reach x = 0. And if you move h distance forwards, you reach x = 2h. However, both at x = 0 and x + 2h the parabola has the same y value. So if you know the value of y at x = 0, you know the value of k which is just half of it. What about h? Well at x = 0, ax\^2 + bx + c = c. Now if you solve for ax\^2 + bx + c = c, you get ax\^2 = -bx. So x = 0 or x = -b/a. Here 2h = -b/a. So h is -b/2a.

I put the best proof in the end because im dumb.