Differentiating $a^x$
For bases other than $e$, differentiation introduces a correction factor of $\ln a$. Like tuning an instrument to a different key, changing the base requires adjusting by the natural log of that base. Understanding why reveals the full power of the exponential family.
Practise this lesson
Three printable worksheets that build from foundations to mastery — or build your own from any module’s questions.
You know $\dfrac{d}{dx}(e^x) = e^x$. So what is $\dfrac{d}{dx}(2^x)$? Without using a formula — is it just $2^x$, or something else? Make a guess and explain your reasoning.
Differentiating $a^x$ comes down to one key idea: rewrite $a^x$ using base $e$, then the chain rule produces the correction factor automatically.
Since $a = e^{\ln a}$, we have $a^x = e^{x \ln a}$. The chain rule then gives a factor of $\ln a$. When $a = e$, $\ln e = 1$ and the formula reduces to the familiar $e^x$ case.
Key facts
- $\dfrac{d}{dx}(a^x) = a^x \ln a$
- $\dfrac{d}{dx}(a^{kx}) = ka^{kx} \ln a$
- $a^x = e^{x \ln a}$ (rewriting technique)
Concepts
- Where the $\ln a$ correction factor comes from
- Why $e^x$ is the special case ($\ln e = 1$)
- The link between $a^x$ and $e^{x \ln a}$
Skills
- Differentiate $a^{kx}$ for any base $a$ and constant $k$
- Apply product and quotient rules with $a^x$
- Find stationary points and gradients for general exponentials
The derivation is elegant. Since $a = e^{\ln a}$, we can rewrite any exponential in base $e$:
The chain rule drops $\ln a$ out front (derivative of exponent $x \ln a$ with respect to $x$ is $\ln a$). When $a = e$, $\ln e = 1$ so the correction disappears entirely — confirming that $e^x$ is the natural special case.
Core formula: $\dfrac{d}{dx}(a^x) = a^x \ln a$ — the $\ln a$ factor is mandatory for $a \neq e$; Chain rule extension: $\dfrac{d}{dx}(a^{kx}) = k \ln a \cdot a^{kx}$ — both $k$ and $\ln a$ multiply
Pause — copy the rule $\dfrac{d}{dx}(a^x) = a^x \ln a$ and its chain rule extension $\dfrac{d}{dx}(a^{kx}) = k \ln a \cdot a^{kx}$ — both $k$ and $\ln a$ multiply — into your book.
Did you get this? True or false: $\dfrac{d}{dx}(3^x) = 3^x$ (without any $\ln 3$ factor).
Worked examples · 3 in a row, reveal as you go
Differentiate $y = 2^x$.
Differentiate $y = 3^{2x}$.
Differentiate $y = x \cdot 5^x$.
Quick check: What is $\dfrac{d}{dx}(3^{2x})$?
Common errors · the 3 traps that cost marks
Quick match: Which rule applies to each function?
Quick-fire practice · 5 problems
Differentiate $y = 4^x$.
Differentiate $y = 2^{3x}$.
Differentiate $y = x^2 \cdot 3^x$.
Differentiate $y = \dfrac{5^x}{x}$.
Find the gradient of $y = 10^x$ at $x = 0$.
Think-then-look: What is the derivative of $y = 4^x$? Write your answer before revealing.
Reveal answer
Earlier you guessed the derivative of $2^x$. The answer is $2^x \ln 2$. The $\ln 2$ factor is the ‘correction’ that converts a general base $a$ into the natural base $e$ — because $a^x = e^{x \ln a}$, the chain rule drops a $\ln a$ out front. When $a = e$, $\ln e = 1$ and the correction vanishes, giving back $e^x$. This is not a coincidence — $e$ was chosen precisely because $\ln e = 1$.
Odd one out: Three of these are correct. Which one is wrong?
Pick your answer, then rate your confidence — that tells the system what to drill next. Each retry pulls a fresh mix from the bank.
Q1. Differentiate general exponentials. Find $\dfrac{dy}{dx}$ for $y = 7^x + 7^{-x}$. Show working. (2 marks)
Q2. Chain rule with non-linear exponent. Differentiate $y = 2^{x^2}$. Show full working. (3 marks)
Q3. Product with general exponential. Differentiate $y = (2x + 1) \cdot 3^x$ and find the value of $x$ where the gradient is zero. (4 marks)
Comprehensive answers (click to reveal)
Drill 1: $4^x \ln 4$ · 2: $3\ln 2 \cdot 2^{3x}$ · 3: $3^x(2x \ln 3 + 2x/x + \ln 3 \cdot x^2)$… simplified: $3^x(2x + x^2 \ln 3)$ · 4: $\dfrac{5^x(x \ln 5 - 1)}{x^2}$ · 5: $10^0 \ln 10 = \ln 10 \approx 2.303$
Q1 (2 marks): $\dfrac{dy}{dx} = 7^x \ln 7 + 7^{-x} \cdot (-1) \cdot \ln 7 = \ln 7(7^x - 7^{-x})$ [2].
Q2 (3 marks): Rewrite as $2^{x^2}$, exponent $u = x^2$, $u' = 2x$ [0.5]. $\dfrac{dy}{dx} = 2^{x^2} \cdot \ln 2 \cdot 2x$ [1.5]. $= 2x \ln 2 \cdot 2^{x^2}$ [1].
Q3 (4 marks): Product rule: $\dfrac{dy}{dx} = 2 \cdot 3^x + (2x+1) \cdot 3^x \ln 3$ [1.5]. $= 3^x(2 + (2x+1)\ln 3)$ [1]. Set $= 0$: $3^x \neq 0$, so $2 + (2x+1)\ln 3 = 0$ [0.5]. $2x + 1 = -\dfrac{2}{\ln 3}$, $x = \dfrac{-1 - \frac{2}{\ln 3}}{2} \approx -1.41$ [1].
Five timed questions. Beat the boss to bank a tier — gold (90% + speed), silver (75%), or bronze (50%). Replays welcome.
Enter the arenaClimb platforms by answering Module 4 questions. Lighter alternative to the boss.
Mark lesson as complete
Tick when you've finished the practice and review.