# The Derivative of ln^2(x)

The derivative of ln^2(x) is 2ln(x)/x

## How to calculate the derivative of ln^2(x)

Note that in this post we will be looking at differentiating ln2(x) which is not the same as differentiating ln(x2) or ln(2x). Here are our posts dealing with how to differentiate ln(x2) and how to differentiate ln(2x)

There are two methods that can be used for calculating the derivative of ln^2(x).

The first method is by using the product rule for derivatives (since ln2(x) can be written as ln(x).ln(x)).

The second method is by using the chain rule for differentiation.

### Finding the derivative of ln^2x using the product rule

The product rule for differentiation states that the derivative of f(x).g(x) is f’(x)g(x) + f(x).g’(x)

The Product Rule:
For two differentiable functions f(x) and g(x)

If F(x) = f(x).g(x)

Then the derivative of F(x) is F'(x) = f’(x)g(x) + f(x)g'(x)

First, let F(x) = ln2(x)

Then remember that ln2(x) is equal to ln(x).ln(x)

So F(x) = ln(x)ln(x)

By setting f(x) and g(x) as ln(x) means that F(x) = f(x).g(x) and we can apply the product rule to find F'(x) (remembering that the derivative of ln(x) is 1/x)

Using the product rule, the derivative of ln^2x is 2ln(x)/x

### Finding the derivative of ln^2x using the chain rule

The chain rule is useful for finding the derivative of a function which could have been differentiated had it been in x, but it is in the form of another expression which could also be differentiated if it stood on its own.

In this case:

• We know how to differentiate ln(x) (the answer is l/x)
• We know how to differentiate x2 (the answer is 2x)

This means the chain rule will allow us to perform the differentiation of the expression ln^2x.

#### Using the chain rule to find the derivative of ln^2x

Although the expression ln2x contains no parenthesis, we can still view it as a composite function (a function of a function).

We can write ln2x as (ln(x))2.

Now the function is in the form of x2, except it does not have x as the base, instead it has another function of x (ln(x)) as the base.

Let’s call the function of the base g(x), which means:

g(x) = ln(x)

From this it follows that:

(ln(x))2 = g(x)2

So if the function f(x) = x2 and the function g(x) = ln(x), then the function (ln(x))2 can be written as a composite function.

f(x) = x2

f(g(x)) = g(x)2 (but g(x) = ln(x))

f(g(x)) = (ln(x))2

Let’s define this composite function as F(x):

F(x) = f(g(x)) = (ln(x))2

We can find the derivative of ln^2x (F'(x)) by making use of the chain rule.

The Chain Rule:
For two differentiable functions f(x) and g(x)

If F(x) = f(g(x))

Then the derivative of F(x) is F'(x) = f’(g(x)).g’(x)

Now we can just plug f(x) and g(x) into the chain rule.

How to find the derivative of ln^2x using the Chain Rule:

Using the chain rule, the derivative of ln^2x is 2ln(x)/x

Finally, just a note on syntax and notation: ln^2x is sometimes written in the forms below (with the derivative as per the calculations above). Just be aware that not all of the forms below are mathematically correct.

## The Second Derivative Of ln^2x

To calculate the second derivative of a function, you just differentiate the first derivative.

From above, we found that the first derivative of ln^2x = 2ln(x)/x. So to find the second derivative of ln^2x, we just need to differentiate 2ln(x)/x

We can use the quotient rule to find the derivative of 2ln(x)/x.

We can set f(x) = ln(x) and g(x) = x and apply the quotient rule to find the derivative of f(x)/g(x) = 2(1-ln(x))/x2

The second derivative of ln^2x is 2(1-ln(x))/x2