Not all functions are created equal. Some get much simpler when differentiated, others get a little simpler, others don't really change, and a few actually get more complicated. You always want to pick u to be the part that gets a lot simpler when differentiated, and dv to be the part that doesn't mind being integrated. Then ∫vdu will be simpler than ∫udv.
Functions like ln(x), 1x, tan−1(x), 11+x2, sin−1(x) and 1√1−x2 almost never get grouped into dv. These functions either get a lot simpler when differentiated (like ln(x)) or get a lot more complicated when integrated (like 1/x).
Functions like xn (with n>0) get a little simpler when differentiated and a little more complicated when integrated. They sometimes get grouped into u and sometimes into dv, depending on what else is in the integrand.
Functions like sin(x), cos(x) and ex stay more-or-less the same when differentiated or integrated. These get grouped into dv more often than not.
A few functions, like sec2(x), xex2 and x−n (with n at least 2), actually get simpler when integrated. These almost always get grouped into dv.
Don't forget that 1 is a function! You can always apply integration by parts to ∫f(x)dx by picking u=f(x) and dv=1dx. This gives the useful formula∫f(x)dx=xf(x)−∫xf′(x)dx