Application of Differentiation Prove that if the curve $y = x^3 + px + q$ is tangent to the x-axis, then 
$$4p^3 + 27q^2 = 0$$
I differentiated $y$ and obtained the value $3x^2 + p$. If the curve is tangent to the x-axis, it implies that $x=0$ (or is it $y = 0$?). How do I continue to prove the above statement? Thanks. 
If I substitute in $x=0$, I will obtain $y= q$? Are my above steps correct? Please guide me. Thank you so much!

Hint:
Let $f(x)=x^3+px+q$.
Since the x-axis has equation $y=0$, the graph of $f$ is tangent to the x-axis 
if there is a number $a$ such that $f(a)=a^3+pa+q=0$ and $f^{\prime}(a)=3a^2+p=0$.
Then $q=-(a^3+pa)\implies q^2=(a^3+pa)^2=a^6+2pa^4+p^2a^2\;\;$ where $a^2=-\frac{p}{3}$.
