The Integral of a Logarithm
You cannot directly integrate ln(x) using basic power rules, so you have to use integration by parts. This is one of those standard calculus procedures that trips up students because they never quite internalize why it works or what the final form actually looks like. The result is x·ln(x) - x + C. That's it. Here is how you get there without guessing. You set u = ln(x) and dv = dx. Then du = 1/x dx and v = x. Plugging into the integration by parts formula, which is u dv = uv - v du, you get x·ln(x) - x · (1/x) dx. The x terms cancel in that second integral, leaving just 1 dx, which is x. Add the constant and you are done.
The whole thing takes about 90 seconds if you know the formula by heart. Most people spend five minutes second-guessing the setup. The u and dv choice is not arbitrary here; picking anything other than u = ln(x) makes the integral harder, not easier. I once ran into a problem where a student was asked to find the antiderivative of ln(2x) and they immediately wrote x·ln(2x) - x + C without checking whether that was actually correct. It is, technically, but only because of the constant absorption. The derivative of x·ln(2x) - x is ln(2x) + 1 - 1 = ln(2x). So the answer checks out. The issue is that students who memorize the result blindly will fail when the integrand becomes ln(x²) or ln(x), because those require rewriting the logarithm first using log properties before applying the formula. I tell people to always simplify the log argument before integrating. It saves time and prevents mistakes. One thing beginners miss is that the antiderivative x·ln(x) - x is only valid on the domain x > 0. The natural log is undefined for negative numbers and zero, so any definite integral involving ln(x) must respect that boundary. If you are evaluating from -1 to 1, for example, the integral does not exist. You need to split it and check convergence at the singularity. In practice, improper integrals like ¹ ln(x) dx converge to -1, but only because the limit exists. I spent a week debugging a numerical integration routine once because someone passed a lower bound of 0 without handling the singularity, and the routine returned NaN every time. The fix was replacing the lower limit with a small epsilon like 1e-12 and letting the numeric solver handle it, or better yet, using an analytic result to bypass the computation entirely.
Another counter-intuitive point is that the primitive function x·ln(x) - x grows slower than x·ln(x) but faster than any polynomial x where n
1. The -x term dominates for large x, but the ln(x) factor keeps pulling it ahead of pure linear growth. This matters when you are doing asymptotic analysis or comparing convergence rates in algorithm design. If you need the antiderivative of ln(ax) where a is a constant, the result is still x·ln(ax) - x + C. The constant a gets absorbed. Some people think it should appear in the final answer, but it does not. You can verify this by differentiating: d/dx[x·ln(ax) - x] = ln(ax) + x·(a/ax) - 1 = ln(ax) + 1 - 1 = ln(ax). The formula sheet version of this is straightforward, but the real challenge comes when ln(x) appears inside a product or quotient with another function. In those cases, integration by parts still applies, but you may need to apply it more than once or combine it with substitution. There is no universal shortcut.
Get the Full Details

For a quick reference, the general form is: ln(x) dx = x·ln(x) - x + C That constant C is important. Omitting it in an indefinite integral context is a common grading penalty. In applied work, like calculating areas or volumes, the constant drops out when you evaluate a definite integral, but in pure math settings it is required for correctness.
If you are working with tabular integration by parts for more complex variants like (ln x)² dx, the process repeats. The result is x·(ln x)² - 2x·ln x + 2x + C. Each iteration reduces the power of the logarithm by one until it vanishes. This pattern holds for (ln x) dx in general, giving you x·(ln x) - n·x·(ln x)¹ + n(n-1)·x·(ln x)² - ... + (-1)·n!·x + C. Most textbooks cover this in Chapter 7 or 8 of a standard calculus sequence, usually right after introducing integration by parts. You do not need a special tool or software package for the basic case. A pencil and the formula sheet are sufficient. The only limitation is that this approach breaks down if the integrand is something like ln(sin x) or ln(e + 1), where no elementary antiderivative exists. In those cases, you either approximate numerically or express the result in terms of special functions like the polylogarithm. For the standard case of ln(x), you have everything you need right here. Apply integration by parts, simplify, and move on.
