If we are given a function of $x$, $a(x)$, how hard is it to find an $f(x)$ and $g(x)$ such that $a(x)=f(x)g'(x)+f'(x)g(x)$ For comparison, I'd like to know when this is easier than symbolically or numerically integrating $a(x)$.
I'd like to know, if possible, what general conditions allow us to efficiently find $f(x)$ and $g(x)$. I'm hoping this isn't too general a question. Additionally, I'd like to know the methods that allow us to do so.