Question: How to define a function?

I have a function 

f:=x->(x^2 + 2*m*x + m + 1)/(x -1);
Now I want to define a function as simplify(diff(f(x),x)), i did 
g:=x->simplify(diff(f(x),x)). Then, i could not calculate g(3). Please help me. Thank you.
Please Wait...