It is common that we replace [tex]\int u(x)v'(x)dx[/tex] by [tex]\int udv[/tex] where both u and v are continuous functions of x. My question is, must we ensure that u can be written as a function of v before applying this? The above substitution method is involved in the proof of integration by parts but I cannot find textbooks that addressed this point. I find it easier to understand for definite integrals because I can think it as summation. But for indefinite integrals it is just anti-derivative and I am not sure how this kind of replacement is valid.