Integration by Parts Is What You Actually Need
I spent years watching people try to guess their way through the integral of ln(x). They either stare at it blankly or reach for a substitution that doesn't work. There's nothing elegant about the first time you sit with it — you just need to apply integration by parts and get through it. The primitive of ln(x), written as ln(x)dx, equals x·ln(x) x + C. That's it. The derivation is one clean pass through integration by parts where you set u = ln(x) and dv = dx. Then du = 1/x dx and v = x. Multiply them out, the x cancels in the remaining integral, and you're left with x x, which collapses to just x. Add the constant and you're done. I remember a concrete case that still trips people up: definite integrals where the bounds include zero. ln(x) isn't defined at x = 0, so ¹ln(x)dx is an improper integral. If you blindly plug into the antiderivative you get [x·ln(x) x] evaluated from 0 to 1. At the upper bound you get 1. At the lower bound, x·ln(x) approaches 0 as x approaches 0 from the right — that's a standard limit, lim(x0) x·ln(x) = 0 — so the result is still 1. But the integral only converges because of that limit. Write it as an improper integral with a limit and you won't make the mistake of pretending ln(0) exists.
Here's the part most textbooks gloss over: the antiderivative x·ln(x) x is only valid on the domain x > 0. If you're working with negative values of x, you need to use ln(|x|) instead, and the primitive becomes x·ln|x| x + C. I once had a student who integrated ln(x) without adjusting and got a nonsensical complex result. It's a small detail, but it breaks everything downstream.
Why This Shows Up Everywhere
The integral of ln(x) appears in entropy calculations in information theory, in thermodynamics when you're working with logarithmic terms in free energy, and in probability when you deal with the exponential distribution's expected value. It also comes up in economics with consumer surplus under certain utility functions. You don't need to memorize every application, but knowing the form lets you recognize it quickly. Another practical note: if you're doing numerical work and your code needs to evaluate ln(x) near zero, the direct computation can overflow or underflow depending on your floating-point setup. A safer approach is to compute x·ln(x) using a dedicated function like xlog1p or a Taylor expansion around zero when |x| is small. This cuts numerical error significantly compared to evaluating ln(x) separately and then multiplying.
Get the Full Details

Common Mistakes That Waste Time
The most frequent error is setting up the wrong u and dv pair. If you choose u = dx and dv = ln(x)dx, you're asking for the integral of ln(x) inside the process, which loops back on itself. That tells you the choice was wrong. Always let u be the logarithmic term because its derivative simplifies, and let dv be the plain dx because its antiderivative is straightforward. A second error is dropping the absolute value when the problem involves ln(|x|). The formula ln(x)dx = x·ln(x) x + C only holds for x > 0. For the general case over any interval that includes negative values, you must write ln|x|dx = x·ln|x| x + C. I've graded papers where students lost points for this exact reason, and the mistake is harder to catch than you'd expect because the visual form looks identical. There's also a subtle issue with definite integrals where the bounds cross zero. You can't just evaluate the antiderivative across a discontinuity. The integral ¹ln|x|dx needs to be split into ln(x)dx + ¹ln(x)dx, and each piece must be treated as an improper integral. The result works out to 2, but skipping the split gives you a formally incorrect path even if the numerical answer happens to match by coincidence.
When the Simple Formula Fails
The closed form x·ln(x) x + C is complete for basic cases, but it doesn't extend cleanly to more complex expressions. If you're integrating ln(x² + 1) or x·ln(x), you still use integration by parts, but the remaining integral may not have an elementary antiderivative. For example, ln(x² + 1)dx requires a second round of integration by parts and leaves you with an arctangent term: x·ln(x² + 1) 2x + 2·arctan(x) + C. That's correct, but it's easy to miss the coefficient on the arctan if you're rushing. For x·ln(x)dx, integration by parts gives you x²/2 · ln(x) x²/4 + C. Again, straightforward, but the algebra is where people slip — particularly with the factor of 1/2 from the power rule on v. And yes, there are cases where no elementary antiderivative exists at all. ln(ln(x))dx doesn't have one. You'd need special functions or numerical approximation. I've seen this come up in practice when someone tried to model a double-logarithmic growth curve and hit a wall because they assumed every logarithmic integral could be written in closed form. It can't. Know the boundary so you don't waste hours chasing something that doesn't exist.
A Quick Reference Walkthrough
Working through ln(x)dx step by step: Set u = ln(x), so du = (1/x)dx. Set dv = dx, so v = x.

Apply the formula: u·dv = uv v·du. Substitute: x·ln(x) x · (1/x)dx. Simplify the integral: 1 dx = x.
Result: x·ln(x) x + C. Check it by differentiating. d/dx[x·ln(x) x] = ln(x) + x·(1/x) 1 = ln(x) + 1 1 = ln(x). It checks out. The verification takes ten seconds and prevents half the errors if you make it a habit. I usually tell people who are just learning this to write the verification on the same page as the integration. It forces you to actually do it instead of assuming correctness. The mental overhead is minimal and it catches sign errors, missing constants, and boundary mistakes in one pass.
The formula itself is short enough to fit on a flashcard, but the applications are where the real work happens. If you're studying for an exam, spend more time on the improper integral cases and the negative-domain extension than on the base derivation. Those are what show up in problem sets, and they're where most people lose points.
