Can you switch $g'$ and $f'$ in the integration by parts formula? I'm practicing calculus for the future and have a question about the integration by parts formula. 
I was taught: $\int f(x)g'(x) =f(x)g(x)-\int f'(x)g(x)dx $
But would switching $f'$ and $g'$ in the formula to this still work?
$\int f'(x)g(x) = f(x)g(x) - \int f(x)g'(x)dx$
If so is one way harder than the other?
In a problem like $\int x\cos(x)$ does it matter which values you pick for $f(x)$ and $g(x)$, or would both ways yield the correct answer?

Both will yield the same answer, but some integrals makes the math work out nicer. 
Changing what you choose as the "parts" is a common strategy to try when solving these.
