Skip to content

Ch 5 · Continuity and Differentiability

Solved Examples

Exercise 1 of 10

NCERT Solutions – Solved Examples

Class 12 Mathematics · Chapter 5 · Continuity and Differentiability · 43 solved examples · Session 2026-27

Example 1
Check the continuity of $f(x)=2x+3$ at $x=1$.
Solution
  1. $f(1) = 2(1)+3 = 5$.
  2. $\displaystyle\lim_{x\to1}(2x+3) = 5$.
  3. Limit $=$ value.

$f$ is continuous at $x=1$.

Example 2
Examine whether $f(x)=x^{2}$ is continuous at $x=0$.
Solution
  1. $f(0) = 0$.
  2. $\displaystyle\lim_{x\to0}x^{2} = 0$.

$f$ is continuous at $x=0$.

Example 3
Discuss the continuity of $f(x)=|x|$ at $x=0$.
Solution

Write $|x| = -x$ for $x<0$ and $|x| = x$ for $x\ge0$.

  1. LHL $= \displaystyle\lim_{x\to0^-}(-x) = 0$.
  2. RHL $= \displaystyle\lim_{x\to0^+}(x) = 0$.
  3. $f(0) = 0$. All three agree.

$f$ is continuous at $x=0$ (though not differentiable there).

Example 4
Show that $f(x)=\begin{cases}x^{3}+3, & x\neq0\\ 1, & x=0\end{cases}$ is not continuous at $x=0$.
Solution
  1. $\displaystyle\lim_{x\to0}(x^{3}+3) = 3$.
  2. But $f(0) = 1$.
  3. Limit $\neq$ value.

$f$ is not continuous at $x=0$ — a removable discontinuity (redefining $f(0)=3$ would fix it).

Example 5
Find the points where the constant function $f(x)=k$ is continuous.
Solution
  1. For any real $c$, $f(c) = k$.
  2. $\displaystyle\lim_{x\to c}k = k$ (the value never changes).

$f$ is continuous at every real number — a constant function is continuous on $\mathbb{R}$.

Example 6
Prove that the identity function $f(x)=x$ is continuous at every real number.
Solution
  1. For any real $c$, $f(c) = c$.
  2. $\displaystyle\lim_{x\to c}x = c$.

$f$ is continuous on $\mathbb{R}$.

Example 7
Is $f(x)=|x|$ a continuous function?
Solution
  1. For $c<0$: near $c$, $f(x)=-x$, so $\lim_{x\to c}f(x) = -c = f(c)$. ✔
  2. For $c>0$: near $c$, $f(x)=x$, so $\lim_{x\to c}f(x) = c = f(c)$. ✔
  3. At $c=0$: LHL $=$ RHL $= 0 = f(0)$ (Example 3). ✔

$f(x)=|x|$ is continuous everywhere on $\mathbb{R}$.

Example 8
Discuss the continuity of $f(x)=x^{3}+x^{2}-1$.
Solution

This is a polynomial. Sums and products of continuous functions are continuous, and $x\mapsto x$ and constants are continuous.

$f$ is continuous at every real number.

Example 9
Discuss the continuity of $f(x)=\dfrac1x$, $x\neq0$.
Solution
  1. The domain is $\mathbb{R}-\{0\}$; continuity is only ever discussed on the domain.
  2. For any $c\neq0$: $\displaystyle\lim_{x\to c}\frac1x = \frac1c = f(c)$.

$f$ is continuous at every point of its domain. It is not discontinuous at $0$ — $0$ simply is not in the domain.

Example 10
Discuss the continuity of $f(x)=\begin{cases}x+2, & x\le1\\ x-2, & x>1\end{cases}$.
Solution
  1. For $c<1$: $\lim_{x\to c}(x+2) = c+2 = f(c)$. ✔ Continuous.
  2. For $c>1$: $\lim_{x\to c}(x-2) = c-2 = f(c)$. ✔ Continuous.
  3. At $c=1$: LHL $= \lim_{x\to1^-}(x+2) = 3$; RHL $= \lim_{x\to1^+}(x-2) = -1$.
  4. LHL $\neq$ RHL, so the limit does not exist.

$f$ is continuous everywhere except at $x=1$, where it has a jump discontinuity.

Example 11
Find all points of discontinuity of $f(x)=\begin{cases}x+2, & x<1\\ 0, & x=1\\ x-2, & x>1\end{cases}$.
Solution
  1. For $c\neq1$ the function agrees locally with a polynomial, so it is continuous there.
  2. At $c=1$: LHL $= 3$, RHL $= -1$, and $f(1) = 0$.
  3. All three differ, so $f$ is discontinuous at $1$.

The only point of discontinuity is $x=1$.

Example 12
Discuss the continuity of $f(x)=\begin{cases}x+2, & x<0\\ -x+2, & x>0\end{cases}$.
Solution
  1. The function is not defined at $x=0$; its domain is $\mathbb{R}-\{0\}$.
  2. For $c<0$: $\lim_{x\to c}(x+2) = c+2 = f(c)$. ✔
  3. For $c>0$: $\lim_{x\to c}(-x+2) = -c+2 = f(c)$. ✔

$f$ is continuous at every point of its domain. Continuity at $0$ is not in question, since $0\notin$ domain.

Example 13
Discuss the continuity of $f(x)=\begin{cases}x^{2}, & x\ge0\\ x, & x<0\end{cases}$.
Solution
  1. For $c<0$: $\lim_{x\to c}x = c = f(c)$. ✔
  2. For $c>0$: $\lim_{x\to c}x^{2} = c^{2} = f(c)$. ✔
  3. At $c=0$: LHL $= \lim_{x\to0^-}x = 0$; RHL $= \lim_{x\to0^+}x^{2} = 0$; $f(0) = 0$.

$f$ is continuous at every real number.

Example 14
Show that every polynomial function is continuous.
Solution

Let $p(x) = a_0 + a_1x + a_2x^{2} + \dots + a_nx^{n}$.

  1. The constant function and the identity function $x\mapsto x$ are continuous (Examples 5 and 6).
  2. Products of continuous functions are continuous, so each $x^{k}$ and each $a_kx^{k}$ is continuous.
  3. Sums of continuous functions are continuous, so the finite sum $p(x)$ is continuous.

Every polynomial is continuous on $\mathbb{R}$.

Example 15
Find all points of discontinuity of the greatest integer function $f(x)=[x]$.
Solution
  1. Let $c$ be not an integer. Then $[x]$ is constant on an interval around $c$, so $\lim_{x\to c}[x] = [c] = f(c)$. ✔ Continuous.
  2. Let $c$ be an integer. Then LHL $= \lim_{x\to c^-}[x] = c-1$, while RHL $= \lim_{x\to c^+}[x] = c$.
  3. LHL $\neq$ RHL, so the limit fails to exist.

$f(x)=[x]$ is discontinuous at every integer, and continuous at every non-integer.

Example 16
Prove that every rational function is continuous.
Solution

A rational function is $f(x) = \dfrac{p(x)}{q(x)}$ with $p,q$ polynomials and $q(x)\neq0$ on the domain.

  1. $p$ and $q$ are continuous (Example 14).
  2. The quotient of two continuous functions is continuous wherever the denominator is non-zero.

Every rational function is continuous at every point of its domain (all $x$ with $q(x)\neq0$).

Example 17
Discuss the continuity of the sine function.
Solution

Take any real $c$ and put $x = c+h$, so $h\to0$ as $x\to c$.

  1. $\displaystyle\lim_{x\to c}\sin x = \lim_{h\to0}\sin(c+h)$.
  2. $= \lim_{h\to0}\left[\sin c\cos h + \cos c\sin h\right]$.
  3. As $h\to0$, $\cos h\to1$ and $\sin h\to0$.
  4. $= \sin c\,(1) + \cos c\,(0) = \sin c$.

$\displaystyle\lim_{x\to c}\sin x = \sin c$, so $\sin x$ is continuous on $\mathbb{R}$.

Example 18
Prove that $f(x)=\tan x$ is a continuous function.
Solution
  1. $\tan x = \dfrac{\sin x}{\cos x}$, and both $\sin x$ and $\cos x$ are continuous on $\mathbb{R}$.
  2. A quotient of continuous functions is continuous wherever the denominator is non-zero.
  3. $\cos x = 0$ exactly when $x = (2n+1)\dfrac{\pi}{2}$, $n\in\mathbb{Z}$ — these points are excluded from the domain.

$\tan x$ is continuous at every point of its domain, i.e. on $\mathbb{R}-\left\{(2n+1)\tfrac{\pi}{2}\right\}$.

Example 19
Show that $f(x)=\sin(x^{2})$ is a continuous function.
Solution

Continuity of a composite: $$\text{If } g \text{ is continuous at } c \text{ and } h \text{ at } g(c),\text{ then } h\circ g \text{ is continuous at } c.$$

  1. Write $f = h\circ g$ with $g(x) = x^{2}$ and $h(t) = \sin t$.
  2. $g$ is a polynomial, hence continuous everywhere.
  3. $h$ is continuous everywhere (Example 17).

The composite $\sin(x^{2})$ is continuous on $\mathbb{R}$.

Example 20
Show that $f(x)=\left|1-x+|x|\right|$ is continuous for every real $x$.
Solution
  1. Let $g(x) = |x|$ — continuous (Example 7).
  2. Then $1-x+|x|$ is a sum of continuous functions, hence continuous.
  3. Let $h(t) = |t|$ — continuous.
  4. $f = h\circ\left(1-x+|x|\right)$ is a composite of continuous functions.

$f$ is continuous at every real number.

Example 21
Find the derivative of $f(x)=\sin(x^{2})$.
Solution

Chain rule: $$\frac{d}{dx}h(g(x)) = h'(g(x))\cdot g'(x)$$

  1. Outer: $\dfrac{d}{dt}\sin t = \cos t$, evaluated at $t = x^{2}$ gives $\cos(x^{2})$.
  2. Inner: $\dfrac{d}{dx}x^{2} = 2x$.

$f'(x) = \mathbf{2x\cos(x^{2})}$.

Example 22
Find $\dfrac{dy}{dx}$ if $x-y=\pi$.
Solution
  1. Differentiate both sides w.r.t. $x$: $\dfrac{d}{dx}(x) - \dfrac{d}{dx}(y) = \dfrac{d}{dx}(\pi)$.
  2. $1 - \dfrac{dy}{dx} = 0$.

$\dfrac{dy}{dx} = \mathbf{1}$.

Example 23
Find $\dfrac{dy}{dx}$ if $y+\sin y=\cos x$.
Solution

Differentiate implicitly, treating $y$ as a function of $x$.

  1. $\dfrac{dy}{dx} + \cos y\,\dfrac{dy}{dx} = -\sin x$.
  2. $\dfrac{dy}{dx}\left(1+\cos y\right) = -\sin x$.

$\dfrac{dy}{dx} = \mathbf{\dfrac{-\sin x}{1+\cos y}}$, provided $\cos y \neq -1$.

Example 24
Find the derivative of $f(x)=\sin^{-1}x$, assuming it exists.
Solution
  1. Put $y = \sin^{-1}x$, so $\sin y = x$ with $y\in\left[-\tfrac{\pi}{2},\tfrac{\pi}{2}\right]$.
  2. Differentiate w.r.t. $x$: $\cos y\,\dfrac{dy}{dx} = 1$, so $\dfrac{dy}{dx} = \dfrac{1}{\cos y}$.
  3. On that range $\cos y \ge 0$, so $\cos y = \sqrt{1-\sin^{2}y} = \sqrt{1-x^{2}}$.

$\dfrac{d}{dx}\sin^{-1}x = \mathbf{\dfrac{1}{\sqrt{1-x^{2}}}}$, for $-1<x<1$.

Example 25
Is it true that $x=e^{\log x}$ for all real $x$?
Solution
  1. $\log x$ is defined only for $x>0$, so the right-hand side has no meaning for $x\le0$.
  2. For $x>0$, $e^{\log x} = x$ holds, since $\exp$ and $\log$ are inverse functions.

No. The identity holds only for $x>0$, not for all real $x$.

Example 26
Differentiate w.r.t. $x$:
  1. (i) $e^{-x}$
  2. (ii) $\sin(\log x)$, $x>0$
  3. (iii) $\cos^{-1}(e^{x})$
  4. (iv) $e^{\cos x}$.
Solution
  1. (i) $\dfrac{d}{dx}e^{-x} = e^{-x}\cdot(-1) = \mathbf{-e^{-x}}$.
  2. (ii) $\dfrac{d}{dx}\sin(\log x) = \cos(\log x)\cdot\dfrac1x = \mathbf{\dfrac{\cos(\log x)}{x}}$.
  3. (iii) $\dfrac{d}{dx}\cos^{-1}(e^{x}) = \dfrac{-1}{\sqrt{1-e^{2x}}}\cdot e^{x} = \mathbf{\dfrac{-e^{x}}{\sqrt{1-e^{2x}}}}$.
  4. (iv) $\dfrac{d}{dx}e^{\cos x} = e^{\cos x}\cdot(-\sin x) = \mathbf{-\sin x\;e^{\cos x}}$.
Example 27
Differentiate $\dfrac{\sqrt{(x-3)(x^{2}+4)}}{3x^{2}+4x+5}$ w.r.t. $x$.
Solution

The expression is a product/quotient of powers — logarithmic differentiation is far quicker than the quotient rule.

  1. Let $y = \dfrac{\sqrt{(x-3)(x^{2}+4)}}{3x^{2}+4x+5}$ and take logs:
  2. $\log y = \tfrac12\log(x-3) + \tfrac12\log(x^{2}+4) - \log(3x^{2}+4x+5)$.
  3. Differentiate both sides w.r.t. $x$:
  4. $\dfrac1y\dfrac{dy}{dx} = \dfrac{1}{2(x-3)} + \dfrac{2x}{2(x^{2}+4)} - \dfrac{6x+4}{3x^{2}+4x+5}$.
  5. $\dfrac1y\dfrac{dy}{dx} = \dfrac{1}{2(x-3)} + \dfrac{x}{x^{2}+4} - \dfrac{6x+4}{3x^{2}+4x+5}$.

$\dfrac{dy}{dx} = \dfrac{\sqrt{(x-3)(x^{2}+4)}}{3x^{2}+4x+5}\left[\dfrac{1}{2(x-3)} + \dfrac{x}{x^{2}+4} - \dfrac{6x+4}{3x^{2}+4x+5}\right]$.

Example 28
Differentiate $a^{x}$ w.r.t. $x$, where $a>0$ is constant.
Solution
  1. Let $y = a^{x}$. Take logs: $\log y = x\log a$.
  2. Differentiate: $\dfrac1y\dfrac{dy}{dx} = \log a$.
  3. $\dfrac{dy}{dx} = y\log a$.

$\dfrac{d}{dx}a^{x} = \mathbf{a^{x}\log a}$. (For $a=e$, $\log e = 1$, recovering $\dfrac{d}{dx}e^{x} = e^{x}$.)

Example 29
Differentiate $x^{\sin x}$, $x>0$, w.r.t. $x$.
Solution

Both base and exponent vary, so neither the power rule nor the exponential rule applies — use logarithmic differentiation.

  1. Let $y = x^{\sin x}$. Then $\log y = \sin x\,\log x$.
  2. Differentiate (product rule on the right):
  3. $\dfrac1y\dfrac{dy}{dx} = \cos x\,\log x + \sin x\cdot\dfrac1x$.

$\dfrac{dy}{dx} = \mathbf{x^{\sin x}\left(\cos x\,\log x + \dfrac{\sin x}{x}\right)}$.

Example 30
Find $\dfrac{dy}{dx}$ if $y^{x}+x^{y}+x^{x}=a^{b}$.
Solution

Set $u = y^{x}$, $v = x^{y}$, $w = x^{x}$, so $u+v+w = a^{b}$ (a constant) and $\dfrac{du}{dx}+\dfrac{dv}{dx}+\dfrac{dw}{dx} = 0$. Handle each by logs.

  1. $\log u = x\log y \Rightarrow \dfrac{1}{u}\dfrac{du}{dx} = \log y + \dfrac{x}{y}\dfrac{dy}{dx}$, so $\dfrac{du}{dx} = y^{x}\left(\log y + \dfrac{x}{y}\dfrac{dy}{dx}\right)$.
  2. $\log v = y\log x \Rightarrow \dfrac{1}{v}\dfrac{dv}{dx} = \dfrac{dy}{dx}\log x + \dfrac{y}{x}$, so $\dfrac{dv}{dx} = x^{y}\left(\log x\,\dfrac{dy}{dx} + \dfrac{y}{x}\right)$.
  3. $\log w = x\log x \Rightarrow \dfrac{1}{w}\dfrac{dw}{dx} = \log x + 1$, so $\dfrac{dw}{dx} = x^{x}(1+\log x)$.
  4. Add and set the total to zero, then collect the $\dfrac{dy}{dx}$ terms.

$\dfrac{dy}{dx} = -\,\dfrac{y^{x}\log y + \dfrac{y\,x^{y}}{x} + x^{x}(1+\log x)}{\dfrac{x\,y^{x}}{y} + x^{y}\log x}$.

Example 31
Find $\dfrac{dy}{dx}$ if $x=a\cos\theta$, $y=a\sin\theta$.
Solution

Parametric differentiation: $$\frac{dy}{dx} = \frac{dy/d\theta}{dx/d\theta}$$

  1. $\dfrac{dx}{d\theta} = -a\sin\theta$.
  2. $\dfrac{dy}{d\theta} = a\cos\theta$.
  3. $\dfrac{dy}{dx} = \dfrac{a\cos\theta}{-a\sin\theta}$.

$\dfrac{dy}{dx} = \mathbf{-\cot\theta}$.

Example 32
Find $\dfrac{dy}{dx}$ if $x=at^{2}$, $y=2at$.
Solution
  1. $\dfrac{dx}{dt} = 2at$.
  2. $\dfrac{dy}{dt} = 2a$.
  3. $\dfrac{dy}{dx} = \dfrac{2a}{2at}$.

$\dfrac{dy}{dx} = \mathbf{\dfrac1t}$, $t\neq0$.

Example 33
Find $\dfrac{dy}{dx}$ if $x=a(\theta+\sin\theta)$, $y=a(1-\cos\theta)$.
Solution
  1. $\dfrac{dx}{d\theta} = a(1+\cos\theta)$.
  2. $\dfrac{dy}{d\theta} = a\sin\theta$.
  3. $\dfrac{dy}{dx} = \dfrac{a\sin\theta}{a(1+\cos\theta)} = \dfrac{\sin\theta}{1+\cos\theta}$.
  4. Use $\sin\theta = 2\sin\tfrac\theta2\cos\tfrac\theta2$ and $1+\cos\theta = 2\cos^{2}\tfrac\theta2$:
  5. $= \dfrac{2\sin\tfrac\theta2\cos\tfrac\theta2}{2\cos^{2}\tfrac\theta2}$.

$\dfrac{dy}{dx} = \mathbf{\tan\dfrac{\theta}{2}}$.

Example 34
Find $\dfrac{dy}{dx}$ if $x^{2/3}+y^{2/3}=a^{2/3}$.
Solution
  1. Differentiate implicitly: $\tfrac23x^{-1/3} + \tfrac23y^{-1/3}\dfrac{dy}{dx} = 0$.
  2. $y^{-1/3}\dfrac{dy}{dx} = -x^{-1/3}$.
  3. $\dfrac{dy}{dx} = -\dfrac{x^{-1/3}}{y^{-1/3}} = -\dfrac{y^{1/3}}{x^{1/3}}$.

$\dfrac{dy}{dx} = \mathbf{-\left(\dfrac{y}{x}\right)^{1/3}}$.

Example 35
Find $\dfrac{d^{2}y}{dx^{2}}$ if $y=x^{3}+\tan x$.
Solution
  1. $\dfrac{dy}{dx} = 3x^{2} + \sec^{2}x$.
  2. Differentiate again; $\dfrac{d}{dx}\sec^{2}x = 2\sec x\cdot\sec x\tan x = 2\sec^{2}x\tan x$.
  3. $\dfrac{d^{2}y}{dx^{2}} = 6x + 2\sec^{2}x\tan x$.

$\dfrac{d^{2}y}{dx^{2}} = \mathbf{6x + 2\sec^{2}x\tan x}$.

Example 36
If $y=A\sin x+B\cos x$, prove that $\dfrac{d^{2}y}{dx^{2}}+y=0$.
Solution
  1. $\dfrac{dy}{dx} = A\cos x - B\sin x$.
  2. $\dfrac{d^{2}y}{dx^{2}} = -A\sin x - B\cos x = -(A\sin x + B\cos x) = -y$.
  3. Hence $\dfrac{d^{2}y}{dx^{2}} + y = -y + y = 0$.

Proved — this is the differential equation of simple harmonic motion.

Example 37
If $y=3e^{2x}+2e^{3x}$, prove that $\dfrac{d^{2}y}{dx^{2}}-5\dfrac{dy}{dx}+6y=0$.
Solution
  1. $\dfrac{dy}{dx} = 6e^{2x} + 6e^{3x}$.
  2. $\dfrac{d^{2}y}{dx^{2}} = 12e^{2x} + 18e^{3x}$.
  3. Substitute: $\left(12e^{2x}+18e^{3x}\right) - 5\left(6e^{2x}+6e^{3x}\right) + 6\left(3e^{2x}+2e^{3x}\right)$.
  4. $e^{2x}$ terms: $12 - 30 + 18 = 0$.
  5. $e^{3x}$ terms: $18 - 30 + 12 = 0$.

The whole expression is $0$ — proved.

Example 38
If $y=\sin^{-1}x$, show that $(1-x^{2})\dfrac{d^{2}y}{dx^{2}}-x\dfrac{dy}{dx}=0$.
Solution
  1. $\dfrac{dy}{dx} = \dfrac{1}{\sqrt{1-x^{2}}} = (1-x^{2})^{-1/2}$.
  2. $\dfrac{d^{2}y}{dx^{2}} = -\tfrac12(1-x^{2})^{-3/2}\cdot(-2x) = x(1-x^{2})^{-3/2}$.
  3. Substitute: $(1-x^{2})\cdot x(1-x^{2})^{-3/2} - x(1-x^{2})^{-1/2}$.
  4. $= x(1-x^{2})^{-1/2} - x(1-x^{2})^{-1/2} = 0$.

Proved.

Example 39
Differentiate w.r.t. $x$:
  1. (i) $\sqrt{3x+2}+\dfrac{1}{\sqrt{2x^{2}+4}}$
  2. (ii) $\log_7(\log x)$.
Solution

(i)

  1. $\dfrac{d}{dx}(3x+2)^{1/2} = \tfrac12(3x+2)^{-1/2}\cdot3 = \dfrac{3}{2\sqrt{3x+2}}$.
  2. $\dfrac{d}{dx}(2x^{2}+4)^{-1/2} = -\tfrac12(2x^{2}+4)^{-3/2}\cdot4x = \dfrac{-2x}{(2x^{2}+4)^{3/2}}$.

(ii) Change the base first: $\log_7(\log x) = \dfrac{\log(\log x)}{\log 7}$.

  1. $\dfrac{d}{dx}\left[\dfrac{\log(\log x)}{\log7}\right] = \dfrac{1}{\log7}\cdot\dfrac{1}{\log x}\cdot\dfrac1x$.

(i) $\dfrac{3}{2\sqrt{3x+2}} - \dfrac{2x}{(2x^{2}+4)^{3/2}}$. (ii) $\dfrac{1}{x\,\log x\,\log 7}$.

Example 40
Differentiate w.r.t. $x$:
  1. (i) $\cos^{-1}(\sin x)$
  2. (ii) $\tan^{-1}\!\left(\dfrac{\sin x}{1+\cos x}\right)$
  3. (iii) $\sin^{-1}\!\left(\dfrac{2^{x+1}}{1+4^{x}}\right)$.
Solution

Each becomes trivial after a trigonometric simplification — differentiating directly is far messier.

(i)

  1. $\sin x = \cos\left(\tfrac{\pi}{2}-x\right)$, so $\cos^{-1}(\sin x) = \tfrac{\pi}{2}-x$.
  2. Differentiating gives $-1$.

(ii)

  1. $\dfrac{\sin x}{1+\cos x} = \dfrac{2\sin\tfrac x2\cos\tfrac x2}{2\cos^{2}\tfrac x2} = \tan\dfrac{x}{2}$.
  2. So the function is $\tan^{-1}\left(\tan\tfrac x2\right) = \dfrac{x}{2}$, whose derivative is $\tfrac12$.

(iii)

  1. Write $\dfrac{2^{x+1}}{1+4^{x}} = \dfrac{2\cdot2^{x}}{1+(2^{x})^{2}}$.
  2. Put $2^{x} = \tan\theta$; then the expression is $\dfrac{2\tan\theta}{1+\tan^{2}\theta} = \sin2\theta$.
  3. So the function is $\sin^{-1}(\sin2\theta) = 2\theta = 2\tan^{-1}(2^{x})$.
  4. Differentiate: $\dfrac{d}{dx}\left[2\tan^{-1}(2^{x})\right] = \dfrac{2}{1+4^{x}}\cdot2^{x}\log2$.

(i) $-1$. (ii) $\dfrac12$. (iii) $\dfrac{2^{x+1}\log2}{1+4^{x}}$.

Example 41
Find $f'(x)$ if $f(x)=(\sin x)^{\sin x}$ for $0<x<\pi$.
Solution
  1. Let $y = (\sin x)^{\sin x}$. Then $\log y = \sin x\,\log(\sin x)$.
  2. Differentiate, using the product rule on the right:
  3. $\dfrac1y\dfrac{dy}{dx} = \cos x\,\log(\sin x) + \sin x\cdot\dfrac{\cos x}{\sin x}$.
  4. $= \cos x\,\log(\sin x) + \cos x = \cos x\left(1 + \log\sin x\right)$.

$f'(x) = \mathbf{(\sin x)^{\sin x}\cos x\left(1+\log\sin x\right)}$.

Example 42
For a positive constant $a$, find $\dfrac{dy}{dx}$ where $y=a^{t+\frac1t}$ and $x=\left(t+\dfrac1t\right)^{a}$.
Solution

Both are given in terms of $t$ — use parametric differentiation, with logs for each.

  1. $\log y = \left(t+\tfrac1t\right)\log a$, so $\dfrac1y\dfrac{dy}{dt} = \left(1-\dfrac{1}{t^{2}}\right)\log a$.
  2. $\dfrac{dy}{dt} = a^{t+\frac1t}\left(1-\dfrac{1}{t^{2}}\right)\log a$.
  3. $\log x = a\log\left(t+\tfrac1t\right)$, so $\dfrac1x\dfrac{dx}{dt} = a\cdot\dfrac{1-\frac{1}{t^{2}}}{t+\frac1t}$.
  4. $\dfrac{dx}{dt} = a\left(t+\tfrac1t\right)^{a-1}\left(1-\dfrac{1}{t^{2}}\right)$.
  5. Divide; the factor $\left(1-\tfrac{1}{t^{2}}\right)$ cancels.

$\dfrac{dy}{dx} = \mathbf{\dfrac{a^{t+\frac1t}\log a}{a\left(t+\frac1t\right)^{a-1}}}$.

Example 43
Differentiate $\sin^{2}x$ with respect to $e^{\cos x}$.
Solution

Differentiating one function w.r.t. another: $$\frac{du}{dv} = \frac{du/dx}{dv/dx}$$

  1. Let $u = \sin^{2}x$ and $v = e^{\cos x}$.
  2. $\dfrac{du}{dx} = 2\sin x\cos x$.
  3. $\dfrac{dv}{dx} = e^{\cos x}\cdot(-\sin x) = -\sin x\,e^{\cos x}$.
  4. $\dfrac{du}{dv} = \dfrac{2\sin x\cos x}{-\sin x\,e^{\cos x}}$ — the $\sin x$ cancels.

$\dfrac{du}{dv} = \mathbf{\dfrac{-2\cos x}{e^{\cos x}}}$.