Why Simplify Before Differentiating?
A function can look complicated because it is written as several operations nested inside one another. Sometimes those operations undo each other. Recognizing that structure can turn a long-looking differentiation problem into a direct application of a familiar derivative rule.
The natural exponential \(e^x\) and the natural logarithm \(\ln x\) are inverse functions, but their inverse identities have different domain conditions. Those conditions matter: simplifying an expression must not silently add inputs where the original expression was undefined.
The Two Inverse Identities
The natural exponential maps every real number to a positive real number. The natural logarithm is defined only for positive real inputs. These facts give the inverse identities:
The first identity has no additional restriction on the real-valued input \(u\): \(e^u\) is positive for every real \(u\), so its logarithm exists. In the second identity, the input to \(\ln\) must be positive. Thus \(e^{\ln u}\) is defined only when \(u>0\).
When these expressions occur inside a larger function, apply the same conditions to the inner expression. For instance, if \(v(x)\) is defined and positive on some interval, then \(e^{\ln(v(x))}=v(x)\) throughout that interval. If \(v(x)\) is zero or negative, the original expression does not exist there, even if the simplified formula \(v(x)\) does.
How the Cancellation Affects Derivatives
Suppose \(u\) is differentiable near \(x\). Since \(\ln(e^{u(x)})=u(x)\), the two functions agree wherever \(u\) is defined, so their derivatives agree there as well. The Chain Rule gives a direct check:
For the other composition, suppose \(v\) is differentiable and \(v(x)>0\). On the region where it is positive, \(e^{\ln(v(x))}=v(x)\). Direct application of the Chain Rule confirms this:
The cancellation in the last calculation uses \(v(x)>0\), which in particular ensures \(v(x)\ne 0\). In practice, simplifying first is usually shorter. The Chain Rule calculations explain why the simplification gives the correct derivative and make clear where the domain condition enters.
Worked Examples
Worked Example: A Logarithm of a Natural Exponential
Differentiate \(f(x)=\ln(e^{3x^2-5x})\). Determine the domain first. The exponent \(3x^2-5x\) is real for every real \(x\), and its exponential is positive. Therefore, \(f\) is defined for every real \(x\).
Use the identity \(\ln(e^u)=u\), with \(u=3x^2-5x\):
Differentiate the simplified polynomial term by term:
Check by differentiating the original composition. The derivative of \(\ln(w)\) is \(w'/w\) for \(w>0\), and the derivative of \(e^{u(x)}\) is \(e^{u(x)}u'(x)\). Here \(u'(x)=6x-5\), so
This agrees with the derivative found by simplifying first.
Worked Example: A Logarithm Applied to an Exponential of a Quotient
Differentiate \(g(x)=\ln(e^{1/x})\). The inner function \(1/x\) is defined for \(x\ne 0\). For every such \(x\), \(e^{1/x}>0\), so the logarithm is also defined. The domain of the original function is therefore all real \(x\) except \(0\).
Cancel the logarithm and exponential on that domain:
Differentiate using the power rule:
To check, set \(u(x)=1/x\), so \(u'(x)=-1/x^2\). The Chain Rule applied to the original expression gives
The cancellation does not make \(g\) defined at \(x=0\): \(1/x\), and hence the original exponent, is undefined there.
Worked Example: An Exponential of a Natural Logarithm
Let \(h(x)=e^{\ln(x^2-4)}\). Before simplifying, require the logarithm's input to be positive:
On this domain, \(e^{\ln u}=u\) applies with \(u=x^2-4\). Thus
Differentiate on each interval in the domain:
Check directly using the Chain Rule. The derivative of \(\ln(x^2-4)\) is \(2x/(x^2-4)\), and the exponential of \(\ln(x^2-4)\) is \(x^2-4\) on the stated domain. Therefore,
The cancellation in the final expression is valid because \(x^2-4>0\), so the denominator is not zero. The derivative formula is not a claim that the original function exists at \(x=-2\) or \(x=2\).
Worked Example: A Positive Trigonometric Input
Consider \(q(x)=e^{\ln(\sin x)}\). The original expression requires \(\sin x>0\), so its domain is the union of intervals
On every one of these intervals, apply \(e^{\ln u}=u\) with \(u=\sin x\):
Consequently,
at every point in the original domain. To check this directly, use \((\ln(\sin x))'=\cos x/\sin x\), which applies where \(\sin x>0\):
At points where \(\sin x=0\), the simplified expression \(\sin x\) exists, but the original logarithm does not. Those points are not part of the domain of \(q\).
A Reliable Method
For an expression involving a natural logarithm and natural exponential, use the following order. This keeps the algebra, differentiation, and domain reasoning consistent.
Look for \(\ln(e^{u(x)})\) or \(e^{\ln(v(x))}\). The functions cancel only when they occur as a direct inverse pair in that order.
For \(\ln(e^{u(x)})\), require that \(u(x)\) be defined and real. For \(e^{\ln(v(x))}\), require that \(v(x)\) be defined and positive.
Replace the composition by its inner expression, but keep the restrictions from the original function.
Differentiate the simpler expression on its domain. If useful, apply the Chain Rule to the original form to verify the result.
A Common Domain Mistake
A frequent error is to simplify \(e^{\ln(x^2)}\) to \(x^2\), then conclude that the original expression is defined for every real \(x\). That conclusion is false. The logarithm requires \(x^2>0\), which means \(x\ne 0\).
For \(x\ne 0\), the simplification is valid and the derivative is \(2x\). But at \(x=0\), the original expression contains \(\ln(0)\), which is undefined. The simplified expression \(x^2\) has a value there, but it is an extension of the original function, not the original function itself. Its derivative at \(0\) does not establish a derivative for the original expression at \(0\).
A related calculation error is to differentiate \(\ln(e^{u(x)})\) as though it were just \(e^{u(x)}u'(x)\). That omits the derivative of the outer logarithm. Applying the Chain Rule correctly gives
The inverse identity makes the same result immediate, but the direct calculation is a useful check on which derivative rule applies.
Why This Simplification Is Useful
These identities do more than shorten a calculation. They distinguish the structure of a function from the way it is written. A nested expression may appear to require several applications of the Chain Rule, even though its value is simply a familiar inner function. Recognizing the inverse pair helps avoid unnecessary algebra and makes the derivative easier to interpret.
The domain information is equally important. A simplified formula can have a larger domain than the original composition. Keeping the original restrictions ensures that a derivative statement applies exactly where the function exists. This habit is useful whenever an algebraic simplification changes the apparent domain, not only for exponential-logarithmic compositions.
Check Your Understanding
For each question, identify the original domain before differentiating. Then compare the result with the relevant inverse identity.
- Differentiate \(\ln(e^{x^3+2x})\). What is its domain?
- Find the domain and derivative of \(e^{\ln(5-2x)}\).
- Why is \(e^{\ln(x^2-9)}=x^2-9\) not defined at \(x=3\) as an original composition?
- Differentiate \(\ln(e^{\sqrt{x}})\), stating its domain.
- For a differentiable function \(v\), what condition allows the identity \(e^{\ln(v(x))}=v(x)\), and why is that condition also needed for the direct Chain Rule calculation?