Tutorials › AP Calculus › Products of Exponential and Logarithmic Functions

Trigonometric and Exponential Derivatives · Tutorial 157 of 999

Products of Exponential and Logarithmic Functions

Use the product rule to differentiate exponential–logarithmic products, while identifying exactly where each logarithmic factor is defined.

Intermediate 9 min read

What You'll Learn

  • Check the domain of a logarithmic factor before differentiating.
  • Apply the product rule to products involving \(e^x\) and \(\ln x\).
  • Differentiate \(a^x\) and \(\log_a x\) under their base conditions.
  • Simplify the derivative of \(a^x\log_a x\) without confusing the logarithm bases.
  • Recognize and correct the error of differentiating only one factor.

Why These Products Need Care

When an exponential function and a logarithmic function are multiplied, each factor contributes to the derivative. The product rule keeps those contributions separate, then combines them. The domain matters just as much: a logarithm is defined only for positive inputs, even though an exponential factor is defined for every real input.

For example, \(e^x\ln x\) is defined only when \(x>0\). On that domain, both factors are differentiable, so the product rule applies. The same check is necessary for \(a^x\log_a x\), where the base \(a\) must also satisfy the conditions for a logarithm.

Key idea: To differentiate a product, differentiate each factor in turn while leaving the other factor unchanged. Before doing so, identify where both factors—and their derivatives—are defined.

The Product Rule and the Required Derivatives

If \(u\) and \(v\) are differentiable functions of \(x\), their product is differentiable, and the product rule states

$$ \frac{d}{dx}\bigl(u(x)v(x)\bigr) = u'(x)v(x)+u(x)v'(x). $$

For the products in this tutorial, we also need the derivatives of exponential and logarithmic functions. The natural exponential and natural logarithm satisfy \(\frac{d}{dx}e^x=e^x\) and \(\frac{d}{dx}\ln x=\frac{1}{x}\), with the logarithm formula applying for \(x>0\). For a real base \(a\), the other-base formulas are

$$ \frac{d}{dx}a^x=a^x\ln a \qquad (a>0), \qquad \frac{d}{dx}\log_a x=\frac{1}{x\ln a} \qquad (a>0,\ a\ne 1,\ x>0). $$

The restriction \(a\ne 1\) is needed because \(\log_1 x\) is not a logarithmic function: \(1^y=1\) for every \(y\), so it cannot represent arbitrary positive \(x\). When \(0<a<1\), the formulas remain valid; in that case \(\ln a<0\).

Why the Product Rule Works

The product rule follows from the difference quotient. Suppose \(u\) and \(v\) are differentiable at \(x\). Add and subtract \(u(x+h)v(x)\) in the numerator of the difference quotient for their product, then group the terms:

$$ \begin{aligned} \frac{u(x+h)v(x+h)-u(x)v(x)}{h} &= u(x+h)\frac{v(x+h)-v(x)}{h}\\ &\quad+ v(x)\frac{u(x+h)-u(x)}{h}. \end{aligned} $$

As \(h\to 0\), differentiability of \(v\) makes the first difference quotient approach \(v'(x)\), and differentiability of \(u\) makes the second approach \(u'(x)\). Differentiability also implies continuity, so \(u(x+h)\to u(x)\). Therefore the limit is

$$ u(x)v'(x)+v(x)u'(x), $$

which is the product rule. The two terms arise because the change in the product can be separated into a change in the first factor and a change in the second.

Worked Example: \(e^x\ln x\)

Worked Example: Differentiate \(e^x\ln x\)

Let \(f(x)=e^x\ln x\). First check the domain. The exponential \(e^x\) is defined for every real \(x\), but \(\ln x\) requires \(x>0\). Thus \(f\) and the derivative calculation are considered on \(x>0\).

Set \(u(x)=e^x\) and \(v(x)=\ln x\). Their derivatives are \(u'(x)=e^x\) and \(v'(x)=1/x\). Applying the product rule gives

$$ \begin{aligned} f'(x) &=u'(x)v(x)+u(x)v'(x)\\ &=e^x\ln x+e^x\frac{1}{x}\\ &=e^x\left(\ln x+\frac{1}{x}\right), \qquad x>0. \end{aligned} $$

Check the result at \(x=1\). Since \(\ln 1=0\) and \(e^1=e\), the product-rule terms give

$$ e^1\ln 1+e^1\frac{1}{1} = e(0)+e(1) = e. $$

The simplified derivative gives the same value: \(e^1(0+1)=e\). The domain includes \(x=1\), so this check uses a valid input.

Worked Example: \(3^x\log_3 x\)

Worked Example: Differentiate \(3^x\log_3 x\)

Let \(g(x)=3^x\log_3 x\). The base \(3\) is positive and not equal to \(1\), and the logarithm requires \(x>0\). The product is therefore defined for \(x>0\).

For the first factor, \(\frac{d}{dx}3^x=3^x\ln 3\). For the second, \(\frac{d}{dx}\log_3 x=1/(x\ln 3)\). Substituting these into the product rule gives

$$ \begin{aligned} g'(x) &=(3^x\ln 3)\log_3 x +3^x\frac{1}{x\ln 3}\\ &=3^x\ln 3\cdot\frac{\ln x}{\ln 3} +\frac{3^x}{x\ln 3}\\ &=3^x\left(\ln x+\frac{1}{x\ln 3}\right), \qquad x>0. \end{aligned} $$

To check at \(x=3\), use \(\log_3 3=1\) in the unsimplified product-rule expression:

$$ \begin{aligned} g'(3) &=(3^3\ln 3)(1) +3^3\frac{1}{3\ln 3}\\ &=27\ln 3+\frac{9}{\ln 3}. \end{aligned} $$

The simplified formula gives \(3^3(\ln 3+1/(3\ln 3))=27\ln 3+9/\ln 3\), as required. Notice that the terms involving \(\ln 3\) do not simply cancel from the entire derivative: they cancel in the first term, while the derivative of \(\log_3 x\) still contributes \(1/(x\ln 3)\).

Worked Example: \(2^x\ln x\)

Worked Example: Differentiate \(2^x\ln x\)

Let \(h(x)=2^x\ln x\). The factor \(2^x\) is defined for all real \(x\), while \(\ln x\) requires \(x>0\). Thus \(h\) is defined on \(x>0\).

Here the exponential and logarithmic factors have different bases. Their derivatives are \(\frac{d}{dx}2^x=2^x\ln 2\) and \(\frac{d}{dx}\ln x=1/x\). The product rule gives

$$ \begin{aligned} h'(x) &=(2^x\ln 2)\ln x+2^x\frac{1}{x}\\ &=2^x\left((\ln 2)(\ln x)+\frac{1}{x}\right), \qquad x>0. \end{aligned} $$

Check at \(x=1\). The first product-rule term is \((2\ln 2)(0)=0\), and the second is \(2(1)=2\). The simplified formula also gives \(2(0+1)=2\). This check confirms both the derivative and the role of the \(\ln 2\) factor from differentiating the exponential.

A Useful Formula for Matching Bases

When the product is \(a^x\log_a x\), with \(a>0\), \(a\ne 1\), and \(x>0\), the logarithm and exponential use the same base. The change-of-base identity \(\log_a x=\ln x/\ln a\) simplifies the first product-rule term. The resulting formula is

Theorem: For \(a>0\), \(a\ne 1\), and \(x>0\), $$ \frac{d}{dx}\left(a^x\log_a x\right) = a^x\left(\ln x+\frac{1}{x\ln a}\right). $$

This formula also covers \(a=e\), because \(\log_e x=\ln x\) and \(\ln e=1\). Substituting \(a=e\) gives \(e^x(\ln x+1/x)\), the derivative found in the first example. The domain condition \(x>0\) remains essential regardless of the exponential base.

Common Mistake: Differentiating Only One Factor

A frequent error is to differentiate the exponential factor but leave out the term from differentiating the logarithm. For instance, the incorrect calculation

$$ \frac{d}{dx}(e^x\ln x) \overset{\text{incorrect}}{=} e^x\ln x $$

uses the derivative of \(e^x\) but ignores the derivative of \(\ln x\). The product rule requires two terms: one from differentiating each factor in turn. The corrected calculation is

$$ \frac{d}{dx}(e^x\ln x) = (e^x)\ln x+e^x\left(\frac{1}{x}\right) = e^x\left(\ln x+\frac{1}{x}\right), \qquad x>0. $$

Another domain error is to give this derivative for \(x\le 0\). Neither \(\ln x\) nor \(e^x\ln x\) is defined there as a real-valued function. A derivative formula cannot extend the original function to inputs outside its domain.

A Reliable Procedure

For a product of an exponential and a logarithm, use the following sequence.

1
Check the domain.
Require the logarithm’s argument to be positive. For \(\log_a x\), also require \(a>0\) and \(a\ne 1\).
2
Name the two factors.
Identify which factor is the exponential and which is the logarithm.
3
Differentiate each factor.
Include the factor \(\ln a\) when differentiating \(a^x\), and the factor \(1/\ln a\) when differentiating \(\log_a x\).
4
Apply the product rule and check.
Write both terms, simplify only after they are present, and verify the result at a valid input when possible.

These derivatives are useful because they combine two basic function families while making the product rule visible. On an AP exam, carefully writing both terms and stating the valid domain helps prevent errors that can persist even when the algebra afterward is correct.

Check Your Understanding

For each question, state the relevant domain before or alongside the derivative.

  1. Differentiate \(e^x\ln x\), and evaluate the derivative at \(x=2\).
  2. Differentiate \(5^x\log_5 x\) for its full domain.
  3. Differentiate \(4^x\ln x\). Which factor in the derivative comes from differentiating \(4^x\)?
  4. Explain why \(2^x\log_2 x\) is not defined as a real-valued function at \(x=0\), even though \(2^x\) is defined there.
  5. Identify the missing term in the incorrect claim \(\frac{d}{dx}(3^x\ln x)=3^x(\ln 3)\ln x\), then write the correct derivative.

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: 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
Clinical Biostats