Integrating tanh(x).

You will probably remember that the derivative of ln(x) is 1/x.

Here ln(x) is the natural logarithm function, or log-to-base-e.

What do we get if instead we differentiate ln(x2)?

This is a nested function, which means that we differentiate the ln as usual, then multiply by the derivative of the function inside.

This gives us:

Here the "1/x2" comes from differentiating the ln, while the "2x" comes from differentiating the function inside, namely the x2.

Cancelling then, we get that the derivative of ln(x2) is 2/x.

(In fact we could have got this result quicker by using a log law to rewrite the original expression ln(x2) as 2ln(x), then differentiating that immediately gives 2/x.)

However the point is this:
If we differentiate the log of a function, we get "one over the function" multiplied by the derivative of that function. Why should that be useful?

Well, recall that tanh(x)=sinh(x)/cosh(x) and that the derivative of cosh(x) is sinh(x).

So tanh(x) itself is of the form: "one over a function, multiplied by the derivative", where in this case the function on the bottom is cosh(x). This suggests that if we differentiate the LOG of cosh(x), then we might get tanh(x).

Sure enough we do:

Now that's quite a neat trick and perhaps you wouldn't think of it if you hadn't seen it before. It is often useful in other cases as well as tanh(x), as is discussed in the 2nd-level module on Further Integration.

What we've found then is: