Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to do problem 2 here.

Let $f(x)$ be a function defined for all real $x$ such that the coordinates of each point of its graph satisfy $|y|=|x^2-x^3|$. The total number of points at which $f(x)$ must be differentiable is

(A) none

(B) $1$

(C) $2$

(D) $3$

(E) infinite

The correct answer is B, but I'm completely stumped as to why that is. Is there an explanation for this answer?

share|cite|improve this question
I see this relation presents no function in $\mathbb R^2$. – Babak S. Sep 16 '12 at 7:13
I guess the question should be "the minimal number of points at which $f$ must be differentiable is". – Philippe Malot Sep 16 '12 at 7:20
@Babak: It describes an infinite family of functions, one for each possible choice of algebraic signs. – Brian M. Scott Sep 16 '12 at 7:39
@girianshiido: No rewording is necessary: that’s the normal interpretation of the question as it is actually written. – Brian M. Scott Sep 16 '12 at 7:40
@BrianM.Scott: Really? I guess I just learn something today. Thank you! – Philippe Malot Sep 16 '12 at 15:13
up vote 8 down vote accepted

You have a function $f:\Bbb R\to\Bbb R$ such that $|f(y)|=|x^2-x^3|=x^2|1-x|$ for all $x\in\Bbb R$. There are many such functions: for each $x$ except $0$ and $1$ you can choose either $x^2|1-x|$ or $-x^2|1-x|$ to be the value of $f(x)$.

Suppose that $a\ne 0$ and $a\ne 1$, so that $f(a)\ne 0$. Then $f$ need not even be continuous at $a$: $\lim\limits_{x\to a}f(x)$ exists if and only if there is an $\epsilon>0$ such that $f(x)$ has the same algebraic sign for all $x\in(a-\epsilon,a)\cup(a,a+\epsilon)$, and that limit is $f(a)$ if and only if $f(a)$ also has that algebraic sign. To see what can go wrong, imagine that you set

$$f(x)=\begin{cases} x^2|1-x|,&\text{if }x\text{ is rational}\\\\ -x^2|1-x|,&\text{if }x\text{ is irrational}\;; \end{cases}$$

This function clearly can’t be continuous at any irrational.

Now what happens at $x=1$? It’s not hard to see that since $\lim\limits_{x\to 1}x^2|1-x|=0$, $f(x)$ is at least continuous at $x=1$, but must it have a derivative there? Must the limit

$$\lim_{x\to 1}\frac{f(x)-f(1)}{x-1}=\lim_{x\to 1}\frac{f(x)}{x-1}$$

exist? $\dfrac{f(x)}{x-1}=\dfrac{x^2|1-x|}{x-1}=\pm x^2$, depending on whether $f(x)$ is $x^2|1-x|$ or $-x^2|1-x|$. What if we chose to set $f(x)=x^2|1-x|$ for all $x$? Then $$\lim_{x\to 1^-}\frac{f(x)}{x-1}=\lim_{x\to 1^-}\frac{x^2|1-x|}{x-1}=\lim_{x\to 1^-}\frac{x^2(1-x)}{x-1}=-1\;,$$ but $$\lim_{x\to 1^+}\frac{f(x)}{x-1}=\lim_{x\to 1^+}\frac{x^2|1-x|}{x-1}=\lim_{x\to 1^+}\frac{x^2(x-1)}{x-1}=1\;,$$ and $f$ is not differentiable at $x=1$.

The only point that remains to be considered is $x=0$. As with $x=1$, it’s not hard to check that $f$ must at least be continuous at $x=0$. What about the derivative? That would be

$$\lim_{x\to 0}\frac{f(x)-f(0)}{x-0}=\lim_{x\to 0}\frac{f(x)}x=\lim_{x\to 0}\frac{x^2|1-x|}x=\lim_{x\to 0}x|1-x|=0\;.$$

In other words, such a function $f$ must be differentiable at $x=0$, where its derivative must be $0$.

(This is a cute problem; I like it.)

share|cite|improve this answer
I got where my wrong idea was. Yes there are many infinite families of functions satisfying the relation. Thanks Brian. I like your complete answer too (+1). :) – Babak S. Sep 16 '12 at 7:50
Thanks Brian, this is a very nice answer. – Nastassja Sep 16 '12 at 7:56
Nice answer indeed. – Philippe Malot Sep 16 '12 at 15:16

Let $A$ be the set of points $a$ for which $f(a) = a^2 - a^3$ and $B$ the set of points for which $f(b) = b^3 - b^2$. If we choose a point $x$, then either $x$ has a complete neighborhood within one of the two sets, and the function will be differentiable at $x$, or it doesn't, in which case we have to take a closer look.

If you choose $A$ to be the rational numbers and $B$ to be the irrational, for instance, then no point will have such a neighborhood, so that is no comfort.

If there is no point completely contained in one of the sets $A$ or $B$ (which is the same as saying neither $A$ nor $B$ contains any intervals), let's see what happens to the derivative at some $x$, defined as $$ \lim_{x'\to x} \frac{f(x') - f(x)}{x' - x} $$ Now, let's say $x\in A$ (swap for $B$ for the other side of the argument). Then the limit will intuitively have two values. One for $x'\in A$, and one for $x' \in B$. If $f(x) \neq 0$ then the limit will approach $\frac{\pm \infty}{0}$ for $x'\in B$ (swap for $A$), so no differentiating in that case.

Thus we are left with two points of interest. $x = 1$ and $x=0$. For none of these points does the limit above go toward infinity, but depending on whether $x'$ is in $A$ or $B$, the fraction above is positive or negative. For $x=1$ this means the limit approaches both $+1$ and $-1$, so it does not exist.

For $x=0$, it approaches 0 no matter which way you put it, so the limit does exist, and we conclude that it is differentiable with $f'(0) = 0$

share|cite|improve this answer

First, note that $|f(h)-f(0) - 0.h| = |f(h)| = h^2|h-1|$. If we choose $|h| < \min (\frac{\epsilon}{2}, 1)$, then $|f(h)-f(0) - 0.h| \leq \epsilon |h|$, hence $f$ is differentiable at $x=0$ with derivative $0$.

Now let $f(x) = x^2(x-1) (2 \cdot1_{\mathbb{Q}}(x)-1)$. Then $f$ satisfies the hypothesis, but is only continuous at $x=0$ and $x=1$. Hence $x=1$ is the only other possible location at which $f$ must be differentiable. Suppose $f$ is differentiable at $x=1$ with derivative $\alpha$. Then for each $\epsilon>0$, there must be a $\delta>0$ such that if $|h| < \delta$, then $|f(1+h)-f(1)-\alpha h| \leq \epsilon |h|$, or equivalently, $|(1+h)^2 (2 \cdot 1_{\mathbb{Q}}(1+h)-1)-\alpha| \leq \epsilon$. However, this cannot be true, as choosing $h=\frac{1}{n}$ (for $n$ sufficiently large) yields $\alpha = 1$, whereas choosing $h=\frac{\pi}{n}$ (for $n$ sufficiently large) yields $\alpha = -1$. hence $f$ is not differentiable at $x=1$.

It follows that $x=0$ is the only point at which $f$ must be differentiable.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.