Tutorials › Calculus I › Domain Conditions in Logarithmic Differentiation

Exponential and Logarithmic Derivatives · Tutorial 556 of 1495

Domain Conditions in Logarithmic Differentiation

Determine where logarithms are valid before differentiating, and keep the domain of the original function separate from the domain of the logarithmic calculation.

Intermediate 10 min read

What You'll Learn

  • Identify the positivity conditions required to take logarithms of variable bases.
  • Find the domain on which logarithmic differentiation is valid.
  • Derive the logarithmic derivative formula with its assumptions stated.
  • Apply logarithmic differentiation to products and quotients of variable powers.
  • Distinguish excluded inputs in an intermediate formula from exclusions in the original function.
  • Recognize when a formula obtained on a restricted domain extends to an excluded point.

Why Domain Conditions Come First

Logarithmic differentiation can simplify the derivative of a function containing variable powers, products, or quotients. The method begins by taking a logarithm, however, and a real logarithm is defined only for a positive input. That restriction is not a detail to check after differentiating: it determines where the logarithmic calculation is valid.

There are two domains to keep track of. The original domain consists of all inputs for which the given expression is defined as a real-valued function. The logarithmic-differentiation domain consists of inputs where the logarithms and divisions used in the method are valid. The latter may be smaller. A formula derived there might simplify or extend to other points, but that does not make the intermediate logarithmic steps valid at those points.

Key rule: Before taking the logarithm of a variable base, establish that the base is positive on the inputs under consideration. Then check that every denominator introduced during differentiation is nonzero.

The Positive-Base Rule for Variable Powers

For a real variable exponent, the standard real-valued definition of \(u(x)^{v(x)}\) uses the exponential and logarithm:

$$ u(x)^{v(x)}=\exp\!\bigl(v(x)\ln u(x)\bigr), \qquad u(x)>0. $$

Thus, when a variable power is interpreted through this definition, its base must be positive. This condition is about the base, not merely about whether the whole expression happens to be positive at some inputs. A negative base raised to a variable real exponent is not generally a real-valued function on an interval.

Fixed integer powers are different: for example, \((x-2)^2\) is defined for every real \(x\), including inputs where its base is negative. One must not impose the positive-base requirement on the original polynomial just because logarithmic differentiation might be attempted on it. Instead, identify the original domain first, then identify where the logarithmic method itself can be used.

Definition: For a specified expression, the domain of a logarithmic-differentiation calculation is the set of inputs where the expression is defined, each logarithm used in the calculation has a positive argument, and each division used in the calculation has a nonzero denominator.

Deriving the Variable-Power Formula

Suppose \(u\) and \(v\) are differentiable on an interval, and \(u(x)>0\) throughout that interval. Define \(y=u^v\) using the real variable-power definition above. Since \(u>0\), \(y>0\), so \(\ln y\) is defined. Taking logarithms gives an identity on this interval:

$$ \ln y=v\ln u. $$

Differentiate both sides. The chain rule gives \(\frac{d}{dx}\ln y=y'/y\), while the product and chain rules give \(\frac{d}{dx}(v\ln u)=v'\ln u+v(u'/u)\). Therefore:

$$ \frac{y'}{y}=v'\ln u+v\frac{u'}{u}. $$

Multiplying by \(y=u^v\) yields the formula. The proof also shows exactly why its hypotheses matter: the logarithms require positivity, and the intermediate quotient \(u'/u\) requires \(u\ne 0\), which follows from \(u>0\).

Theorem: If \(u\) and \(v\) are differentiable and \(u>0\) on an interval, then \(y=u^v\) is differentiable there and $$ y'=u^v\left(v'\ln u+v\frac{u'}{u}\right). $$

Worked Example: A Variable Power with a Shifted Base

Worked Example: A Variable Power with a Shifted Base

Find the real domain of \(f(x)=(x+2)^{3x-1}\), then differentiate it using logarithmic differentiation.

Step 1: Find where the variable power is defined. The base must be positive: \(x+2>0\), so \(x>-2\). The exponent \(3x-1\) is defined for every real \(x\). Thus the real domain of this variable power is \((-2,\infty)\).

Step 2: Take logarithms on that domain. Since \(x+2>0\), both \(f(x)>0\) and \(\ln(x+2)\) are defined. Write \(\ln f=(3x-1)\ln(x+2)\).

Step 3: Differentiate. Differentiating the left side gives \(f'/f\). Applying the product rule to the right side gives \[ \frac{f'}{f}=3\ln(x+2)+(3x-1)\frac{1}{x+2}. \] Multiplying by \(f=(x+2)^{3x-1}\) gives \[ f'(x)=(x+2)^{3x-1}\left(3\ln(x+2)+\frac{3x-1}{x+2}\right),\qquad x>-2. \]

Check. At \(x=0\), the function value is \(f(0)=2^{-1}=\frac12\). The bracket is \(3\ln 2-\frac12\), so the formula gives \(f'(0)=\frac32\ln 2-\frac14\). This agrees with the derivative formula evaluated at the same point, where the base \(2\) is positive and the denominator \(x+2=2\) is nonzero.

Products and Quotients: Intersect All Conditions

When logarithms are taken of a product, each factor whose logarithm is used must be positive. When a quotient is involved, its denominator must also be nonzero in the original expression. The allowed inputs are the intersection of all these conditions, not a condition chosen from just one part of the formula.

For example, if \(y=A(x)^{B(x)}C(x)^{D(x)}\) is treated using separate logarithms of its variable-power factors, the calculation requires \(A(x)>0\) and \(C(x)>0\). Under those conditions, taking logarithms converts the product to a sum: \(\ln y=B\ln A+D\ln C\). The quotient rule for logarithms similarly requires positive numerator and denominator factors when each is logged separately.

Worked Example: A Quotient of Variable Powers

Find the domain and derivative of \[ g(x)=\frac{(x+1)^{2x}}{(3-x)^{x-1}}. \]

Step 1: Find the domain. The variable-power bases must be positive. The numerator requires \(x+1>0\), or \(x>-1\). The denominator’s base requires \(3-x>0\), or \(x<3\). Both conditions hold exactly when \(-1<x<3\). On this interval, the denominator power is positive and nonzero, so the quotient is defined.

Step 2: Take the logarithm. Both powers are positive on \((-1,3)\), and hence \(g>0\). Thus \[ \ln g=2x\ln(x+1)-(x-1)\ln(3-x). \]

Step 3: Differentiate each term. The first product differentiates to \(2\ln(x+1)+2x/(x+1)\). For the second product, the derivative of \(\ln(3-x)\) is \(-1/(3-x)\), so \[ \frac{d}{dx}\bigl((x-1)\ln(3-x)\bigr) =\ln(3-x)-\frac{x-1}{3-x}. \] Because this whole product is subtracted, its contribution to \((\ln g)'\) is \(-\ln(3-x)+(x-1)/(3-x)\). Therefore \[ \frac{g'}{g} =2\ln(x+1)+\frac{2x}{x+1}-\ln(3-x)+\frac{x-1}{3-x}. \]

Step 4: Multiply by \(g\). The derivative is \[ g'(x)=\frac{(x+1)^{2x}}{(3-x)^{x-1}} \left(2\ln(x+1)+\frac{2x}{x+1}-\ln(3-x)+\frac{x-1}{3-x}\right), \qquad -1<x<3. \]

Check. At \(x=1\), \(g(1)=2^2/2^0=4\). The bracket equals \(2\ln 2+1-\ln 2=\ln 2+1\), so \(g'(1)=4(\ln 2+1)\). All bases are positive there, and both denominators in the bracket equal \(2\), confirming the calculation is defined at this test input.

When the Original Function Has a Larger Domain

A logarithmic calculation can exclude points where the original expression is perfectly well-defined. One common reason is that taking the logarithm of the function itself requires the function to be positive, while the original function may be zero at some inputs. Another is that differentiating \(\ln|u|\) introduces \(u'/u\), which is undefined at zeros of \(u\).

For a differentiable function \(u\) with \(u\ne0\), the identity \[ \frac{d}{dx}\ln|u(x)|=\frac{u'(x)}{u(x)} \] holds. Indeed, for \(u>0\), this is the chain rule applied to \(\ln u\); for \(u<0\), \(\ln|u|=\ln(-u)\), whose derivative is \((-u)'/(-u)=u'/u\). The identity therefore applies where \(u\) is nonzero, but not at a zero of \(u\).

Worked Example: A Differentiable Point Excluded by the Logarithm

Consider \(h(x)=(x-2)^2\). Find its derivative using logarithmic differentiation where possible, and compare the method’s domain with the function’s domain.

Step 1: Compare the domains. The original expression is a polynomial, so it is defined for every real \(x\). It is positive when \(x\ne2\), but \(h(2)=0\); consequently, \(\ln h\) is defined only for \(x\ne2\).

Step 2: Differentiate where the logarithm is valid. For \(x\ne2\), \[ \ln h=2\ln|x-2|. \] Differentiating gives \[ \frac{h'}{h}=\frac{2}{x-2}. \] Multiplying by \(h=(x-2)^2\) gives \(h'=2(x-2)\) for \(x\ne2\).

Step 3: Check the excluded point in the original function. At \(x=2\), the derivative exists by the definition of derivative: \[ h'(2)=\lim_{t\to0}\frac{h(2+t)-h(2)}{t} =\lim_{t\to0}\frac{t^2-0}{t} =\lim_{t\to0}t=0. \] The simplified expression \(2(x-2)\) also equals \(0\) at \(x=2\), so it extends to the correct derivative there. The logarithmic step itself did not apply at \(2\), because \(\ln h(2)=\ln 0\) is undefined.

Check. The original derivative is \(2(x-2)\), and the logarithmic calculation produced that expression away from \(2\). At the excluded point, the difference quotient gives \(0\), matching the extension of the formula. The original domain is all real numbers; the logarithmic calculation’s domain is \(\mathbb R\setminus\{2\}\).

A Common Mistake: Treating the Formula as Its Own Domain Proof

A derivative expression may contain logarithms or denominators that impose restrictions. Those restrictions must be reported, even if the original expression has a larger domain. Conversely, simplifying a formula can remove an apparent restriction, but this does not retroactively make every step of the derivation valid at the removed point.

Common mistake: From \(h(x)=(x-2)^2\), one might write \(\ln h=2\ln(x-2)\) and claim this is valid whenever \(x\ne2\). That is wrong for \(x<2\), because \(x-2<0\) and \(\ln(x-2)\) is not real. The correction is to use \(\ln|x-2|\) on \(x\ne2\), or to take \(\ln h\) directly, which is valid since \(h>0\) there. In either version, the logarithmic calculation excludes \(x=2\).

There is a second caution: the identity \(\ln(ab)=\ln a+\ln b\) for real logarithms requires \(a>0\) and \(b>0\). It cannot be applied to negative factors merely because their product is positive. If a whole function is positive, taking its logarithm may be valid, but splitting that logarithm into individual factor logarithms requires the separate factors to satisfy the relevant positivity conditions.

A Reliable Domain Check

Before beginning logarithmic differentiation, use the following sequence. It separates the definition of the function from the conditions imposed by the method.

1
Determine the original domain.
Check the expression as written, including variable-power bases, denominators, and any other restrictions on real-valued components.
2
State where each logarithm is defined.
For a real logarithm, its argument must be positive. If logging individual variable-power bases, check each base separately.
3
Check divisions in the calculation.
Terms such as \(u'/u\) require \(u\ne0\), even when a later simplification might cancel or remove that denominator.
4
Report the domain of the derived formula.
Give the interval or set where the logarithmic argument is valid, rather than silently assigning it the original function’s domain.
5
Check excluded points separately.
If a simplified expression appears to extend to an excluded point, establish the derivative there by another valid argument before claiming the extension.

Why This Distinction Matters

Domain conditions are part of a differentiation argument, not just a preface to it. They ensure that identities involving logarithms are legal and that the chain rule is applied to functions defined at the inputs being considered. Keeping the two domains separate also prevents a correct formula on one interval from being mistaken for a proof about points outside that interval.

For variable powers defined through \(u^v=\exp(v\ln u)\), positivity of the base is essential to the real definition. For other expressions, such as fixed integer powers, the original function may exist even when a logarithm used during a calculation does not. In every case, establish the original domain first, state the domain of the method, and treat any excluded points with a separate argument.

Check Your Understanding

For each question, distinguish the original function’s domain from the domain on which the stated logarithmic calculation is valid.

  1. For \(p(x)=(x-4)^{x}\), using the real variable-power definition, what positivity condition determines the domain?
  2. Why is \(\ln((x-1)^2)\) undefined at \(x=1\), even though \((x-1)^2\) is defined there?
  3. On what inputs can the identity \(\frac{d}{dx}\ln|u(x)|=u'(x)/u(x)\) be used?
  4. For \(q(x)=(x+3)^2\), compare the original domain with the domain of the calculation using \(\ln q\). What happens at \(x=-3\)?
  5. Why must the logarithms of individual factors be checked separately before using a product-to-sum logarithm identity?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon