Largest value of an unknown function evaluated at a particular x value Firstly, apologies for the extremely vague title; the problem I'm working on doesn't particularly possess a specific title.
I am trying the following question but am very stuck:
Assume the function $f : \mathbb{R} \rightarrow \mathbb{R}$ is continuously differentiable on $\mathbb{R}$. Assume also that $f(0) = 0$ and $f(x)f'(x) ≤ 2$ for all $x \in \mathbb{R}$. What is the largest possible value of $f(4)$? (Hint: Show that a larger value cannot be obtained; also show that the value you give actually is attained by at least one function.)
I have seen questions similar to this before however the functions were defined on a closed, bounded interval meaning the Mean Value Theorem could be used, however that is obviously not the case here. I've been at it for a while but haven't been able to come up with anything as of yet.  
Any help is very appreciated. 
UPDATE: I've come up with this so far:
We are given that $f$ is differentiable on $\mathbb{R}$, and therefore $f$ is continuous on $\mathbb{R}$. In particular, $f$ is continuous on the closed interval $[0, 4] \subset \mathbb{R}$ and differentiable on the open interval $(0, 4)$, as is required for application of the Mean Value Theorem for $f(x)$ on the interval $[0, 4]$.
Applying the MVT to $[0, 4]$, we see that there is a number $c \in (0, 4)$ such that $$f'(c) = \frac{f(4)-f(0)}{4-0} = \frac{f(4)}{4}$$ $$ \Rightarrow f(4) = 4f'(c) \leq \frac{8}{f(c)}$$
Unsure where to go from here or if this would even lead to a solution...

Let $g=f^2$. Then $g$ is non-negative, $C^1$, $g(0)=0$ and $g'(x)\le4$. It follows that $g(x)\le4\,x$ and $f(x)\le2\,\sqrt x$ for $x\ge0$. Suppose that $g(a)<a$ for sone $a\in(0,4)$. Then
$$
g(4)=g(a)+\int_a^4g'(t)\,dt\le g(a)+4(4-a)<16.
$$
Thus, ig $g(4)=16$, then $g(x)=4\,x$. This implies that if $f(4)=4$ then $f(x)=2\,\sqrt x$, which is not $C^1$.
