Originally Posted by

**drumist** Perhaps there is some confusion about what we're trying to do. From the way you worded the question, I believe we are supposed to identify what the derivative of $\displaystyle f(x)$ is.

First, let's look at where $\displaystyle f(x)$ is continuous. At these values, the derivative *might* exist. It cannot exist at values where $\displaystyle f(x)$ is not continuous.

It's important to know a few things about irrational and rational numbers. First, between every two distinct irrational numbers, there exists a rational number that lies between them.

Also, between every two distinct rational numbers, there exists an irrational number that lies between them.

I'm not sure how best to explain this, but the implications of this is that $\displaystyle f(x)$ is not continuous except where $\displaystyle -x^2=x^2 ~\implies~ x=0$. Therefore the derivative can only be defined at that single point.

Next we verify that $\displaystyle \frac{d}{dx}(-x^2) = \frac{d}{dx}(x^2)$ at $\displaystyle x=0$.

$\displaystyle \frac{d}{dx}(-x^2) = -2x = -2(0) = 0$

$\displaystyle \frac{d}{dx}(x^2) = 2x = 2(0) = 0$

These values are equal, so the derivative does exist at that point. Thus:

$\displaystyle f'(x)=0, \quad \mbox{if } x=0$