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!
 A: Notice, we have $$y=x^3+px+q$$ $$\frac{dy}{dx}=3x^2+p$$ Since, the x-axis is tangent to the curve at some point where $y=0$ & slope $\frac{dy}{dx}=0$ hence, we have $$\left(\frac{dy}{dx}\right)_{y=0}=0$$ $$3x^2+p=0\iff x^2=\frac{-p}{3}\tag 1$$
Now, at the point of tangency with the x-axis we have $$y=0\iff x^3+px+q=0$$ $$x^3+px+q=0$$ $$(x^3+px)=-q$$$$ (x^3+px)^2=(-q)^2$$ $$x^6+2px^4+p^2x^2=q^2$$
$$(x^2)^3+2p(x^2)^4+p^2x^2=q^2$$ Setting the value of $x^2$ from (1), we get $$\left(\frac{-p}{3}\right)^3+2p\left(\frac{-p}{3}\right)^2+p^2\left(\frac{-p}{3}\right)=q^2$$ $$-\frac{p^3}{27}+\frac{2p^3}{9}-\frac{p^3}{3}=q^2$$ $$-\frac{4p^3}{27}=q^2\iff -4p^3=27q^2$$ $$\color{red}{4p^3+27q^2=0}$$
A: The curve $y=f(x)$ is tangent to the $x$ axis if there exists some $x_0$ such that $$f(x_0) = 0$$ and $$f'(x_0) = 0$$
From the equation $f'(x_0) = 0$, you can see that only two possible values of $x_0$ are possible. Using them in the equation $f(x_0) = 0$ yields your result.
A: 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}$.
