2. A2 (AUS) Find all nondecreasing functions \( f: \mathbb{R} \rightarrow \mathbb{R} \) such that (i) \( f(0)=0, f(1)=1 \); (ii) \( f(a)+f(b)=f(a) f(b)+f(a+b-a b) \) for all real numbers \( a, b \) such that \( a<1<b \).
2. We can rewrite (ii) as $-(f(a)-1)(f(b)-1)=f(-(a-1)(b-1)+1)-1$. So putting $g(x)=f(x+1)-1$, this equation becomes $-g(a-1) g(b-1)=$ $g(-(a-1)(b-1))$ for $a>0$, and therefore (1) reduces to $g(1) g(y z)=g(y) g(z)$ for all $y, z>0$. We have two cases: (i) $g(1)=0$. By (1) we have $g(z)=0$ for all $z>0$. Then any nondecreasing function $g: \mathbb{R} \rightarrow \mathbb{R}$ with $g(-1)=-1$ and $g(z)=0$ for $z \geq 0$ satisfies (1) and gives a solution: $f$ is nondecreasing, $f(0)=0$ and $f(x)=1$ for every $x \geq 1$ (ii) $g(1) \neq 0$. Then the function $h(x)=\frac{g(x)}{g(1)}$ is nondecreasing and satisfies $h(0)=0, h(1)=1$, and $h(x y)=h(x) h(y)$. Fix $a>0$, and let $h(a)=$ $b=a^{k}$ for some $k \in \mathbb{R}$. It follows by induction that $h\left(a^{q}\right)=h(a)^{q}=$ $\left(a^{q}\right)^{k}$ for every rational number $q$. But $h$ is nondecreasing, so $k \geq 0$, and since the set $\left\{a^{q} \mid q \in \mathbb{Q}\right\}$ is dense in $\mathbb{R}^{+}$, we conclude that $h(x)=x^{k}$ for every $x>0$. Finally, putting $g(1)=c$, we obtain $g(x)=c x^{k}$ for all $x>0$. Then $g(-x)=-x^{k}$ for all $x>0$. This $g$ obviously satisfies (1). Hence  $$ f(x)=\left\{\begin{array}{ll} c(x-1)^{k}, & \text { if } x>1 ; \\ 1, & \text { if } x=1 ; \\ 1-(1-x)^{k}, & \text { if } x<1 \end{array}\right. $$ for some $c \neq 0$ and $k \geq 0$.