# Decomposition of a continuous function with monotone functions

Given a continuous function $g$ on $\mathbb R$. Is it possible to decompose $\mathbb R$ as the union of a countable collection of intervals $I_n=]a_n, a_{n+1}]$ so that $g$ is monotone on each $I_n$?

The same question may be asked for a continuous function defined on a bounded interval.

-

You might think about the Weierstrass function. I think you can prove it is not monotone over any interval by altering the proof that it is not differentiable.

-

Whenever someone comes with a guess as to whether continuous functions are "nice" in some way, the answer is almost inevitably "no". For example this other question.

And the Weierstraß function is likewise a counterexample to your question. Note that it is not of bounded variation.

EDIT: Made the opening line less... confrontational.

-

The function $f(x) = x \sin(1/x)$ is continuous on $\mathbb{R}$ and is not monotone on any nontrivial interval containing $0$. For that matter, the same holds for $f_a(x) = x^a \sin(1/x)$ for any positive integer $a$, and this gives a (simple!) example which is highly differentiable: i.e., $k$ times differentiable for each fixed $k$ and all sufficiently large $a$.

-
If you extend the original question in the obvious way, allowing $\mathbb R$ to be formed as a unions of half-open intervals and singletons, this doesn't resolve the question. The positive half-line can be decomposed as a countable number of intervals of monotonicity, as can the negative half-line. – Niel de Beaudrap Nov 1 '10 at 14:33
Although this is a good example, it's not true in general that $x^a\sin(1/x)$ is $a-1$ times differentiable. The true order of differentiability is nearer $a/2$. – Robin Chapman Nov 1 '10 at 15:50
@Robin: thanks for the comment. – Pete L. Clark Nov 1 '10 at 18:08
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9114216566085815, "perplexity": 184.68179389258881}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-22/segments/1464049270527.3/warc/CC-MAIN-20160524002110-00055-ip-10-185-217-139.ec2.internal.warc.gz"}