Constructing a function that is continuous and has a max on an open interval, but is not necessarily increasing immediately to the left of the max. This is a homework problem for my real analysis class. It is problem 13.1 from Mattuck's Introdution to Analysis. The question reads:  

Suppose F(x) is continuous on some open interval I and c is a maximum point inside this interval. Is it true that f(x) must be increasing immediately to the left of c and decreasing immediately to the right of c? Proof or counterexample. (Note: A constant function is considered to be both increasing and decreasing.)   

My friend and I have been attempting to find a counterexample. We figured a function that begins oscillating infinitely many times near c but converges to c would work. We're having difficulty constructing such a function out of elementary functions so we think we will have to define it in another way, piece-wise using receding intervals. I have no clue how this would look. Any advice would be greatly appreciated.

Your original idea sounds good to me.  For example, you could start with the function $$f(x) = \begin{cases}x \sin(1/x) & \text{if } x \ne 0 \\ 0 & \text{if } x = 0, \end{cases}$$
which is continuous on the entire real line and differentiable everywhere except at zero, and looks like this in the vicinity of zero:

Then you just need to tweak $f$ to have a global maximum at $x = 0$, for example by subtracting $2|x|$ from it.
The resulting function $g(x) = f(x)-2|x|$ looks like this in the vicinity of zero:


Ps. If you want a counterexample which is even differentiable everywhere, try $$h(x) = x f(x) - 2x^2 = \begin{cases}x^2 \sin(1/x) - 2x^2 & \text{if } x \ne 0 \\ 0 & \text{if } x = 0, \end{cases}$$ which looks like this:

Proving that $h$ is differentiable at zero is fairly easy from first principles, just by showing that the difference quotient $$ \frac{h(x)-h(0)}{x} = x \sin(1/x) - 2x $$ converges to $0$ in the limit as $x \to 0$, which in turn can be done using the squeeze theorem in exactly the same way as for showing the continuity of $f$ and $g$ at zero.  Then you just need to show that the derivative of $h$ takes both positive and negative values on every interval with one endpoint at zero.
