Start with $$ \int\frac{f(x)}{f'(x)} \ dx $$
Let $$ u = \frac{f(x)}{f'(x)}\ $$ $$ dv=dx $$
Then $$ du = (1-\frac{f(x)f''(x)}{(f'(x))^2})dx $$ $$ v=x $$
Integrate by parts: $$\begin{align*} \int\frac{f(x)}{f'(x)} \ dx &= x\frac{f(x)}{f'(x)}\ - \int x (1-\frac{f(x)f''(x)}{(f'(x))^2})dx\\ &= x\frac{f(x)}{f'(x)}\ - \int x \ dx + \int\frac{xf(x)f''(x)}{(f'(x))^2}dx \\ & = x\frac{f(x)}{f'(x)}\ - \frac{x^2}{2}\ + \int\frac{xf(x)f''(x)}{(f'(x))^2} dx \end{align*}$$
Rearrange to get: $$ \int\frac{f(x)}{(f'(x))^2}((f'(x) - xf''(x)) dx \ = x\frac{f(x)}{f'(x)}\ - \frac{x^2}{2}\ $$
I checked an example of this such that $$ f(x) = x^3-2x $$ and this didn't hold. I can't seem to spot the mistake so if anyone can help me spot it, I'd appreciate it. The only explanation I can think of is that the right side is missing a + C, but then C is only a constant and whatever residual it would make up for to make both sides equal will vary for all variations of f(x).