The question: “If a function is not monotone on $(a, b)$, then its square cannot be monotone on $(a, b)$.” We are to provide a counterexample to this statement.
On initial attempts I was able to forge piecewise functions which were sufficient counterexamples to this statement. One is stated below.
The function: $(-1)^{\lfloor x\rfloor}x$. (we can consider the required domain). Here's a graph I made on desmos
After some attempts I was able to find another function.
The function: $(-1)^xx$. (we can consider the required domain). Graphed here
Here is where I have a doubt; is this function even a sufficient counter example for the statement?
My conclusion against this function being sufficient came in the following way:
For a function to be monotonic increasing in $(a, b)$ we must have: $f(x_2) > f(x_1)$ for $x_2 > x_1$; if $x_1 , x_2\in(a, b)$. (vice versa for decreasing)
Now the function stated above, returns complex numbers for some values in any interval we consider; now by property of complex numbers we know we can’t compare complex numbers so this is technically breaking the rigorous definition of monotonicity…
On the other hand it is impossible to modify the domain in such a way that the output to them lies only on the real numbers, as there are infinitely many such points which would yield a complex number between two points
So my question is, is my train of thought against the latter function correct or am I missing any fine detail, in the analysis of its behavior.
Thank you in advance. Any insight provided will be invaluable to drive my curiosity in Mathematics.



