Mathematics/Lessons/Differentiation/Differentiating Exponentials and Logarithms
Pure · Differentiation · Year 2

Differentiating Exponentials and Logarithms

e^x differentiates to itself, ln x to 1/x — two results that unlock growth, decay, and everything built from them.

8 min read 3 worked examples

The two standard results

Two derivatives sit at the heart of exponential and logarithmic calculus:

$\dfrac{d}{dx}(e^x)=e^x \qquad\qquad \dfrac{d}{dx}(\ln x)=\dfrac{1}{x}$

The function $e^x$ is remarkable precisely because it is its own derivative — no other function (up to a constant multiple) has this property. That's the reason $e$ is defined the way it is, and why it appears throughout calculus.

Domain of ln x

$\ln x$ is only defined for $x>0$, so $\dfrac{d}{dx}(\ln x)=\dfrac{1}{x}$ is likewise only valid for $x>0$.

Differentiating a^x for other bases

For a positive constant $a\ne1$, differentiating $a^x$ needs a small rewrite. Since $a=e^{\ln a}$, we can write $a^x=e^{x\ln a}$, and the same "linear inner function" pattern seen with $\sin(kx)$ gives:

$\dfrac{d}{dx}(a^x)=a^x\ln a$
Where the ln a comes from

Writing $a^x=e^{x\ln a}$ turns the problem into differentiating $e^{kx}$ with $k=\ln a$, giving $\dfrac{d}{dx}\big(e^{x\ln a}\big)=(\ln a)\,e^{x\ln a}=a^x\ln a$. This is the same chain-rule pattern previewed in the last lesson — the "inner function" $x\ln a$ has derivative $\ln a$, which appears as the extra factor. When $a=e$, $\ln a=\ln e=1$, and the extra factor disappears — exactly recovering $\dfrac{d}{dx}(e^x)=e^x$.

Extending to e^(kx)

The same idea applies directly to $e^{kx}$ for constant $k$:

$\dfrac{d}{dx}(e^{kx})=ke^{kx}$

As with $\sin(kx)$ and $\cos(kx)$ in the previous lesson, this is a special case of the chain rule, covered in full shortly.

Worked example 1

Standard derivatives with the sum rule
Differentiate $y=3e^x-4\ln x+2x^5$.
MethodDifferentiate term by term
1
$\dfrac{d}{dx}(3e^x)=3e^x$.
$e^x$ is its own derivative, scaled by 3.
2
$\dfrac{d}{dx}(-4\ln x)=-\dfrac{4}{x}$.
Standard result, scaled by $-4$.
3
$\dfrac{d}{dx}(2x^5)=10x^4$.
Ordinary power rule.
4
$\dfrac{dy}{dx}=3e^x-\dfrac{4}{x}+10x^4$.
Add the three terms.
▪ solved

Worked example 2

e^(kx) and other bases
Differentiate (a) $y=e^{3x}$, (b) $y=5^x$.
MethodApply the e^(kx) pattern and the a^x result
1
(a) Here $k=3$, so $\dfrac{dy}{dx}=3e^{3x}$.
$\dfrac{d}{dx}(e^{kx})=ke^{kx}$.
2
(b) Here $a=5$, so $\dfrac{dy}{dx}=5^x\ln5$.
$\dfrac{d}{dx}(a^x)=a^x\ln a$.
▪ solved

Worked example 3

Finding a tangent · Challenge
Find the equation of the tangent to the curve $y=2e^x+\ln x$ at the point where $x=1$.
MethodFind the gradient and a point, then build the line
1
At $x=1$: $y=2e^1+\ln1=2e+0=2e$.
Substitute $x=1$ into the curve's equation; $\ln1=0$.
2
$\dfrac{dy}{dx}=2e^x+\dfrac{1}{x}$.
Differentiate term by term.
3
At $x=1$: gradient $=2e^1+\dfrac{1}{1}=2e+1$.
Substitute $x=1$ into the derivative.
4
$y-2e=(2e+1)(x-1)$, so $y=(2e+1)x-1$.
Point–gradient form, then expand and simplify: $(2e+1)x-(2e+1)+2e=(2e+1)x-1$.
▪ solved
Look deeper

The constant term simplified to exactly $-1$, with every multiple of $e$ cancelling — a reminder that tidying an answer fully can reveal a surprisingly clean result that isn't obvious at the point–gradient stage.

Common mistake

Writing $\dfrac{d}{dx}(e^{kx})=e^{kx}$ without the factor of $k$, and confusing the two results $\dfrac{d}{dx}(a^x)=a^x\ln a$ with $\dfrac{d}{dx}(x^a)=ax^{a-1}$ — the first has a constant base and variable exponent, the second the other way round, and they differentiate completely differently.

Check yourself

Differentiate $y=5e^{2x}-3\ln x+4^x$.

Method
1
$\dfrac{d}{dx}(5e^{2x})=5(2e^{2x})=10e^{2x}$.
$k=2$ for the $e^{kx}$ pattern.
2
$\dfrac{d}{dx}(-3\ln x)=-\dfrac{3}{x}$.
Standard result, scaled by $-3$.
3
$\dfrac{d}{dx}(4^x)=4^x\ln4$.
$\dfrac{d}{dx}(a^x)=a^x\ln a$ with $a=4$.
4
$\dfrac{dy}{dx}=10e^{2x}-\dfrac{3}{x}+4^x\ln4$.
Add the three terms.
▪ solved