# Bounded functions have bounded derivatives.

Can the graph of a bounded function ever have an unbounded derivative? I want to know if $f$ has bounded variation then its derivative is bounded. The converse is obvious. I think the answer is "yes". If the graph were to have an unbounded derivative, it would coincide with a vertical line.

-
Take $f(x)=\sqrt{\lvert x \rvert}$ for $x\in [-1, 1]$. –  Giuseppe Negro Dec 13 '12 at 2:01

$f(x)=\sin\left(x\sin x\right)$ is bounded and differentiable everywhere on $\mathbb{R}$, but it has not a bounded derivative.

Edit: To prove that $f'(x)=\cos(x\sin x)[\sin x+x\cos x]$ is unbounded, observe that $x\sin x=0$ when $x=2n\pi$ and $x\sin x=(2n+\frac12)\pi$ when $x=(2n+\frac12)\pi$. Hence there exists a sequence of positive numbers $x_n\to\infty$ such that $x_n\sin x_n=1$. Consequently, $$\frac{f'(x_n)}{\cos 1} =\frac1{x_n}+x_n\sqrt{1-\frac1{x_n^2}}\to\infty \ \text{ as }\ n\to\infty.$$

-
Is there a way to show that $f'(x)=\cos(x\sin x)[\sin x+x\cos x]$ is unbounded? Thanks! –  Fang Jing May 3 '14 at 18:37
@FangJing See my new edit. –  user1551 May 3 '14 at 19:37

If $f:\mathbb R\to\mathbb R$ is defined by $f(x)=\sin(x^2)$, then $f$ is everywhere differentiable, bounded, with unbounded derivative as $|x|\to\infty$.

If $g:(-1,1)\to\mathbb R$ is defined by $g(x)=x^2\sin\left(\dfrac{1}{x^2}\right)$ if $x\neq 0$, and $g(0)=0$, then $g$ is everywhere differentiable, bounded, with unbounded derivative as $|x|\to 0$. (The domain could be changed to any other bounded interval. Alternatively, you could multiply by $e^{-x^2}$ or something to make it bounded everywhere without changing the relevant properties.)

If $h:[a,b]\to\mathbb R$ is a measurable, Lebesgue integrable function, then $H(x)=\int_a^xh(t)dt$ is absolutely continuous, hence of bounded variation, and $H'(x)=h(x)$ almost everywhere. Since $h$ need not be essentially bounded, this gives more counterexamples if you allow for functions not differentiable everywhere.

-

Consider the function $$f(x)=\sqrt{1-x^2}$$ on $[-1,1]$.

-
+1 for the semicircle, though I would have said "on $(-1,1)$" as it has no derivative at the endpoints –  Henry Dec 13 '12 at 7:49
@Henry: I wanted to focus attention on the endpoints, but you’re probably right that it would have been better with the open interval. –  Brian M. Scott Dec 13 '12 at 7:54

Oh, sure. I'm sure there are lots of examples, but because of the work I do, some modification of the entropy function comes to mind. Consider the following function: $$f:\mathbb{R}^n\rightarrow\mathbb{R}, \quad f(x) \triangleq \begin{cases} x \log |x| & x \neq 0 \\ 0 & x = 0 \end{cases}$$ It is not difficult to verify that this function is continuous and has a derivative of $$f'(x) = \log|x| + 1$$ for nonzero $x$. So $f'(x)$ is unbounded at the origin; but $f(x)$ is unbounded as well, so we're not quite there. We can create the function we seek by multiplying $f$ by a well-chosen envelope that drives the function to $0$ at the extremes. For instance: $$g:\mathbb{R}^n\rightarrow\mathbb{R}, \quad g(x) \triangleq e^{-x^2} f(x) = \begin{cases} x e^{-x^2} \log |x| & x \neq 0 \\ 0 & x = 0 \end{cases}$$ The first derivative for nonzero $x$ is $$g'(x) = e^{-x^2} \cdot \left( ( 1 - 2 x^2 ) \log|x| + 1 \right)$$ which remains unbounded. Attached is a plot of $g$ and $g'$.

EDITED to add: I notice that a number of other answers have chosen a bounded domain. From my perspective that is a bit incomplete. After all, we often consider such functions using the extended real number line, and in that context they are not bounded. There are certainly many functions that satisfy the original poster's conditions without resorting to a bounded domain.

-
mcg: There are 3 other answers, and 2 of them have examples on unbounded domains. I do not understand the statement in your edit. (For example, I also mentioned the device of multiplying by $e^{-x^2}$ in my second example.) The question refers to functions of bounded variation, which usually refers to functions on a bounded interval (and having finite total variation). Although the question is somewhat vague on what it's looking for, I think our variety of complementary answers should cover the bases. I like your answer, by the way. –  Jonas Meyer Dec 13 '12 at 2:32
Thanks Jonas. The (plural) answers I was referring to included the comment attached to the OP. I agree it is good to have a variety of answers here. But I do believe our job would not be done until at least one of us had offered a full-$\mathbb{R}^n$ solution, as we both have :P –  Michael Grant Dec 13 '12 at 4:30

Lots of examples have already been given. Perhaps a more qualitative explanation would also be useful: the value of $f'$ at $x$ is the slope of the graph of $f$ at $x$. So in order to make a function with unbounded derivative, we just have to choose some points $x_n$ such that at each $n$ the slope of the graph is $\geq n$. So: take a sheet of graph paper, and draw a very short line segment through each of the points $x = 1, 2, 3, 4,\ldots$ along the $x$-axis of slopes $+1, -2, +3, -4,\ldots$. Now draw a smooth curve passing through these points tangent to these line segmentss, but make sure that you "turn" before you cross the line $y = + 1$ or $y = -1$; you will have drawn the graph of an oscillating function, bounded between $\pm 1$, whose derivative is unbounded.

Thinking this through, and thinking about how much freedom you have in drawing such a graph, will show that there are many such examples!

Added: As Jonas Meyer pointed out in a comment, in the context of the OP's question (and the allusion to functions of BV), it might be more natural to fix attention on a bounded interval. If we work on an open interval, then we can make the same kind of construction as above, just letting the points $x_n$ tend towards the endpoint of the interval. If we work on a closed interval, and assume that $f'$ exists (in a one-sided sense at the endpoints) and is continuous, then it will be bounded (just because a continuous function on a closed interval is bounded), and this seems to be the intuition underlying the OP's comment about obtaining a vertical line from the assumption of an unbounded derivative. If we allow $f'$ to be discontinuous (even at one point), then we can again make many examples, just by crushing the function down to zero at the point of discontinuity of $f'$ (as in Jonas Meyer's $x^2 \sin(1/x^2)$ example).

-