Find all functions $f$ from the set $\mathbf{R}$ of real numbers to itself such that $f(x y+1)=x f(y)+2$ for all $x, y \in \mathbf{R}$.
The only such function is $f(x)=2 x$. First, we note that this function really is a solution of the equation, since $2(x y+1)=2 x y+2=x(2 y)+2$ for all $x, y$.

Now let $f$ be any function satisfying the equation. First put $x=y=0$; the equation gives $f(0 \cdot 0+1)=$ $0 f(0)+2$ or $f(1)=2$. Now suppose $y=1$ (and $x$ may be anything); we have $f(1 x+1)=x f(1)+2$ or $f(x+1)=2 x+2$ for all $x \in \mathbf{R}$. Equivalently, $f(x)=f((x-1)+1)=2(x-1)+2=2 x$ for all $x$, so we have verified that this is the only function satisfying the equation.