# How to Integrate the Function Ln(x)^2 (Natural Log Squared)

Integration by parts can be used to find the antiderivatives of powers of complicated functions, for example, the function j(x) = Ln(x)^2, the square of the natural logarithm function. The integration by parts formula is

**∫** f(x)**·**g* '*(x) dx = f(x)

**·**g(x) -

**∫**f

*(x)*

**'****·**g(x) dx

where f(x) and g* '*(x) are chosen in such a way as to make the right hand side of the expression something easier to integrate. See companion article on the derivation of the integration by parts technique.

When using this method of finding antiderivatives in integral calculus, there is often more than one way to assign the functions f(x) and g* '*(x) depending on the structure of the integrand. For instance, if the function to be integrated looks clearly like the product of two simpler functions, it is natural to assign f(x) to the more complicated of the two factors, and g

*(x) to the factor that can easily be integrated. In the case of Ln(x)^2, there are routes of integration.*

**'**## Method 1: f(x) = Ln(x) and g'(x) = Ln(x) dx

If f(x) = Ln(x), then f* '*(x) = 1/x dx. And if g

*(x) = Ln(x) dx, then g(x) = x*Ln(x) - x. Putting all the pieces together gives us*

**'****∫** Ln(x)^2 dx = x*Ln(x)^2 - x*Ln(x) - **∫** x*Ln(x)/x dx + **∫** x/x dx

= x*Ln(x)^2 - x*Ln(x) -** ∫ Ln(x) dx** + **∫** dx

= x*Ln(x)^2 - x*Ln(x) - x*Ln(x) + x + x

= x*Ln(x)^2 - 2x*Ln(x) + 2x + C

## Method 2: f(x) = Ln(x)^2 and g'(x) = dx

If f(x) = Ln(x)^2, then f* '*(x) = 2*Ln(x)/x. And if g

*(x) = dx, then g(x) = x. Putting all of these pieces together into the integration by parts formula gives us*

**'****∫** Ln(x)^2 dx = x*Ln(x)^2 - 2***∫** Ln(x) dx

= x*Ln(x)^2 - 2x*Ln(x) + 2x + C

This method had fewer steps than the previous method, and both produce the same answer.

## Integration Example 1

Find the area under the curve of y = Ln(x)^2 from x = 1 to x = e^2. A graph of y = Ln(x)^2 is shown below.

Since the antiderivative of Ln(x)^2 is x*Ln(x)^2 - 2x*Ln(x) + 2x, the area under the curve is found by plugging in the endpoints x = e^2 and x = 1 and then subtracting the two values. Doing so gives you

(e^2)Ln(e^2)^2 - (2e^2)Ln(e^2) + 2e^2 - Ln(1)^2 + 2*Ln(1) - 2

= 4e^2 - 4e^2 + 2e^2 - 0 + 0 - 2

= 2e^2 - 2

≈ 12.7781

## Integration Example 2

Using the known antiderivative of Ln(x)^2, what is the antiderivative of the function f(x) = x*Ln(x)^2?

We can tackle this one using integration by parts. Let

u = x

dv = Ln(x)^2 dx

du = dx

v = x*Ln(x)^2 - 2x*Ln(x) + 2x

Our integral becomes

∫ x*Ln(x)^2 dx

= ∫ u dv

= uv - ∫ v du

= (x^2)Ln(x)^2 - (2x^2)Ln(x) + 2x^2 **- ∫ x*Ln(x)^2 dx** + ∫ 2x*Ln(x) dx - ∫ 2x dx

Notice that we get an equation with the same unknown integral on both sides. Bringing it over to the left-hand side of the equation and working out the simpler integrals gives us

2 * ∫ x*Ln(x)^2 dx

= (x^2)Ln(x)^2 - (2x^2)Ln(x) + 2x^2 + (x^2)Ln(x) - (1/2)x^2 - x^2

= (x^2)Ln(x)^2 - (x^2)Ln(x) + (1/2)x^2

This tells us that the antiderivative of x*Ln(x)^2 is

∫ x*Ln(x)^2 dx

= (1/2)[(x^2)Ln(x)^2 - (x^2)Ln(x) + (1/2)x^2] + c

## Comments

This is so good! Thanks

Could anybody tell me the integration of log(1+x^2)