How find this ODE solution $\frac{f(x)}{f(a)}=\left(\frac{x}{a}\right)^2e^{(x-a)\left(\frac{f'(x)}{f(x)}-\frac{2}{x}\right)}$ let $a>0$ is constant number,and   the function $f(x)$ such follow ODE
$$\dfrac{f(x)}{f(a)}=\left(\dfrac{x}{a}\right)^2e^{(x-a)\left(\dfrac{f'(x)}{f(x)}-\dfrac{2}{x}\right)}$$
Find the $f(x)?$
Thank you 
My try: 
$$\dfrac{f(x)}{x^2}=\dfrac{f(a)}{a^2}e^{(x-a)\left(\dfrac{f'(x)}{f(x)}-\dfrac{2}{x}\right)}$$
then
$$\ln{\dfrac{f(x)}{x^2}}-\ln{\dfrac{f(a)}{a^2}}=(x-a)\left(\dfrac{f'(x)}{f(x)}-\dfrac{2}{x}\right)$$
then I can't,Thank you very much

You could turn it into a first order linear differential equation by substituting $\ln(f)=\phi$, since $\phi'=\ln(f)'=\frac{f'}{f}$ appears on the right side. 
