I have the following GRE question that I have some trouble seeing.
If $g$ is a function defined o the open interval $(a,b)$ such that $a < g(x) < x$ for all $x \in (a,b)$, then $g$ is
A) an unbounded function
B) a nonconstant function
C) a nonnegative function
D) a strictly increasing function
E) a polynomial function of degee 1
I answered that D), because I thought I could take the derivative on the inequality $a < g(x) < x$ and get $0< g'(x)<1$, showing that the equation is strictly increasing. However the answer says it should be B) and I don't really see how they concluded this. Could anyone help me with this problem? Thanks in advanced!

Suppose $g(x) = c $ is constant. Than $a < c < x$ for all $x\in (a,b)$. But there must be some $y \in (a,c)$. $a < y < c=f(y)$. A contradiction.
So $g$ is not constant
====
It's worth noting for $g(x) \not \in (a,b)$ we can have $g(x)$ do anything. So C,D, E aren't possible answers. A) and B) are only possible if the are "forced" to be unbounded or non-constant on $(a,b)$. For A) $g(x)$ is actually forced to be bounded so A) is not correct.
It's also worth noting $g(x)$ need not be increasing on $(a,b)$ it can bounce around all it wants in $a < f(x) < x$.