Why the derivative of ln x is 1/x, and why ln|x| has the same one
The derivative of is : write as , differentiate both sides, and it falls out in three lines. The function has the same derivative, , on both sides of zero, and that is exactly why the integral of is rather than .
Start from what ln x means
is the logarithm in base , and its whole definition is that it undoes :
Two facts come with that sentence, and both are used below.
- is positive for every , so exists only for . Its domain is .
- The graph of is the graph of reflected in the line : every point on one becomes the point on the other.
Getting 1/x in three lines
Rewrite in exponential form and differentiate both sides with respect to . This is implicit differentiation: depends on , so the left side needs the chain rule.
- Rewrite. .
- Differentiate both sides. .
- Solve, then use the definition once more. is , so
So for every . Step 3 is the one to remember: the answer first comes out in terms of , and the definition is what turns it back into . The same move gives the derivatives of the inverse trigonometric functions.
The same fact, on the graph
Reflecting in swaps rise and run, so a tangent of slope becomes a tangent of slope . On the point has slope , because is its own derivative. Its mirror image on is the point , where the slope is therefore : exactly at . Every point pairs up the same way.
Why ln|x| has the same derivative
is defined for every , because is positive on both sides of zero. Split it at zero and differentiate each piece.
- For : , so , whose derivative is .
- For : , so , and the chain rule gives
The two minus signs cancel, so both pieces give the same formula:
Notice that is negative when . The graph says the same thing: is the graph of together with its mirror image in the -axis, and a mirror in the -axis reverses the sign of every slope. The right branch rises, and the left branch falls as moves towards zero.
Why the integral of 1/x is ln|x| + C
An antiderivative of has to work wherever you need it, and is perfectly well defined for negative .
- has derivative on only. For negative it does not exist at all.
- has derivative on and on .
That is the whole reason for the absolute value:
It is still used on one interval at a time. Zero is not in the domain of , so the formula applies on an interval of positive numbers or on an interval of negative numbers, never on one that contains .
Two worked examples
1. Differentiate
Combine the chain rule with , taking :
The absolute value is doing real work here. On the inside is negative, so on that interval . Differentiating that piece directly:
The same formula. holds whatever the sign of , so you never need to split into cases to differentiate. You only need the cases to know where the function exists.
2. Integrate from to
The interval does not contain , so is an antiderivative on all of it:
and by the quotient law that is
Check the sign: is negative on the whole interval, so the integral has to be negative, and is. Try the same computation with in place of and the very first step asks for , which does not exist.
The common slip: keeping the bars in the derivative. The derivative of is , with no absolute value anywhere. The tempting version puts in the denominator as well, and that expression is positive for every , so it would make the left branch rise. The left branch falls: at the slope of is .
The same slip in reverse happens with integrals: for the integral of . That answer is right on and nowhere else, so it is acceptable only when the question has already restricted to positive values.
Check your understanding
No calculator. The first three are quick; the rest ask for a reason as well as an answer.
- The tangent to at has slope . Without differentiating , give the slope of the tangent to at the point .
- Find the slope of at , and say whether the graph is rising or falling there.
- Differentiate , and state where your derivative is valid.
- True or false, with a reason: on the interval , is just as good an antiderivative of as .
- Differentiate . What antiderivative of does your answer give you, and why does it need the absolute value?
- Use the method of this post, writing as , to find the derivative of .
- Calculus II: evaluate .
- Calculus II: find the error. A student writes .
Show the answers
- . Reflecting in swaps rise and run, so the slope becomes the reciprocal of . It agrees with at .
- , so the graph is falling. The derivative of is , which is negative for every .
- for every . The chain rule gives , which is ; thanks to the bars, it holds on both sides of .
- True. Every in is positive, so and the two expressions are the same function there. The bars only change anything on an interval of negative numbers.
- , so is an antiderivative of on any interval where . The bars are needed because is negative on intervals such as , where is still defined.
- . Differentiating gives , so , and .
- . The interval avoids , so . It is negative, as it must be: on the whole interval.
- The interval contains , where is undefined, so is not an antiderivative on the whole interval and the subtraction is not allowed. The integral is improper, and it has no value: the piece from to alone already diverges to .
Practise it
The free CEGEP Calculus I Derivatives of Transcendental Functions worksheet has logarithmic derivatives with their domains to state, logarithmic differentiation, and the rest of the family: exponentials, trigonometric and inverse trigonometric functions. The questions are on the page, with a printable PDF.
Want one-on-one help with this? I offer CEGEP Science calculus and linear algebra tutoring in Montreal, in person or online. Sessions start with a short written diagnostic, and a written recap goes to whoever books after every session.