### Part (a)
1. Define the function f:R→R as follows:
f(x)=χR+(x)={10if x>0if x≤0
2. Verify the hypothesis for different cases:
- If both a,b>0 or a,b≤0, then f(a)=f(b) and the hypothesis f(2a+b)∈{f(a),f(b)} is trivially satisfied.
- If a>0 and b≤0, then {f(a),f(b)}={1,0}. The midpoint 2a+b will be either positive or non-positive, so f(2a+b) will be either 1 or 0, which is in {f(a),f(b)}.
Thus, the function f(x)=χR+(x) satisfies the hypothesis and is a non-constant function.
### Part (b)
1. Assume f is continuous and suppose, for contradiction, that there exist a0,b0∈R such that f(a0)=f(b0).
2. Define c1=2a0+b0. By the hypothesis, f(c1) must be either f(a0) or f(b0).
3. Depending on the value of f(c1):
- If f(c1)=f(a0), set a1=c1 and b1=b0.
- If f(c1)=f(b0), set a1=a0 and b1=c1.
4. Note that f(a1)=f(b1) because f(a0)=f(b0).
5. Repeat this process to construct sequences (ak) and (bk) such that:
- ak+1=2ak+bk or bk+1=2ak+bk.
- f(ak)=f(bk) for all k.
6. Since ak and bk are bounded and the interval [ak,bk] is halved at each step, both sequences (ak) and (bk) converge to the same limit α∈R.
7. By the continuity of f, we have:
k→∞limf(ak)=f(α)andk→∞limf(bk)=f(α)
8. However, since f(ak)=f(a0) and f(bk)=f(b0) for all k, we have:
f(a0)=f(α)andf(b0)=f(α)
9. This leads to a contradiction because f(a0)=f(b0).
Therefore, the assumption that f(a0)=f(b0) must be false, implying that f is constant.
■