# Finding f(2) - Functional equation question

1. Aug 24, 2013

### Saitama

1. The problem statement, all variables and given/known data
Let $f\left(\frac{x+y}{2}\right)=\frac{f(x)+f(y)}{2}$ for all real x and y. If f'(0) exists and equal -1 and f(0)=1, find f(2).

2. Relevant equations

3. The attempt at a solution
Substituting y=0, 2f(x/2)=f(x)+1. This doesn't seem to be of much help. I don't see how to use the info given about f'(0). I have the equation in two variables x and y, how do I differentiate it?

Any help is appreciated. Thanks!

2. Aug 24, 2013

### Infrared

You have probably already noticed that $f(x)= -x+1$ solves the problem. To show that the function must be linear, try fixing y and differentiating the both sides of the equation given with respect to x.

3. Aug 24, 2013

### haruspex

Try working it backwards. Suppose you knew f(2) and that bit is differentiable at 0 (but not the value). Could you deduce f(1)? f(.5)? f(.25)? ... and thus f'(0)?

4. Aug 24, 2013

### haruspex

You only know it to be differentiable at 0.

5. Aug 24, 2013

### Saitama

Let f(2)=k.
Substituting y=0 and x=2, f(1)=(k+1)/2
With y=0 and x=1, f(1/2)=(k+3)/4
y=0 and x=1/2, f(1/4)=(k+7)/8

I still do not see what to do with this. How do I determine f'(0)? Differentiating the given equation wrt x treating y as constant gives,
$$f'\left(\frac{x+y}{2}\right)=f'(x)$$

Last edited: Aug 25, 2013
6. Aug 24, 2013

### Ray Vickson

Initially, you cannot assume f is differentiable, or even continuous! In fact, you can *prove* these results using the functional equation plus the existence of a derivative at x = 0. However, you don't need all that to just answer the original question.

Hint: the functional equation says that the points (x1,f(x1)), (m,f(m)) and (x2,f(x2)) all lie on a straight line in xy space (where m = (x1+x2)/2 is the mid-point of the interval [x1,x2]). Apply this result several times to conclude that $f(r x_1 + (1-r) x_2) = r f(x_1) + (1-r) f(x_2)$ for any $r$ in dyadic rational form, that is, for $r = k/2^n$, $k = 0, \pm 1, \pm 2, \ldots$ and $n \geq 0$ is an integer. Apply this to, eg., $x_1 = 0, x_2 = 1$ and you are almost done. Can you see where the existence of $f '(0)$ comes in, and how its value can be used?

7. Aug 24, 2013

### Saitama

:uhh:
I am sorry Ray, that all went over my head. If you are assuming that I have taken a course on Real Analysis (I guess that's what it is called, sorry if I used the wrong word), then no. This question showed in a limits practice sheet I am currently solving.

8. Aug 25, 2013

### Ray Vickson

The important point is that the three points (x,f(x)), (m,f(m)) and (y,f(y)) all lie on the same straight line, where m = (x + y)/2 is the mid-point. Is that over your head?

Now just keep applying that result, so you find that not only mid-points, but also 1/4 and 3/4 points are on the line, as are points that are 1/8, 3/8, 5/8, 7/8 of the way from x to y. That, I hope, is not above your head. Keep going like that.

9. Aug 25, 2013

### haruspex

f'(0) is the limit of the gradient of the line from (0, f(0)) to (δ, f(δ)) as δ→0.
So, in terms of k, what are these gradients for δ=2, 1, .5, .25, ....?

10. Aug 25, 2013

### Saitama

Sorry, I had calculated the incorrect values of f(1), f(.5), f(0.25)... in terms of k. I have corrected them. Using your method, I get k=-1 which is the correct answer.

I tried to generalize it,
$$f\left(\frac{1}{2^n}\right)=\frac{k+2^{n+1}-1}{2^{n+1}}$$
f'(0) is defined as,
$$f'(0)=\lim_{h \rightarrow 0} \frac{f(0+h)-f(0)}{h} = \lim_{n \rightarrow \infty} \frac{f(1/2^n)-f(0)}{1/2^n}$$
Solving the limit and using f'(0)=-1, I get k=-1. Is this a correct way to put it?

Also, how did you think of calculating the values of 1, 1/2, 1/4, 1/8....? What part of the question hinted you that? Thanks! :)

11. Aug 25, 2013

### haruspex

Yes, that's what I had in mind.
Since we only know it to be differentiable at one point, it is natural to look for a sequence converging on that point, and try to determine the corresponding sequence of slopes.
The given functional equation allows us to find the value at a point in a triple in arithmetic progression if we know the value at the other two points. To get a converging sequence out of that we need to know the outer two points and deduce the one in the middle.

12. Aug 25, 2013

### Saitama

What does this mean?

13. Aug 25, 2013

### haruspex

By a "triple in a.p." I mean three numbers equally spaced: a-b, a, a+b. From the functional equation, if you know f at any two then you can calculate it at the third.

Btw, you can go on to show that if f satisfies that functional equation and is known to be differentiable at some point (any point) then it is simply a straight line. An interesting challenge then is to find some other solution of the functional equation - it would be nowhere differentiable.

14. Aug 25, 2013

### Saitama

Sorry if this is something very obvious but I don't even have the slightest idea about this. Is this related to hints given by Ray Vickson? I still haven't been able to figure out how did he conclude that the three points (x,f(x)), (m,f(m)) and (y,f(y)) lie on the same straight line. I really suck at this part of Mathematics (or almost every part) :(

15. Aug 25, 2013

### haruspex

Yes.
Suppose f satisfies the given functional equation and is differentiable at p. Let f(p) = a and f(x) = b. in terms of those we can compute f((p+x)/2), f((3p+x)/4), f((7p+x)/8) etc. The slopes of the lines from (p, f(p)) to these points are all (b-a)/(x-p). E.g. f((p+x)/2) = f(p)/2+f(x)/2 = (a+b)/2; f((p+x)/2) - f(p) = (b-a)/2; (p+x)/2 - p = (x-p)/2. So the slope is ((b-a)/2)/((x-p)/2) = (b-a)/(x-p).
So we have a sequence converging at p, and the slopes are all the same, so converge to (b-a)/(x-p) = c, say. From the definition of differentiability, all such sequences must produce the same convergent value c for the slope, so regardless of the choice of x we get (f(x)-a)/(x-p) = c, an equation of a straight line.

16. Aug 25, 2013

### Ray Vickson

If $a < b < c$ are three equally-spaced numbers, so that $b-a = c-b$ then we have $b = (a+c)/2$. Your functional equation says that
$$f(b) = \frac{1}{2} f(a) + \frac{1}{2}f(c).$$ Now imagine plotting the three points $A = (a,f(a)), \; B = (b,f(b)), \: C = (c,f(c))$ in a Cartesian coordinate system. Along the x-axis the points are equally spaced, since $b-a = c-b$. Are they equally-spaced along the y-axis; that is, do we have $f(b)-f(a) = f(c)-f(b)?$ Just plug in the expression for $f(b)$ (in terms of $f(a)$ and $f(c)$) and you will see that the answer is YES: they are equally-spaced also along the y-axis. Can you see now why they lie along a straight line?

Last edited: Aug 25, 2013