# Find the value of the function at the given point.

Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be a function satisfying the conditions
\begin{align*} (1)&f\left(\frac{x+y}{2}\right)=\frac{f(x)+f(y)}{2}\\ (2)&f(0)=1\\ (3)&f'(0)=-1 \end{align*} Find the value of $f(2)$ by proper explanation.

-
You can get appropriately sized parentheses (and other paired delimiters like brackets and braces) by placing \left and \right in front of them. – joriki Dec 28 '12 at 20:05
@JonasMeyer: Can we say that the function is not concave upward cause of 1?? – Babak S. Dec 28 '12 at 20:21
I have solved it by thinking that it is neither concave or convex function but it is a straight line. – asimath Dec 28 '12 at 21:16

To begin with, let us introduce the function $g(x)=f(x)+x-1$. This function satisfies the midpoint property (1), and $g(0)=g'(0)=0$. We claim that these three conditions imply that $g(x)=0$ for all $x\in\mathbb{R}$.

Since $g(0)=0$, it is easily seen that (1) implies $g(-x)=-g(x)$ for all $x$.

Next observe that $g(x)-g(y)=2g((x-y)/2)$ for all $x,y$. It follows that $g$ is differentiable on $\mathbb{R}$ and that $g'(x)=g'(0)=0$ for all $x$.

Hence $g$ is constant and equal to $g(0)=0$. So $f(x)=1-x$ for all $x$.

In particular, we find $f(2)=-1$.

-
We do not get that it's differentiable unless $f$ is continuous on a neighborhood of zero. – mixedmath Dec 28 '12 at 20:40
@mixedmath From the condition $f'(0)=-1$, I deduce that $f$, hence $g$ is differentiable at $0$. Then from the transformed functional equation $g(x)-g(y)=2g((x-y)/2)$, differentiability at $0$ (RHS), implies differentiability at $x$ (LHS). – 1015 Dec 28 '12 at 20:42
Ah, you're right. We are given that derivative, so one would assume. Well done, +1 – mixedmath Dec 28 '12 at 20:43

First, an example of a function that satisfies all the given conditions: $g(x) = 1 - x$. Clearly, if we trust that the problem has only one answer, the answer is bound to be $g(2)=-1$.

Of course, this won't pass as a complete solution, because now we need to somehow prove that $f(2)=-1$ for an arbitrary $f$ that satisfies the three conditions. There is no guarantee (at least no obvious guarantee) that such an $f$ must be equal to $g$. And here is the main idea: it is quite easy to prove that $f(x)=1-x$ for any dyadic number $x \in \mathbb{R}$. It will automatically mean that $f(2)=-1$.

PS: and if you think just a bit more you can even prove that $f(x)=1-x$ for every $x \in \mathbb{R}$.

PPS: the answer is meant as a hint, but I can expand upon request.

UPDATE: expanding, although now with all these other answers there is little point to it.

The proposed solution would go something like this. Step one: let's explore what (1) tells us. Let's call $\alpha = f(0)$ and $\beta = f(1)-f(0)$. So, we have the equality $f(x) = \alpha + \beta x$ for $x = 0$ and $x = 1$. Using (1) it is almost trivial to expand this equality first to $\mathbb{Z}$, and then to the set of all dyadic numbers. So, for all dyadic numbers $x$ we have $f(x) = \alpha + \beta x$. Using (2) we now get that $\alpha = 1$, and using (3) we get $\beta = -1$.

What I said in PPS is a simple variation of the same logic.

This is the way I was thinking about the problem. If you strip it down to the minimum, you'll get a solution similar to WimC's answer.

-
@rajkamalmath This is the whole point. Property (1) alone is not enough to conclude that the graph of $f$ is a straight line, one can build a counterexample. I don't see an elementary counterexample, but I do see a construction using the basis of $\mathbb{R}$ over $\mathbb{Q}$. – Dan Shved Dec 28 '12 at 21:53
@rajkamalmath Although if you add to (1) the restriction that $f$ is continuous, then it will automatically mean that $f$ is affine, i.e. its graph is a line. In this problem, continuity of $f$ can be proved, but only because of condition (3). If we only had (1) and (2) without (3), then it would be incorrect to say that $f$ is affine. – Dan Shved Dec 28 '12 at 21:56
From (1) and (2): $2^k\left(f(2^{1-k})-1\right)=f(2)-1$ for all $k \geq 0$.
From (3): $\lim_{k\to \infty}2^k\left(f(2^{1-k})-1\right)=-2$.
So $f(2)=-1$.