As @Lubin wrote in comments, you face elliptic integrals.
The easiest way to handle them is to write
$$ax^3+bx^2+cx+q=a(x-r)(x-s)(x-t)$$ where $(r,s,t)$ are the roots of the cubic equation.
I let the simplifications to you
If the three roots are different the antiderivative will write
$$-\frac{2 (x-r)^{3/2} \sqrt{\frac{x-s}{x-r}} \sqrt{\frac{x-t}{x-r}} }{\sqrt{s-
r} \sqrt{a (x-r) (x-s) (x-t)}}\,\,F\left(\sin ^{-1}\left(\frac{\sqrt{s-r}}{\sqrt{x-r}}\right)|\frac{r-t}{r-s}\right)$$
If there is a double root $(t=s)$
$$\frac{2 \sqrt{x-r} (x-s) }{\sqrt{r-s} \sqrt{a (x-r)
(x-s)^2}}\tan
^{-1}\left(\frac{\sqrt{x-r}}{\sqrt{r-s}}\right)$$
If there is a triple root $(t=s=r)$
$$-\frac{2 (x-r)}{\sqrt{a (x-r)^3}}$$