<s>[INST] How to calculate $f(x)$ in this question? I have a quation regarding composite functions.  
if $f\left( \dfrac{x^2+1} x \right)=\dfrac{x^4+1}{x^2}$, then what is $f(x)$?
 [/INST] HINT:
$$\left(\frac{x^2+1} x\right)^2=\frac{x^4+2x^2+1}{x^2}=\frac{x^4+1+2x^2}{x^2}$$
Alternatively you have $$\frac{x^2+1} x = x + \frac 1 x \\\frac{x^4+1}{x^2} = x^2 + \frac 1 {x^2}$$
</s>