Prove that there exists $f,g : \mathbb{R}$ to $\mathbb{R}$ such that $f(g(x))$ is strictly increasing and $g(f(x))$ is strictly decreasing. Prove that there exists $f,g : \mathbb{R}$ to $\mathbb{R}$ such that $f(g(x))$ is strictly increasing and $g(f(x))$ is strictly decreasing.
I tried cases by taking $f(x)$ as an increasing function and $g(x)$ as a decreasing function then I am getting both $f(g(x))$ and $g(f(x))$ as decreasing functions.
Further I took both of them as increasing functions, but none of them are yielding results.
Help
 A: Here is a construction that uses the axiom of choice. I'm not sure if it can be avoided.
Let $p$ be an increasing bijection ${\mathbb R} \to  \mathbb R$ such that $p(0)=0$ and $0$ is the only fixed point of any iterate of $p$ (for example, $p(x)=2017x$ will do).
Let also $q$ be a decreasing bijection ${\mathbb R} \to \mathbb R$ such that $q(0)=0$ and $0$ is the only fixed point of any iterate of $q$ (for example, $q(x)=-2017x$ will do).
The iterates of $p$ form a group under composition which we call $P$. Then $P$ acts on ${\mathbb R}^*$. By the axiom of choice, there is a transversal $T_p\subseteq {\mathbb R}^*$ containing exactly one element from each orbit, then the map ${\mathbb Z} \times T_p \to {\mathbb R}^*, (k,x)\mapsto p^k(x)$ is bijective.
Similarly, there is a $T_q\subseteq {\mathbb R}$ such that ${\mathbb Z} \times T_q \to {\mathbb R}^*, (k,x)\mapsto q^k(x)$ is bijective.
By a well-known result in cardinality theory, since $T_q$ and $\mathbb Z$ are both infinite and $|T_q|>|{\mathbb Z}|$, we have $|{\mathbb Z} \times T_q|=|T_q|$. It follows that there is a bijective map $b:T_q \to T_p$.
Now, define $f$ by $f(0)=0$ and for nonzero $r$, say $r=q^{k}(t)$ with $t\in T_q$, put $f(r)=p^{k}(b(t))$. Similary, define $g$ by $g(0)=0$ and for nonzero $r$, say $r=p^{k}(b(t))$ with $t\in T_q$, put $g(r)=q^{k+1}(t)$.
By construction, one then has $f\circ g=p$ and $g\circ f=q$.
A: EDITED
Let the domain and range of both $f$ and $g$ be the real line. Furthermore assume that the derivatives exist. Also, assume that they do not have inflexions with zero derivative. If we do not assume that the whole line is the domain then counterexample(s) can be created. (See Han de Bruijn's comment to this post.)

In order for $f(g(x))$ to be strictly increasing we need that the derivative wrt $x$ be positive 
$$f(g(x))'=  f'(g(x))g'(x)>0.$$   
So, both $f'(g(x)$ and $g'(x)$ have to be positive xor negative. 
In order for $g(f(x))$ to be strictly decreasing we need that the derivative wrt $x$ be negative.   $$g(f(x))'=  g'(g(x))f'(x)<0.$$
One of the components has to be negative and the other one has to be positive but not the same sign at the same time.
Above we requested the opposite.  
A: To satisfy strict monotonicity in the composites, both functions must be injective (1-to-1). However to product opposite monotonicity, $f$ and $g$ must be discontinuous everywhere, since even a short stretch of monotone behaviour will produce the same behaviour in both compositions.
Also, although this is less certain, since $f \circ g$ and $g\circ f$ are strictly monotone, they are continuous almost everywhere. So essentially we need to  disassemble the real number line into points, and then reassemble it.
This suggests we need to have something like functions that split by eg. rational and irrational numbers in an apparently chaotic fashion. However in the end I think this will be an existence proof rather than a demonstrated example.
A: First, we say two intervals $A$<$B$, if $\forall a\in A, b\in B$ such that $a$<$b$, like $(-1,2]$<$(2,4]$. If $g\circ f(x)$ is increasing on A and B, then we want the image of A, B satisfying $h[A]$<$h[B]$; $f\circ g(x)$ is decreasing on $A$ and $B$, then we just have to let the image of $A, B$ satisfying $k[B]$<$k[A]$, which ensures the monotonicity (more) globally. 
Give an example to show how it really works. Eventually we partition the real plain $\mathbb{R}^2$ into integer lattices. In each square, the function $f$, $g$ looks like either $\frac{1}{2}x+\frac{1}{4}$, or $-\frac{1}{2}x+\frac{3}{4}$. We should, however, shift the boxes so that we achieve what we said before.
On even-number-th interval, $f,g$ look like $-\frac{1}{2}x+\frac{3}{4}$; on odd-number-th interval, $f,g$ look like $\frac{1}{2}x+\frac{1}{4}$ inside its square. We have to map correctly from squares to squares i.e. $\mathbb{Z}\to\mathbb{Z}$ such that the local and global monotonicities are satisfied. 
I.e. find two functions $i,d:\mathbb{Z}\to\mathbb{Z}$, $i$ is parity-preserving and $d$ parity-reversing, $d\circ i$ increasing, $i\circ d$ decreasing. E.g. It is not hard to check $$i(n)=\begin{cases}2n & \text{even}\\-2n+1&\text{odd}\end{cases}\quad d(n)=\begin{cases}2n+1 & \text{even}\\-2n&\text{odd}\end{cases}$$
satisfy the requirements.
These functions indicate where the squares are vertically.
Finally, put all together,
$$f(x)=\begin{cases}-\frac{1}{2}(x-\lfloor x\rfloor)+\frac{3}{4}+i(\lfloor x\rfloor) & \lfloor x\rfloor\text{ is even}\\\frac{1}{2}(x-\lfloor x\rfloor)+\frac{1}{4}+i(\lfloor x\rfloor)&\lfloor x\rfloor\text{ is odd}\end{cases}$$
$$g(x)=\begin{cases}-\frac{1}{2}(x-\lfloor x\rfloor)+\frac{3}{4}+d(\lfloor x\rfloor) & \lfloor x\rfloor\text{ is even}\\\frac{1}{2}(x-\lfloor x\rfloor)+\frac{1}{4}+d(\lfloor x\rfloor)&\lfloor x\rfloor\text{ is odd}\end{cases}$$
With the same idea, a refined solution: 
First, let $f(0)=g(0)=0$. Then, we partition the axis into $\{\pm[{2^n},{2^{n+1}})\}_{n\in\mathbb{Z}}$ for $f$ and
$\{\pm[{2^n\sqrt{2}},{2^{n+1}\sqrt{2}})\}_{n\in\mathbb{Z}}$ for $g$. Then $f,g$ take value from either $\sqrt{2}x$ or $-\sqrt{2}x$ alternatingly on the partitioned intervals respectively starting to take value $\sqrt{2}x$ on $\pm[1,2)$ and $\pm[\sqrt{2},2\sqrt{2})$.
