Introduction
A power such as \(x^x\) changes in two ways: its base changes with \(x\), and its exponent changes with \(x\). Shifting the base does not remove either effect. For example, in \((x+2)^{3x-1}\), the base is \(x+2\), while the exponent is \(3x-1\); both vary as \(x\) varies.
Taking the natural logarithm turns the variable power into a product. Differentiating that product makes the two contributions visible and leads to a formula that works throughout the domain where the base is positive.
Domain and General Formula
Let \(m\), \(b\), and \(c\) be real constants, and consider \(y=(x+c)^{mx+b}\). A real variable power with a variable exponent is defined using the natural logarithm when its base is positive: \(a^r=\exp(r\ln a)\) for \(a>0\). Thus, for this function, the logarithmic method applies on the interval where \(x+c>0\), or \(x>-c\). On this interval \(y\) is positive, so \(\ln y\) is defined.
The expression in square brackets has two parts. The term \(m\ln(x+c)\) comes from differentiating the exponent \(mx+b\); the term \((mx+b)/(x+c)\) comes from differentiating the logarithm of the base. Both are needed.
Why the Formula Works
Set \(y=(x+c)^{mx+b}\) on the interval \(x>-c\). Because \(y>0\), we may take the natural logarithm of each side. Using the logarithm rule for a positive base gives
Differentiate both sides with respect to \(x\). On the left, the chain rule gives \(y'/y\). On the right, the product rule applies: the derivative of \(mx+b\) is \(m\), and the derivative of \(\ln(x+c)\) is \(1/(x+c)\), by the chain rule. Therefore,
Multiplying by \(y\), and then substituting \(y=(x+c)^{mx+b}\), proves the formula:
This derivation also explains the structure of the answer: the derivative is the original function multiplied by its logarithmic derivative, \(y'/y\). The two terms in that logarithmic derivative account separately for the exponent and the base.
Worked Examples
Worked Example: Differentiate a Shifted Power
Differentiate \(f(x)=(x+2)^{3x-1}\), and find \(f'(0)\). The base is positive when \(x+2>0\), so the function is defined for \(x>-2\).
Here \(m=3\), \(b=-1\), and \(c=2\). Apply the formula:
At \(x=0\), the function value is
The bracket at \(x=0\) is
Consequently,
Check by evaluating the general derivative at \(x=0\): the original-function factor is \(2^{-1}=1/2\), and the bracket is \(3\ln 2-1/2\), giving exactly \(\frac{3}{2}\ln 2-\frac14\).
Worked Example: A Negative Shift in the Base
Differentiate \(g(x)=(x-1)^{2x+3}\), and find \(g'(3)\). The base condition is \(x-1>0\), so the real-valued function has domain \(x>1\).
In the formula, \(m=2\), \(b=3\), and \(c=-1\). Thus
At \(x=3\), the base and exponent are
The bracket becomes
Therefore,
Substituting \(x=3\) directly into the derivative formula gives the same base factor \(512\) and the same bracket \(2\ln 2+9/2\), confirming the evaluation.
Worked Example: A Decreasing Exponent
Differentiate \(h(x)=(x+4)^{2-x}\), and find \(h'(0)\). The base is positive when \(x>-4\), which is the domain for this real variable power.
Rewrite the exponent as \(-x+2\), so \(m=-1\) and \(b=2\). The formula gives
At \(x=0\),
It follows that
As a check, substituting \(x=0\) into the displayed expression for \(h'(x)\) again gives \(4^2[-\ln 4+2/4]=16[-\ln 4+1/2]=8-16\ln 4\). The negative sign on the logarithm term reflects the decreasing exponent.
Reading the Two Contributions
The formula can be understood by separating the roles of the base and exponent. If \(u(x)=mx+b\) and \(v(x)=x+c\), then the logarithmic equation is \(\ln y=u(x)\ln(v(x))\). Its derivative is
because \(u'(x)=m\) and \(v'(x)=1\). The shift \(c\) does not change the derivative of the base: \(\frac{d}{dx}(x+c)=1\). It does, however, remain inside \(\ln(x+c)\) and in the denominator \(x+c\). This distinction is useful when checking a calculation.
There are also simple special cases. If \(m=0\), the exponent is constant \(b\), and the formula reduces to the usual power rule for a constant power of a positive linear function. If the base equals \(1\) at a point, the logarithm term is zero at that point, since \(\ln 1=0\); the other term still accounts for the exponent at that point.
Common Pitfall: Treating the Exponent as Constant
A tempting but incorrect move is to apply the ordinary power rule while treating the exponent as fixed. For \(f(x)=(x+2)^{3x-1}\), that mistake might produce
This calculation omits the fact that \(3x-1\) changes with \(x\). It also does not correctly account for that changing exponent through the logarithm. For example, at \(x=0\), the wrong expression gives \(-2^{-2}=-1/4\), whereas the correct derivative is \(\frac{3}{2}\ln 2-\frac14\). These are not equal.
The correction is to take logarithms before differentiating. In this example, \(\ln f=(3x-1)\ln(x+2)\), so the product rule yields both terms:
Leaving out the first term loses the effect of the changing exponent. Leaving out the second loses the effect of the changing base. A reliable check is to make sure both contributions appear unless one vanishes for a specific reason.
A Reliable Procedure
For a function \(y=(x+c)^{mx+b}\), use the following sequence:
Require \(x+c>0\) so the real logarithm of the base is defined.
Write \(\ln y=(mx+b)\ln(x+c)\).
Use the product rule on the right and the chain rule on \(\ln y\), giving \(y'/y=m\ln(x+c)+(mx+b)/(x+c)\).
Replace \(y\) with \((x+c)^{mx+b}\) to obtain the derivative.
Substitute the specified \(x\)-value into the original-function factor and each term in the bracket.
This method matters because variable powers do not follow the ordinary constant-exponent power rule by themselves. Taking logarithms transforms the varying exponent into a product, while the domain condition ensures every logarithm used in the derivation is valid. The resulting formula is concise, but its two terms record two distinct changes in the function.
Check Your Understanding
Use the domain condition and derivative formula to answer the questions. Keep the base contribution and exponent contribution separate in your work.
- For \(p(x)=(x+5)^{4x+1}\), state the interval on which the logarithmic differentiation formula applies.
- Differentiate \(q(x)=(x+3)^{x-2}\).
- For \(r(x)=(x+1)^{2x}\), calculate \(r'(1)\) exactly.
- In the derivative formula, which term comes from differentiating the exponent, and which comes from differentiating the logarithm of the base?
- Explain why the ordinary power rule cannot be applied to \((x+2)^{3x-1}\) as if \(3x-1\) were constant.