Logarithmic Differentiation for MATH 139
Exam Relevance for MATH 139
Useful for products/quotients with many terms or variable exponents like x^x. Take ln of both sides.
This skill appears on:
What Is Logarithmic Differentiation?
Logarithmic differentiation is a technique where you take the natural log of both sides of an equation before differentiating. This transforms products into sums and powers into coefficients, making certain derivatives much easier to compute.
🔑 When to Use It: Take the log of both sides when you have:
- A variable in both the base AND the exponent (like $x^x$)
- A complicated product or quotient of many factors
- A function raised to a function power
Why Does It Work?
The magic comes from logarithm properties:
| Expression | After Taking ln |
|---|---|
| $\ln(ab)$ | $\ln a + \ln b$ |
| $\ln\left(\frac{a}{b}\right)$ | $\ln a - \ln b$ |
| $\ln(a^n)$ | $n \ln a$ |
These properties turn:
- Products → Sums (easier to differentiate)
- Quotients → Differences (easier to differentiate)
- Powers → Coefficients (brings exponents down)
The Process
- Start with $y = f(x)$
- Take the natural log of both sides: $\ln y = \ln f(x)$
- Simplify the right side using log properties
- Differentiate both sides with respect to $x$ (left side becomes $\frac{1}{y} \cdot \frac{dy}{dx}$)
- Solve for $\frac{dy}{dx}$
- Substitute back $y = f(x)$ to get your answer in terms of $x$
Find $\frac{dy}{dx}$ if $y = x^x$ for $x > 0$.
This is the classic case! We have $x$ in both the base and the exponent. Neither the power rule nor the exponential rule applies directly.
Step 1: Take ln of both sides
$$\ln y = \ln(x^x)$$
Use log properties to bring down the exponent: $$\ln y = x \ln x$$
Step 2: Differentiate both sides with respect to $x$
Left side (chain rule): $$\frac{d}{dx}[\ln y] = \frac{1}{y} \cdot \frac{dy}{dx}$$
Right side (product rule): $$\frac{d}{dx}[x \ln x] = 1 \cdot \ln x + x \cdot \frac{1}{x} = \ln x + 1$$
So we have: $$\frac{1}{y} \cdot \frac{dy}{dx} = \ln x + 1$$
Step 3: Solve for $\frac{dy}{dx}$ and substitute back
$$\frac{dy}{dx} = y(\ln x + 1)$$
Substitute $y = x^x$: $$\boxed{\frac{dy}{dx} = x^x(\ln x + 1)}$$
Find $\frac{dy}{dx}$ if $y = (\sin x)^x$ for appropriate $x$.
Again, variable in base AND exponent.
Step 1: Take ln of both sides and simplify
$$\ln y = \ln[(\sin x)^x] = x \ln(\sin x)$$
Step 2: Differentiate both sides
Left side: $$\frac{1}{y} \cdot \frac{dy}{dx}$$
Right side (product rule): $$\frac{d}{dx}[x \ln(\sin x)] = 1 \cdot \ln(\sin x) + x \cdot \frac{1}{\sin x} \cdot \cos x = \ln(\sin x) + x \cot x$$
Step 3: Solve and substitute
$$\frac{dy}{dx} = y\left[\ln(\sin x) + x \cot x\right]$$
$$\boxed{\frac{dy}{dx} = (\sin x)^x\left[\ln(\sin x) + x \cot x\right]}$$
Find $\frac{dy}{dx}$ if $y = (2x+1)^{x^2}$.
Step 1: Take ln of both sides
$$\ln y = x^2 \ln(2x+1)$$
Step 2: Differentiate using the product rule
Left side: $\frac{1}{y} \cdot \frac{dy}{dx}$
Right side: $$\frac{d}{dx}[x^2 \ln(2x+1)] = 2x \cdot \ln(2x+1) + x^2 \cdot \frac{2}{2x+1} = 2x \ln(2x+1) + \frac{2x^2}{2x+1}$$
Step 3: Solve and substitute
$$\boxed{\frac{dy}{dx} = (2x+1)^{x^2}\left[2x \ln(2x+1) + \frac{2x^2}{2x+1}\right]}$$
Find $\frac{dy}{dx}$ if $y = \frac{x^2 \sqrt{x+1}}{(x-1)^3}$ for $x > 1$.
This CAN be done with quotient and product rules, but it's messy. Logarithmic differentiation is cleaner!
Step 1: Take ln and expand using log properties
$$\ln y = \ln\left[\frac{x^2 \sqrt{x+1}}{(x-1)^3}\right]$$ $$\ln y = \ln(x^2) + \ln(\sqrt{x+1}) - \ln((x-1)^3)$$ $$\ln y = 2\ln x + \frac{1}{2}\ln(x+1) - 3\ln(x-1)$$
Step 2: Differentiate both sides
Left side: $\frac{1}{y} \cdot \frac{dy}{dx}$
Right side: $$\frac{d}{dx}\left[2\ln x + \frac{1}{2}\ln(x+1) - 3\ln(x-1)\right] = \frac{2}{x} + \frac{1}{2(x+1)} - \frac{3}{x-1}$$
Step 3: Solve and substitute
$$\boxed{\frac{dy}{dx} = \frac{x^2 \sqrt{x+1}}{(x-1)^3}\left[\frac{2}{x} + \frac{1}{2(x+1)} - \frac{3}{x-1}\right]}$$
Find $\frac{dy}{dx}$ if $y = x(x+1)(x+2)(x+3)$.
Step 1: Take ln and expand
$$\ln y = \ln x + \ln(x+1) + \ln(x+2) + \ln(x+3)$$
Step 2: Differentiate
$$\frac{1}{y} \cdot \frac{dy}{dx} = \frac{1}{x} + \frac{1}{x+1} + \frac{1}{x+2} + \frac{1}{x+3}$$
Step 3: Solve and substitute
$$\boxed{\frac{dy}{dx} = x(x+1)(x+2)(x+3)\left[\frac{1}{x} + \frac{1}{x+1} + \frac{1}{x+2} + \frac{1}{x+3}\right]}$$
This is MUCH easier than repeatedly using the product rule!
The Key Formula
For $y = f(x)^{g(x)}$ where both $f$ and $g$ are functions of $x$:
$$\frac{dy}{dx} = f(x)^{g(x)}\left[g'(x)\ln f(x) + g(x) \cdot \frac{f'(x)}{f(x)}\right]$$
But rather than memorizing this, just follow the process:
- Take ln of both sides
- Bring down the exponent
- Use product rule
- Solve for $\frac{dy}{dx}$
- Substitute back
When to Use Each Technique
| Function Type | Technique |
|---|---|
| $x^n$ (constant exponent) | Power rule: $nx^{n-1}$ |
| $a^x$ (constant base) | Exponential rule: $a^x \ln a$ |
| $e^{f(x)}$ | Chain rule: $e^{f(x)} \cdot f'(x)$ |
| $f(x)^{g(x)}$ (both variable) | Logarithmic differentiation |
| Complicated products/quotients | Logarithmic differentiation |
Common Mistakes and Misunderstandings
❌ Mistake: Forgetting the chain rule on the left side
Wrong: $\frac{d}{dx}[\ln y] = \frac{1}{y}$
Why it's wrong: Since $y$ is a function of $x$, you need the chain rule!
Correct: $\frac{d}{dx}[\ln y] = \frac{1}{y} \cdot \frac{dy}{dx}$
❌ Mistake: Not substituting back for $y$
Wrong: Leaving your answer as $\frac{dy}{dx} = y(\ln x + 1)$
Why it's wrong: The final answer should be entirely in terms of $x$.
Correct: Substitute $y = x^x$ to get $\frac{dy}{dx} = x^x(\ln x + 1)$
❌ Mistake: Using power rule on $x^x$
Wrong: "The derivative of $x^x$ is $x \cdot x^{x-1}$"
Why it's wrong: The power rule only works when the exponent is a constant. Here both base and exponent vary.
Correct: Use logarithmic differentiation to get $x^x(\ln x + 1)$
❌ Mistake: Using exponential rule on $x^x$
Wrong: "The derivative of $x^x$ is $x^x \ln x$"
Why it's wrong: The exponential rule only works when the base is a constant. Here both base and exponent vary.
Correct: Use logarithmic differentiation to get $x^x(\ln x + 1)$
Quick Reference
The Process:
- $y = f(x)$ → Take ln → $\ln y = \ln f(x)$
- Simplify using log properties
- Differentiate: $\frac{1}{y}\frac{dy}{dx} = \text{(derivative of right side)}$
- Multiply both sides by $y$
- Replace $y$ with original function
Use logarithmic differentiation when:
- Variable base AND variable exponent: $f(x)^{g(x)}$
- Many factors multiplied together
- Complex quotients with powers
Logarithmic Differentiation (Left Side)
When you differentiate ln(y) with respect to x, you must use the chain rule since y is a function of x. This gives the key left-side term in logarithmic differentiation.
Variables:
- $y$:
- A function of x
- $x$:
- The independent variable
- $\frac{dy}{dx}$:
- The derivative we're solving for
Derivative of f(x)^{g(x)}
The general formula for differentiating a function with a variable base and variable exponent. Derived using logarithmic differentiation.
Variables:
- $f(x)$:
- The base function
- $g(x)$:
- The exponent function
- $f'(x)$:
- Derivative of the base
- $g'(x)$:
- Derivative of the exponent
Derivative of x^x
The classic logarithmic differentiation example. Neither power rule nor exponential rule applies since both base and exponent are variables.
Variables:
- $x$:
- The variable (must be positive)
- $\ln x$:
- Natural logarithm of x
Log of a Product
Logarithm property that converts products into sums. This makes differentiation easier since sums are easier to differentiate than products.
Variables:
- $a$:
- First factor (positive)
- $b$:
- Second factor (positive)
Log of a Quotient
Logarithm property that converts quotients into differences. This simplifies differentiation of complex fractions.
Variables:
- $a$:
- Numerator (positive)
- $b$:
- Denominator (positive)
Log of a Power
Logarithm property that brings exponents down as coefficients. This is the key property that makes logarithmic differentiation work for variable exponents.
Variables:
- $a$:
- The base (positive)
- $n$:
- The exponent (can be any real number or function)
This skill is taught in the following courses. Create an account to access practice exercises and full course materials.