Math.do

Calculus worked example

Integrate ln(x) dx

Evaluate the integral of ln(x) by choosing u = ln(x) in integration by parts.

Question

How do you integrate ln(x) with respect to x?

Step-by-step solution

Use integration by parts. Because ln(x) is defined for x > 0, the following work applies on that domain.

Step 1: Choose u and dv

The integration by parts rule is ∫u dv = uv − ∫v du. Set u = ln(x) and dv = dx. Then du = (1/x) dx and v = x.

Step 2: Apply the rule

∫ln(x) dx = x ln(x) − ∫x(1/x) dx.

Since x(1/x) = 1 for x > 0, the remaining integral is ∫1 dx = x.

Final answer

∫ln(x) dx = x ln(x) − x + C, for x > 0.

Check by differentiating: d/dx [x ln(x) − x] = [ln(x) + 1] − 1 = ln(x). More generally, ∫ln|x| dx = x ln|x| − x + C on an interval that excludes zero.