If $f:\mathbb{R}\rightarrow \mathbb{R}$ and $f(xy+1) = f(x)f(y)-f(y)-x+2\;\forall x, y\in \mathbb{R}$ and $f(0) = 1\;,$ Then $f(x) $ is
$\bf{My\; Try::}$ Put $x=y=0\;,$ We get $f(1) = (f(0))^2-f(0)-0+2 = 1-1+2=2$
Similarly put $x=y=1\;,$ We get $f(2) = (f(1))^2-f(1)-1+2 = 4-2-1+2 = 3$
So from above values function must be in the form of $f(x) = x+1$
But i did not understand how can i calculate it.
Help required, Thanks
Let $y=0$. Then $$f(1)=f(x)f(0)-x+2$$ Let $f(1)=a$. Then $$f(x)=x+a-2$$
Check:
$xy+1+a-2=(x+a-2)(y+a-2)-(y+a-2)-x+2$
$xy+a-1=xy+ax-2x+ay+a^2-2a-2y-2a+4-y-a+2-x+2$
$(a-2-1)x+(a-2-1)y+(a^2-6a+9)=0$
$(a-3)x+(a-3)y+(a-3)^2=0$ $(\forall x,y \in \mathbb R)$
Then $a=3$
Answer: $$f(x)=x+1$$