For integration by parts, the integral is uv - ∫ u' v dx. First we take u = ln x and v' = 1. While we could have u and v' be the opposite at this stage, it becomes apparent later on that we can't do this because we would still need to integrate ln x. Differentiating u gives u' = 1/x (this is a derivative that has to just be learnt) and integrating v' gives v = x. Therefore the integral is x ln x - ∫ x(1/x) dx = x ln x - ∫ dx. So the integral of ln x is x ln x - x.