Derivatives · Class 12 · Lesson 09

Derivatives of exponential and log functions: eˣ, aˣ and log x.

Short answer

\(\dfrac{d}{dx}e^x = e^x\), \(\dfrac{d}{dx}a^x = a^x\log a\) and \(\dfrac{d}{dx}\log x = \dfrac{1}{x}\).

With something inside: \(\dfrac{d}{dx}e^{f(x)} = e^{f(x)}f'(x)\) and \(\dfrac{d}{dx}\log f(x) = \dfrac{f'(x)}{f(x)}\). For example, \(\dfrac{d}{dx}\log(x^2 + 1) = \dfrac{2x}{x^2 + 1}\).

Class 12HSC & CBSEDiploma
01

The results

FunctionDerivativeNote
\(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\).

The curve y = e to the x with tangents at x = 0 and x = 1, where slope equals height x y 1 e 1 slope 1 slope e y = eˣ
At \(x = 0\) the curve \(y = e^x\) has height \(1\) and slope \(1\). At \(x = 1\) it has height \(e \approx 2.718\) and slope \(e\). At every point the slope equals the height, which is why \(\dfrac{d}{dx}e^x = e^x\).
02

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.

03

Solved examples

Example 1: Two kinds of exponential

Easy

Differentiate \(y = 5e^x + 3^x\).

  1. \(\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

Easy

Differentiate \(y = e^{x^2}\).

  1. 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

Easy

Differentiate \(y = \log(\sin x)\).

  1. \(\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

Medium

Differentiate \(y = \log_{10}x\).

  1. Change base: \(\log_{10}x = \dfrac{\log x}{\log 10}\). The denominator is just a number.
  2. \(\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

Medium

Differentiate \(y = \log\dfrac{x^2 + 1}{x - 1}\), for \(x > 1\).

  1. Log law: \(y = \log(x^2 + 1) - \log(x - 1)\).
  2. 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

Medium

Differentiate \(y = e^x\sin x\).

  1. 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 level

Show that \(\dfrac{d}{dx}\log\left(x + \sqrt{x^2 + 1}\right) = \dfrac{1}{\sqrt{x^2 + 1}}\).

  1. Derivative of the inside: \(1 + \dfrac{x}{\sqrt{x^2 + 1}} = \dfrac{\sqrt{x^2 + 1} + x}{\sqrt{x^2 + 1}}\).
  2. 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 level

Differentiate \(y = \log\sqrt{\dfrac{1 + \sin x}{1 - \sin x}}\).

  1. Log laws: \(y = \dfrac{1}{2}\big[\log(1 + \sin x) - \log(1 - \sin x)\big]\).
  2. \(\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}\).
  3. \(1 - \sin^2 x = \cos^2 x\), so this is \(\dfrac{\cos x}{\cos^2 x}\).

Answer\(\dfrac{dy}{dx} = \sec x\)

Vipul Sir's tip

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.

04

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.

05

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)\).

Stuck on a question?

Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.

06

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.

Related lessons

← All derivatives lessons
Vipul Sir
Written by Vipul Sir

Vipul Sir has taught mathematics for over 15 years to HSC, CBSE, ICSE, IGCSE/IB, Diploma, Engineering and BSc students at VVS Classes in Goregaon and Vile Parle, Mumbai. He teaches every class himself, concepts first and exam technique second.

Class 11 & 12 Maths

Differentiation gets easy once the basics click.

Concept-first classes in small batches in Goregaon and Vile Parle, or online, for HSC, CBSE and ICSE students. Your first class is free.

WhatsApp↗