Let n be a positive integer and x=1/n. Then f(n1)=nn+1f(n+11). It follows by induction that f(n1)=nf(1) for all positive integers n.
We claim that f(nm)=nm2f(1) for all relatively prime positive integers m and n. This time we use induction on max(m,n). If m<n, then
f(nm)=f(m/(n−m)+1m/(n−m))=m/(n−m)+11f(n−mm)=nn−m⋅n−mm2f(1)=nm2f(1)
where we used the induction hypothesis. On the other hand, if m>n, then first
f(nm)=n3m3f(mn), and then n3m3f(mn)=n3m3⋅mn2f(1)=nm2f(1).
Conversely, it can be easily verified that the function defined by f(nm)=nm2 for all relatively prime positive integers m and n, where r a positive rational number, satisfies the conditions of the question.