How do I know which variable to use as f(x) first when I use the method of integration by parts? For example, in questions like

$\displaystyle \int\sqrt{x}lnxdx$

In this equation you use $\displaystyle \sqrt(x)$ as f prime of x

In this problem

$\displaystyle \int(x^3e^x)dx$

You use $\displaystyle e^x$ as the f prime of x

How do I know which one to use as f prime of x?