NCERT Class 12 Mathematics — Continuity and Differentiability, Exercise 5.2. All 10 questions solved.
Eight chain-rule differentiations and two proofs. The chain rule says that for $y = f(g(x))$,
$$\frac{dy}{dx} = f’\big(g(x)\big) \cdot g'(x)$$
and for a longer chain the factors simply multiply, one for each layer.
Key insight. Work from the outside in, and write down one factor per layer before simplifying anything. Question 4 is $\sec\left(\tan\left(\sqrt{x}\right)\right)$ — three layers, so three factors: the derivative of $\sec$, then of $\tan$, then of $\sqrt{\cdot}$. Counting the layers first is what stops a factor being dropped.
The last two questions are about the failure of differentiability. At a corner (question 9) or a jump (question 10) the left-hand and right-hand derivatives exist but differ — or one does not exist at all — so the derivative itself does not.
Differentiate the functions with respect to $x$ in Exercises 1 to 8.
Question 1
$\sin\left(x^2 + 5\right)$
Solution. Two layers: the sine, then the polynomial inside.
$$\frac{d}{dx}\sin\left(x^2+5\right) = \cos\left(x^2+5\right) \cdot 2x$$
$$2x\cos\left(x^2+5\right)$$
Question 2
$\cos(\sin x)$
Solution.
$$\frac{d}{dx}\cos(\sin x) = -\sin(\sin x) \cdot \cos x$$
Note that the inner function is $\sin x$, so the outer minus sign belongs to the cosine and the $\cos x$ comes from differentiating the inside.
$$-\cos x\,\sin(\sin x)$$
Question 3
$\sin(ax + b)$
Solution. The inner function is linear, so its derivative is the constant $a$.
$$a\cos(ax+b)$$
Question 4
$\sec\left(\tan\left(\sqrt{x}\right)\right)$
Solution. Three layers. Differentiating outwards in:
$$\frac{d}{dx} = \sec\left(\tan\sqrt{x}\right)\tan\left(\tan\sqrt{x}\right) \cdot \sec^2\sqrt{x} \cdot \frac{1}{2\sqrt{x}}$$
The three factors are, in order, $\tfrac{d}{du}\sec u$, $\tfrac{d}{dv}\tan v$ and $\tfrac{d}{dx}\sqrt{x}$.
$$\frac{\sec\left(\tan\sqrt{x}\right)\tan\left(\tan\sqrt{x}\right)\sec^2\sqrt{x}}{2\sqrt{x}}$$
Question 5
$\dfrac{\sin(ax+b)}{\cos(cx+d)}$
Solution. Quotient rule with the chain rule inside each derivative:
$$\frac{dy}{dx} = \frac{a\cos(ax+b)\cos(cx+d) + c\sin(ax+b)\sin(cx+d)}{\cos^2(cx+d)}$$
Splitting the fraction into two terms gives NCERT’s form:
$$a\cos(ax+b)\sec(cx+d) + c\sin(ax+b)\tan(cx+d)\sec(cx+d)$$
Question 6
$\cos x^3 \cdot \sin^2\left(x^5\right)$
Solution. Product rule, with a chain rule inside each factor.
$$\frac{d}{dx}\cos x^3 = -3x^2\sin x^3$$
$$\frac{d}{dx}\sin^2\left(x^5\right) = 2\sin\left(x^5\right)\cos\left(x^5\right) \cdot 5x^4 = 10x^4\sin\left(x^5\right)\cos\left(x^5\right)$$
Note the second one has three layers: the square, the sine, and $x^5$.
$$10x^4\sin\left(x^5\right)\cos\left(x^5\right)\cos x^3 – 3x^2\sin x^3\sin^2\left(x^5\right)$$
Question 7
$2\sqrt{\cot\left(x^2\right)}$
Solution. Three layers again:
$$\frac{dy}{dx} = 2 \cdot \frac{1}{2\sqrt{\cot x^2}} \cdot \left(-\operatorname{cosec}^2x^2\right) \cdot 2x = \frac{-2x\operatorname{cosec}^2x^2}{\sqrt{\cot x^2}}$$
To reach NCERT’s printed form, write everything in sines and cosines: $\operatorname{cosec}^2x^2 = \tfrac{1}{\sin^2x^2}$ and $\sqrt{\cot x^2} = \tfrac{\sqrt{\cos x^2}}{\sqrt{\sin x^2}}$, so the expression becomes $\dfrac{-2x}{\sin^2x^2}\sqrt{\dfrac{\sin x^2}{\cos x^2}}$, and using $2\sin x^2\cos x^2 = \sin 2x^2$:
$$\frac{-2\sqrt2\,x}{\sin x^2\sqrt{\sin 2x^2}}$$
Question 8
$\cos\left(\sqrt{x}\right)$
Solution.
$$\frac{dy}{dx} = -\sin\left(\sqrt{x}\right) \cdot \frac{1}{2\sqrt{x}}$$
$$-\frac{\sin\sqrt{x}}{2\sqrt{x}}$$
Question 9
Prove that the function $f$ given by $f(x) = |x-1|$, $x \in \mathbf{R}$, is not differentiable at $x = 1$.
Solution. Compute the two one-sided derivatives at $x = 1$ from the definition.
Left-hand derivative. For $h < 0$, $1 + h < 1$, so $f(1+h) = |h| = -h$:
$$\lim_{h\to0^-}\frac{f(1+h) – f(1)}{h} = \lim_{h\to0^-}\frac{-h – 0}{h} = -1$$
Right-hand derivative. For $h > 0$, $f(1+h) = h$:
$$\lim_{h\to0^+}\frac{h}{h} = 1$$
Since $-1 \ne 1$, the limit defining $f'(1)$ does not exist, so $f$ is not differentiable at $x = 1$.
It is continuous there — a corner, not a break. This is the standard example showing that continuity does not imply differentiability.
The left-hand derivative at $x = 1$ is $-1$ and the right-hand derivative is $1$, so $f(x) = |x-1|$ is not differentiable at $x = 1$.
Question 10
Prove that the greatest integer function defined by $f(x) = [x]$, $0 < x < 3$, is not differentiable at $x = 1$ and $x = 2$.
Solution. A function that is not continuous at a point cannot be differentiable there, so it suffices to show the discontinuity — but the definition gives it directly.
At $x = 1$, $f(1) = 1$. For $h < 0$, $1 + h$ lies in $(0, 1)$, so $f(1+h) = 0$:
$$\lim_{h\to0^-}\frac{0 – 1}{h} = \lim_{h\to0^-}\frac{-1}{h} = +\infty$$
which does not exist as a finite number. (For $h > 0$ the quotient is $\tfrac{0}{h}$, giving $0$.) The two sides disagree, so $f'(1)$ does not exist.
At $x = 2$ the same argument applies with $f(2) = 2$ and $f(2+h) = 1$ for small $h < 0$.
At $x = 1$ and at $x = 2$ the left-hand derivative does not exist while the right-hand one is $0$, so $f(x) = [x]$ is not differentiable at either point.
Common mistakes
- Dropping the innermost factor. In question 4 the $\tfrac{1}{2\sqrt{x}}$ is easy to forget after two other derivatives; in question 6 it is the $5x^4$.
- Differentiating the inner function in the wrong place. The chain rule multiplies by $g'(x)$; it does not substitute $g'(x)$ into $f$.
- Confusing $\cos x^3$ with $\cos^3 x$. The first has $x^3$ inside the cosine — question 6 uses it — and the second is the cube of $\cos x$.
- Assuming continuity implies differentiability. Question 9 is exactly the counterexample; the converse is true.
- Trying to differentiate at a jump. In question 10 the function is not even continuous at $x = 1$ and $x = 2$, which already rules differentiability out.
- Not simplifying to the key’s form. Question 7’s answer looks different from the key’s until $\operatorname{cosec}$ and $\cot$ are written in sines and cosines and $\sin 2\theta = 2\sin\theta\cos\theta$ is used.
Practise next
- Exercise 5.3 — implicit differentiation, where the chain rule acts on $y$ as a function of $x$.
- Exercise 5.1 — the continuity that question 9 contrasts differentiability against.

Doubts are answered by Shiwam, usually within a day. Ask about this question specifically — a general question about the chapter is better asked in class.