Introduction
A variable power such as \(x^x\) depends on \(x\) in both its base and its exponent. Its derivative is found using logarithmic differentiation. When a variable power is multiplied by another function, the product rule is needed as well: first differentiate the powered factor, then combine it with the derivative of the other factor.
This tutorial focuses on that combination. The factors need not both be variable powers. They might be an exponential such as \(e^{x^2}\), a logarithm such as \(\ln x\), or another variable-power expression. The main task is to keep the differentiation of each factor separate until applying the product rule.
The Variable-Power Derivative
Let \(u\) and \(v\) be differentiable functions on an interval, with \(u(x)>0\) throughout that interval. The positive-base condition allows us to take the natural logarithm of \(u(x)^{v(x)}\). Logarithmic differentiation gives the formula below.
The two terms in parentheses have distinct sources. The term \(v'(x)\ln u(x)\) accounts for the changing exponent. The term \(v(x)u'(x)/u(x)\) accounts for the changing base. If one of those parts is constant, its derivative contribution is zero.
For instance, \(x^x\) has both base and exponent \(x\), so for \(x>0\),
For a product \(F(x)G(x)\), the product rule requires both derivatives, whether or not the factors are positive. In particular, logarithmic differentiation can be used on a positive powered factor without taking the logarithm of the entire product. This matters when the other factor can be zero or negative.
A Product Rule Formula for a Powered Factor
Suppose \(F(x)=u(x)^{v(x)}\), where \(u(x)>0\), and let \(G\) be any differentiable function. Combining the variable-power formula with the product rule gives the following result.
This formula is obtained directly by writing \((FG)'=F'G+FG'\), substituting the derivative of \(F=u^v\), and factoring out \(u^v\). The factor \(G\) remains inside the first term; omitting it is a common error.
Worked Examples
Worked Example: Differentiate \(x^x e^{x^2}\)
For \(x>0\), both factors are differentiable. Set \(F(x)=x^x\) and \(G(x)=e^{x^2}\). The variable-power formula gives
For the exponential factor, the chain rule gives
Apply the product rule and substitute both derivatives:
Check at \(x=1\). The original factors have values \(1^1=1\) and \(e^1=e\). Their derivatives have values \(F'(1)=1(0+1)=1\) and \(G'(1)=2e\). The product rule therefore gives \(1\cdot e+1\cdot 2e=3e\). The factored formula gives \(1\cdot e\cdot(0+1+2)=3e\), as required.
Worked Example: Differentiate \((x+1)^x\ln x\)
The domain requires \(x>0\) because of \(\ln x\); on this domain the base \(x+1\) is positive as well. Let \(F(x)=(x+1)^x\) and \(G(x)=\ln x\). For \(F\), the base is \(u(x)=x+1\) and the exponent is \(v(x)=x\). Thus \(u'(x)=1\) and \(v'(x)=1\), so
The logarithm factor has derivative \(G'(x)=1/x\). Using the product rule gives
Check at \(x=1\). Here \(F(1)=2\), \(G(1)=0\), \(F'(1)=2(\ln 2+1/2)\), and \(G'(1)=1\). The product rule gives \(F'(1)G(1)+F(1)G'(1)=0+2=2\). The factored derivative also gives \(2[(\ln 2+1/2)\cdot0+1]=2\).
Worked Example: Differentiate \(x^x(x+1)^{2x}\)
For \(x>0\), both bases are positive. Set \(F(x)=x^x\) and \(G(x)=(x+1)^{2x}\). The first factor has derivative
For the second factor, use base \(u(x)=x+1\) and exponent \(v(x)=2x\). Since \(u'(x)=1\) and \(v'(x)=2\),
Now apply the product rule. Substituting the factor derivatives and collecting the common factor \(x^x(x+1)^{2x}\) gives
Check at \(x=1\). The factors are \(F(1)=1\) and \(G(1)=4\). Also \(F'(1)=1\), while \(G'(1)=4(2\ln2+1)\). The product rule gives \(1\cdot4+1\cdot4(2\ln2+1)=8+8\ln2\). The factored expression gives \(1\cdot4[0+1+2\ln2+1]=8+8\ln2\), confirming the result.
Why the Product Formula Works
The method does not require taking the logarithm of the whole product. Instead, logarithmic differentiation is applied only where it is valid: to a positive variable-power factor. Then the ordinary product rule combines that factor with the other function. The algebraic justification is short and complete.
Write \(F(x)=u(x)^{v(x)}\) and \(G(x)=G(x)\), with \(u(x)>0\).
The variable-power formula gives \(F'=F(v'\ln u+vu'/u)\).
Since \(H=FG\), \(H'=F'G+FG'\).
Replacing \(F'\) yields \(H'=F[(v'\ln u+vu'/u)G+G']\), the stated product formula.
The assumption \(u(x)>0\) is needed for \(\ln u(x)\) in the variable-power formula. The other factor \(G\) only needs to be differentiable; it does not have to be positive. The interval under consideration must satisfy these conditions wherever the derivative is being computed.
A Common Product-Rule Error
A frequent mistake is to differentiate both factors but forget to multiply the derivative of the powered factor by the unchanged second factor. For example, an incorrect attempt at differentiating \(x^x e^{x^2}\) might be
This expression adds the two factor derivatives, but differentiation of a product does not mean adding the derivatives alone. Each derivative must be multiplied by the other original factor. The correction is
A useful check is to write the product rule in full before substituting: first factor derivative times second factor, plus first factor times second factor derivative. This makes it harder to lose a factor while simplifying.
A Reliable Working Method
For a product containing variable powers, use the following sequence.
- Identify an interval where each variable-power base is positive and all factors are differentiable.
- Differentiate each variable-power factor separately using \(u^v\bigl(v'\ln u+vu'/u\bigr)\).
- Differentiate every remaining factor using its appropriate derivative rule.
- Apply the product rule to the factors, preserving the other original factor in each term.
- Factor common terms only after the product-rule substitution is correct.
- Check the result at a convenient point in the domain when possible.
These steps are particularly useful when there are several different kinds of factors. Keeping the derivative of each factor separate first makes the source of every term visible. Factoring at the end can produce a compact expression, but it should not hide how the product rule was applied.
Why This Combination Matters
Variable powers often appear alongside exponential, logarithmic, polynomial, or other variable-power factors. A single expression can therefore require more than one differentiation technique. The reusable strategy is not a new rule for every product: it is the variable-power derivative for the powered factor and the product rule for the complete expression.
Paying attention to domains is part of the method, not an afterthought. For example, \(x^x\) requires \(x>0\) for the real-valued logarithmic differentiation used here, and \(\ln x\) also requires \(x>0\). In \((x+1)^x\ln x\), the logarithm sets the domain \(x>0\), which also ensures \(x+1>0\). Stating the interval makes clear where the derivative formula applies.
Check Your Understanding
For each problem, identify the domain where the displayed real-valued expression and the method are valid. Then differentiate, applying the product rule explicitly.
- Differentiate \(x^x e^x\) for \(x>0\).
- Differentiate \((x+2)^x\ln x\) on its domain.
- Differentiate \(x^x(x+1)^x\) for \(x>0\), and write the result with the original product factored out.
- In the product rule for \(F(x)G(x)\), what factor must multiply \(F'(x)\)?
- Why can logarithmic differentiation be applied to a positive powered factor even when the other factor in the product is not positive?