I am studying on cubic equations for an essay and I have reached the general formula for any cubic equation. However I didn't realise what is what while formulating it, like discriminant. Now, I am trying to obtain it just like how it is done in quadratic equations.
I know that the vertex point (or points where the concavity changes or what it is because I do not really know what is what exactly. I will call these vertex points.) is the average of the real roots in a quadratic function. So, for any cubic equation in the form of:
$$a x^3 + b x^2 + c x + d = 0$$
Our vertex point is $\frac{-b}{3a}$ if there are $3$ real roots, and $\frac{-b}{a}$ if there is $1$ real root, as the sum of real roots of a cubic equation is equal to $-\frac{b}{a}$.
The discriminant of a quadratic equation is obtained by replacing x with the vertex point, $\frac{-b}{2a}$. In this case I replaced x with $\frac{-b}{3a}$, for 3 real roots, and obtain something that I thought it is a point equidistant from all the real roots, but I don't know if it really is.
I would like to know if I am going wrong and the correct way to the discriminant of a cubic equation with explanation.
You are going in the wrong direction. I don't know what is the vertex point of a cubic. However, it is true that the sum of all roots of that cubic (real or not) is $-\frac ba$.
Dealing with $-\frac b{3a}$ is useful because if you replace $x$ by $x-\frac b{3a}$ in your cubic, then you get a new cubic without a second degree monomial. Then, if you divide everything by $a$, you get a reduced cubic: $x^3+px+q$. And reduced cubics are easier to deal with than general ones.
On the other hand, you should keep in mind that the discriminant of your cubic is $\bigl((r_1-r_2)(r_1-r_3)(r_2-r_3)\bigr)^2$, where $r_1$, $r_2$, and $r_3$ are the roots of the cubic.