To differentiate a logarithm of a function, use the chain rule: the derivative of ln(u) is u′/u. For a logarithm with base b, use u′/(u ln b). Identify the inside function, differentiate it, and divide by the original inside. You will also need to check that the logarithm’s argument is positive wherever you are working.
What You’ll Need
- A working knowledge of basic derivatives, especially the power rule and chain rule.
- The rule for differentiating a natural logarithm: d/dx[ln(u)] = u′/u.
- A clear view of the function’s domain, so you can state where the original logarithm and its derivative are defined.
- Paper or a calculator for checking algebra. A calculator can check a numerical value, but it does not replace showing the derivative rule.
Step-by-Step
- Identify the logarithm and its base. A natural logarithm is written ln(u) and has base e. A logarithm written logb(u) has base b. In some school and engineering contexts, log(x) means base 10; in other contexts it means the natural logarithm. Check the notation or course convention before differentiating. The base matters because a logarithm with a fixed base other than e has an extra factor of 1/ln(b).
- Check the argument’s domain. For a real-valued logarithm, its argument must be greater than zero. Thus ln(u(x)) is defined where u(x) > 0, and logb(u(x)) also requires b > 0 and b ≠ 1. Keep those restrictions in mind when stating the final answer. For example, ln(2x − 1) is defined only when x > 1/2.
- Name the inside function. In ln(2x − 1), set u(x) = 2x − 1. In ln(x2 + 4), set u(x) = x2 + 4. This simple separation makes it harder to forget that the logarithm is a composite function. If the inside is complicated, write it on its own line before applying any rules.
- Differentiate the inside. Find u′(x) using the usual rules. For u(x) = 2x − 1, the derivative is 2. For u(x) = x2 + 4, it is 2x. If the inside is a product, quotient, or another composite expression, finish that derivative carefully before substituting it into the logarithm rule.
- Apply the natural-log rule. For y = ln(u(x)), write y′ = u′(x)/u(x). In other words, put the derivative of the inside on top and the original inside on the bottom. For y = ln(x2 + 4), this gives y′ = 2x/(x2 + 4). Do not replace the denominator with its derivative: the denominator is the original argument.
- Include the base factor when needed. For y = logb(u(x)), use y′ = u′(x)/(u(x) ln b). For example, if y = log3(2x − 1), then y′ = 2/((2x − 1)ln 3), for x > 1/2. If the notation is log(x) and your class defines that as base 10, the derivative is u′/(u ln 10), not just u′/u.
- Simplify and state the valid interval. Combine constants or factor expressions when doing so makes the result clearer, but do not cancel a factor without checking whether it can be zero. Then state any domain restriction inherited from the original logarithm. For ln(x2 − 9), the argument must be positive, so the function is defined for x < −3 or x > 3. The derivative is 2x/(x2 − 9) on those intervals, not at the points where the original function is undefined.
- Use logarithmic differentiation for a variable exponent or complicated product. If a positive function is a product, quotient, or has a variable base and exponent, take the natural logarithm of both sides first. For instance, let y = xx, with x > 0. Take logs to get ln y = x ln x. Differentiate implicitly: y′/y = ln x + 1, using the product rule on the right. Multiply by y and substitute y = xx, giving y′ = xx(ln x + 1). This technique is useful when ordinary product and chain rules would create many terms.
For logarithmic differentiation, remember that taking a logarithm does not remove the need for domain checks. The transformation ln y requires y > 0. If the expression is not positive over the entire interval of interest, restrict the work to an interval where it is positive or choose a different method.
Common Mistakes
- Forgetting the chain rule. The derivative of ln(5x + 2) is not simply 1/(5x + 2). The inside derivative is 5, so the result is 5/(5x + 2).
- Using the wrong base rule. The shortcut u′/u applies to ln(u). For a base-10 logarithm, include ln 10 in the denominator. When a textbook writes log without a base, use the convention it specifies.
- Putting the wrong expression in the denominator. The denominator is the original argument, not its derivative. For ln(x2 + 1), it is x2 + 1, while the numerator is 2x.
- Ignoring the domain. A real logarithm cannot take zero or a negative argument. Differentiating a formula algebraically does not make it valid where the original function does not exist.
- Dropping parentheses too early. In log2(x + 3), the whole expression x + 3 is the argument. Keep it grouped while applying the rule to avoid misplacing terms.
- Applying logarithmic differentiation to a function that can be negative without adjustment. Taking ln(y) assumes y > 0. If you use ln|y|, you must still specify an interval on which y ≠ 0 and handle the absolute value correctly.
Tips
- Write the general rule beside the problem before substituting: [ln(u)]′ = u′/u. This prompts you to include both the inside derivative and the original inside.
- Keep a small two-column note: “inside” and “inside derivative.” For ln(sin x), those entries are sin x and cos x, so the derivative is cos x/sin x = cot x, wherever sin x > 0 for the real logarithm.
- For a quotient or product inside the logarithm, you can sometimes simplify first using log identities. For positive u and v, ln(uv) = ln u + ln v and ln(u/v) = ln u − ln v. Differentiating the expanded form may be easier, but check that each logarithm introduced is defined on the interval being used.
- Keep exact constants such as ln 2 or ln 10 until the final line. Replacing them with decimals too soon can obscure the correct base factor.
- Check a result by estimating a numerical slope at a point in the domain, if you have a graphing or scientific calculator. A numerical check can reveal a missing factor, though it cannot prove the symbolic derivative is correct.
- When differentiating a variable power f(x)g(x), logarithmic differentiation gives ln y = g(x)ln(f(x)), assuming f(x) > 0. Differentiate the right side with the product rule, then multiply by y to recover y′.
Troubleshooting
If the answer seems to be missing a factor, label the argument u and calculate u′ separately. Then build the derivative as a fraction with u′ above u. For a base other than e, add ln b to the denominator. This check catches the most common chain-rule and base errors.
If your derivative has a denominator that can be zero, compare those zero points with the original function’s domain. The derivative cannot be claimed at a point where the original logarithm is not defined. For example, ln(x2 − 1) requires x < −1 or x > 1; the points −1 and 1 are excluded even if an algebraic simplification seems to remove a factor.
If two methods give different-looking answers, simplify them on the domain and compare. For example, 2x/(x2 + 1) and 2/x ÷ (1 + 1/x2) may look different but can be equivalent where the expressions are defined. Do not cancel terms across addition or subtraction; only common factors can be canceled.
If logarithmic differentiation produces an invalid logarithm, pause and check whether the function is positive on the interval. You may need to work on a smaller interval, use ln|y| where appropriate, or use direct product and chain rules instead. If the issue is only notation, confirm whether log means base 10 or base e in the source you are using.
Frequently Asked Questions
What is the derivative of ln(x)?
It is 1/x, for x > 0. More generally, [ln(u(x))]′ = u′(x)/u(x) wherever u(x) > 0.
What is the derivative of log base 10 of x?
It is 1/(x ln 10) for x > 0. The factor ln 10 appears because base 10 is not the natural-log base e.
How do you differentiate ln of a function, such as ln(3x squared plus 1)?
Differentiate the inside and divide by the original inside. For ln(3x2 + 1), the inside derivative is 6x, so the derivative is 6x/(3x2 + 1). The argument is positive for every real x.
Can the argument of a real logarithm be negative?
No. A real logarithm requires a positive argument. Some advanced settings define complex logarithms for negative or complex inputs, but that uses different rules and conventions from ordinary real-variable calculus.
When should I use logarithmic differentiation?
Use it when a function has a variable exponent, or when taking a logarithm turns a complicated product or quotient into a manageable sum or difference. It is especially helpful for expressions such as xx or (x + 1)2(x − 3)5. Check that the function is positive on the interval where you take its natural logarithm.
Does the derivative of ln|x| equal 1/x?
Yes, for x ≠ 0. The absolute value makes ln|x| defined on both sides of zero, but zero itself remains excluded. This is different from ln x, whose real domain is only x > 0.
Related
- How to Encrypt an Excel File With a Password
- Encrypt an Excel File: Steps, Limits, and Safer Sharing
- Encrypt an Excel Spreadsheet: Steps and Security Tips
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Add Leading Zeros in Excel: Formatting and FormulasTo show a zero before a number in Excel, select the cells and apply a custom number format…
- Snowflake SPLIT Function: Syntax, Examples & UsageSnowflake’s SPLIT function divides a string wherever it finds a specified delimiter and returns the pieces as an…
- Excel Formula to Return Text Left of a Character in a CellTo return the text to the left of a character in Excel, use =LEFT(A2,FIND("-",A2)-1), replacing A2 with the…
- PostgreSQL Built-In Functions and How to Use ThemPostgreSQL built-in functions are ready-to-use operations for working with values and database information. They cover tasks such as…
- Excel Formula Color: How to Use Conditional FormattingYou cannot make a standard Excel formula directly change a cell’s font or fill color. To color cells…
- Excel Date Validation Formula: How to Restrict EntriesThe quickest way to add date validation in Excel is to use Data Validation with a formula. For…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.