# Math Help - Counter Example for Theorem about Monotonic Functions

1. ## Counter Example for Theorem about Monotonic Functions

I'm trying (and failing) to find a counterexample to the following false theorem:

For all functions $f,g$ from Reals to Reals, if $g \circ f$ is monotonic, then at least one of $f$ or $g$ is a monotonic function.

2. How about f(x) = asin(1/x) and g(x) = 1/x? Or are this f and g monotonic?

3. I guess this will work, but since asin(1/x) is undefined from x = (-1, 1) it technically isn't a function on the reals. It's only a function from R - (-1, 1) to R.

If I come up with no other examples this will do, but I feel there should be an example with a true function from R to R

4. How about f(x) = 1 if x is rational, -1 if x is irrational, and g(x) = x^2?

5. I was tryng to come up with something at least mostly continuous.