The results
| Function | Derivative | Note |
|---|---|---|
| \(e^x\) | \(e^x\) | its own derivative |
| \(a^x\) | \(a^x\log a\) | \(a > 0\), \(a \ne 1\) |
| \(e^{f(x)}\) | \(e^{f(x)}f'(x)\) | chain rule |
| \(\log x\) | \(\dfrac{1}{x}\) | natural log, \(x > 0\) |
| \(\log|x|\) | \(\dfrac{1}{x}\) | \(x \ne 0\) |
| \(\log_a x\) | \(\dfrac{1}{x\log a}\) | change of base |
| \(\log f(x)\) | \(\dfrac{f'(x)}{f(x)}\) | chain rule |
Here \(\log\) means the natural logarithm, to base \(e \approx 2.718\). Some books write it as \(\ln\).
Why these results hold
\(e^x\) is its own derivative
From first principles, \(\dfrac{e^{x + h} - e^x}{h} = e^x\cdot\dfrac{e^h - 1}{h}\), and the fraction tends to 1. That is really what makes \(e\) special: it is the one base for which the slope of \(y = a^x\) at \(x = 0\) is exactly 1.
\(a^x\)
Write \(a^x = e^{x\log a}\). By the chain rule, \(\dfrac{d}{dx}e^{x\log a} = e^{x\log a}\cdot\log a = a^x\log a\).
\(\log x\)
If \(y = \log x\), then \(x = e^y\). Differentiating with respect to \(y\) gives \(\dfrac{dx}{dy} = e^y = x\), so \(\dfrac{dy}{dx} = \dfrac{1}{x}\).
Use the log laws first
Before differentiating a log, break it up: \(\log(ab) = \log a + \log b\), \(\log\dfrac{a}{b} = \log a - \log b\) and \(\log a^n = n\log a\). A messy quotient inside a log becomes a simple difference of logs.
Solved examples
Example 1: Two kinds of exponential
EasyDifferentiate \(y = 5e^x + 3^x\).
- \(\dfrac{d}{dx}5e^x = 5e^x\) and \(\dfrac{d}{dx}3^x = 3^x\log 3\).
Answer\(\dfrac{dy}{dx} = 5e^x + 3^x\log 3\)
Example 2: Exponential of a square
EasyDifferentiate \(y = e^{x^2}\).
- Chain rule: \(e^{x^2}\cdot\dfrac{d}{dx}(x^2)\).
Answer\(\dfrac{dy}{dx} = 2x\,e^{x^2}\)
Example 3: Log of a trig function
EasyDifferentiate \(y = \log(\sin x)\).
- \(\dfrac{f'(x)}{f(x)}\) with \(f(x) = \sin x\): \(\dfrac{\cos x}{\sin x}\).
Answer\(\dfrac{dy}{dx} = \cot x\)
Example 4: Log to base 10
MediumDifferentiate \(y = \log_{10}x\).
- Change base: \(\log_{10}x = \dfrac{\log x}{\log 10}\). The denominator is just a number.
- \(\dfrac{dy}{dx} = \dfrac{1}{\log 10}\cdot\dfrac{1}{x}\).
Answer\(\dfrac{dy}{dx} = \dfrac{1}{x\log 10}\)
Example 5: Split the log first
MediumDifferentiate \(y = \log\dfrac{x^2 + 1}{x - 1}\), for \(x > 1\).
- Log law: \(y = \log(x^2 + 1) - \log(x - 1)\).
- Differentiate each part: \(\dfrac{2x}{x^2 + 1} - \dfrac{1}{x - 1}\).
Answer\(\dfrac{dy}{dx} = \dfrac{2x}{x^2 + 1} - \dfrac{1}{x - 1}\)
Example 6: Exponential times trig
MediumDifferentiate \(y = e^x\sin x\).
- Product rule: \(e^x\sin x + e^x\cos x\).
Answer\(\dfrac{dy}{dx} = e^x(\sin x + \cos x)\)
Example 7: A result worth remembering
Exam levelShow that \(\dfrac{d}{dx}\log\left(x + \sqrt{x^2 + 1}\right) = \dfrac{1}{\sqrt{x^2 + 1}}\).
- Derivative of the inside: \(1 + \dfrac{x}{\sqrt{x^2 + 1}} = \dfrac{\sqrt{x^2 + 1} + x}{\sqrt{x^2 + 1}}\).
- Divide by the inside, \(x + \sqrt{x^2 + 1}\). The factor \(\sqrt{x^2 + 1} + x\) cancels.
Answer\(\dfrac{dy}{dx} = \dfrac{1}{\sqrt{x^2 + 1}}\)
Example 8: Logs make it easy
Exam levelDifferentiate \(y = \log\sqrt{\dfrac{1 + \sin x}{1 - \sin x}}\).
- Log laws: \(y = \dfrac{1}{2}\big[\log(1 + \sin x) - \log(1 - \sin x)\big]\).
- \(\dfrac{dy}{dx} = \dfrac{1}{2}\left[\dfrac{\cos x}{1 + \sin x} + \dfrac{\cos x}{1 - \sin x}\right] = \dfrac{1}{2}\cdot\dfrac{2\cos x}{1 - \sin^2 x}\).
- \(1 - \sin^2 x = \cos^2 x\), so this is \(\dfrac{\cos x}{\cos^2 x}\).
Answer\(\dfrac{dy}{dx} = \sec x\)
Whenever you see a log of a product, a quotient or a power, use the log laws before you differentiate. Example 8 takes three lines that way. Attack it directly with the chain and quotient rules and it takes a page, with plenty of room for a slip.
Common mistakes
1. Treating \(a^x\) like \(x^n\)
\(\dfrac{d}{dx}3^x \ne x\,3^{x-1}\). The power rule needs the variable in the base. When the variable is in the power, the answer is \(3^x\log 3\).
2. Splitting a log of a sum
\(\log(x + 1) \ne \log x + \log 1\). The log laws work for products and quotients, not sums. \(\log(x + 1)\) just differentiates to \(\dfrac{1}{x + 1}\).
3. Missing the factor in \(e^{kx}\)
\(\dfrac{d}{dx}e^{4x} = 4e^{4x}\). Without the 4 the answer is wrong, even though \(e^x\) is its own derivative.
Practice questions
Try each one on paper before you open the answer.
Q1Differentiate \(y = e^{3x + 1}\).
\(3e^{3x + 1}\).
Q2Differentiate \(y = x^2e^x\).
\(2x\,e^x + x^2e^x = e^x(x^2 + 2x)\).
Q3Differentiate \(y = \log(\log x)\), for \(x > 1\).
\(\dfrac{1}{\log x}\cdot\dfrac{1}{x} = \dfrac{1}{x\log x}\).
Q4Differentiate \(y = 2^{\sin x}\).
\(2^{\sin x}\log 2\cdot\cos x\).
Q5Differentiate \(y = \log\dfrac{1 + x}{1 - x}\), for \(|x| < 1\).
\(\dfrac{1}{1 + x} + \dfrac{1}{1 - x} = \dfrac{2}{1 - x^2}\).
Q6Differentiate \(y = e^{-x}\log x\).
\(-e^{-x}\log x + \dfrac{e^{-x}}{x} = e^{-x}\left(\dfrac{1}{x} - \log x\right)\).
Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.
Frequently asked questions
Why is e to the x its own derivative?
Because of how \(e\) is chosen. The slope of \(y = a^x\) at \(x = 0\) depends on \(a\), and \(e\) is the base that makes that slope exactly 1. From there, the slope at every point equals the height of the curve.
Is log x the same as ln x?
In calculus, yes. Both mean the natural log, \(\log_e x\). Indian textbooks usually write \(\log x\); many international books write \(\ln x\).
What is the derivative of a to the power x?
\(\dfrac{d}{dx}a^x = a^x\log a\). For example, \(\dfrac{d}{dx}2^x = 2^x\log 2\).
How do I differentiate x to the power x?
Neither the power rule nor the \(a^x\) rule works, because \(x\) is in both places. Take logs first: \(\log y = x\log x\). Then \(\dfrac{1}{y}\dfrac{dy}{dx} = \log x + 1\), so \(\dfrac{dy}{dx} = x^x(1 + \log x)\). This is called logarithmic differentiation.