PYQ Vault

NDA Maths · Differentiation

Differentiability — When the Derivative Exists

A function is differentiable at a point only if its left-hand and right-hand derivatives both exist and are equal — corners, jumps, and steps are where this fails.

Why this matters

NDA loves to test the gap between continuity and differentiability. The modulus, piecewise, and greatest-integer functions are the standard counter-examples, and parameter problems ('find a, b so f is differentiable') hinge entirely on matching one-sided derivatives.

Test yourself — a quick 18-question Differentiation recall quiz, instant score.

Concept 1 of 6: Differentiable implies continuous (not the converse)

Differentiability is the stronger condition. If a function has a derivative at a point, it must be continuous there — but a continuous function can still fail to be differentiable (a sharp corner). So 'differentiable ⇒\Rightarrow continuous' is a one-way street.

Definition

  • If ff is differentiable at x=cx=c, then ff is continuous at cc.
  • The converse is false: ∣x∣|x| is continuous at 00 but not differentiable there.
  • Contrapositive (useful): if ff is discontinuous at cc, it cannot be differentiable at cc.

Worked example

A function has a jump discontinuity at x=2x=2. Can it be differentiable at x=2x=2?
Practice this conceptself-check · 4 quick reps

The implication only runs one way

'Differentiable ⇒\Rightarrow continuous' is true; 'continuous ⇒\Rightarrow differentiable' is FALSE. NDA statement-questions plant the reversed (false) version to catch you.

Concept 2 of 6: The left-hand = right-hand derivative test

At a join point of a piecewise function, compute the derivative from the left and from the right separately. The function is differentiable there only if both exist and are equal. This is the workhorse for every piecewise differentiability question.

Definition

ff is differentiable at x=cx=c iff the one-sided derivatives match:

  • LHD =lim⁡h→0−f(c+h)−f(c)h= \lim_{h\to 0^-}\dfrac{f(c+h)-f(c)}{h}
  • RHD =lim⁡h→0+f(c+h)−f(c)h= \lim_{h\to 0^+}\dfrac{f(c+h)-f(c)}{h}

Differentiable at cc   ⟺  \iff LHD == RHD (and both finite). In practice: differentiate each piece, then equate the two pieces' derivatives at the join (after first checking continuity there). When the one-sided derivatives are INFINITE the function is still not differentiable there, but the graph has a vertical tangent rather than a corner: y=x1/3y=x^{1/3} at x=0x=0 has f(h)−f(0)h=h−2/3→+∞\dfrac{f(h)-f(0)}{h}=h^{-2/3}\to+\infty from both sides — continuous, vertical tangent x=0x=0, no derivative. y=x2/3y=x^{2/3} (a cusp: −∞-\infty from the left, +∞+\infty from the right) is the same verdict. "Infinite derivative" in an option list means exactly this case and is a legitimate description, not an error.

One-sided derivative test

f′(c−)=f′(c+)  ⟺  f differentiable at cf'(c^-) = f'(c^+) \iff f \text{ differentiable at } c
LHD = RHDsmooth join → differentiableLHD ≠ RHDcorner → not differentiable

Worked example

Is f(x)={x2,x≤12x−1,x>1f(x)=\begin{cases} x^2, & x\le 1\\ 2x-1, & x>1\end{cases} differentiable at x=1x=1?
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Sep 2017 · Q68Moderate

Example 2 · Differentiation · Differentiability of Absolute Value, Piecewise, and Greatest Integer Functions

A function is defined in (0,∞)(0, \infty) by f(x)={1−x2for 0<x≤1ln⁡xfor 1<x≤2ln⁡2−1+0.5xfor 2<x<∞f(x) = \begin{cases}1 - x^2 & \text{for } 0 < x \leq 1 \\ \ln x & \text{for } 1 < x \leq 2 \\ \ln 2 - 1 + 0.5x & \text{for } 2 < x < \infty\end{cases}. Which one of the following is correct in respect of the derivative of the function, i.e., f′(x)f'(x)?

Continuity first, then slopes

If the pieces don't even meet (discontinuous at the join), stop — it cannot be differentiable. Only when continuous do you compare LHD and RHD.

Concept 3 of 6: Modulus corners — and the x|x| trap

A modulus makes a corner at its split point, where the slope jumps. ∣x∣|x| has slope −1-1 on the left and +1+1 on the right, so it is not differentiable at 00. But not every modulus expression has a corner: x∣x∣x|x| smooths the kink out and is differentiable at 00. Always split at the modulus's zero and test.

Definition

Split ∣g(x)∣|g(x)| at the points where g(x)=0g(x)=0:

  • ∣x∣|x| is continuous but not differentiable at 00 (LHD =−1=-1, RHD =+1=+1).
  • ∣x−a∣|x-a| has its corner at x=ax=a.
  • x∣x∣x|x| equals −x2-x^2 for x<0x<0 and x2x^2 for x≥0x\ge 0; both have derivative 00 at the join, so it is differentiable at 00 (the trap).
slope −1slope +1corner: LHD ≠ RHDcontinuous, NOT differentiable at 0

Worked example

Is f(x)=∣x−3∣f(x)=|x-3| differentiable at x=3x=3?
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Sep 2025 · Q75Moderate

Example 3 · Differentiation · Differentiability of Absolute Value, Piecewise, and Greatest Integer Functions

For the following three (03) items: Consider the function f(x)=x∣x∣f(x)=x|x|.
Consider the following statements: I. The function is increasing in the interval (−∞,∞)(-\infty,\infty). II. The function is differentiable at x=0x=0. Which of the statements given above is/are correct?

Not every |·| means non-differentiable

∣x∣|x| has a corner, but x∣x∣x|x|, x2∣x∣x^2|x|, and e∣x∣⋅(smoothing)e^{|x|}\cdot(\text{smoothing}) can be differentiable at the split. Always rewrite piecewise and compare one-sided derivatives — don't assume the modulus kills differentiability.

Concept 4 of 6: Greatest-integer and step functions

The greatest-integer function ⌊x⌋\lfloor x\rfloor is a staircase — flat between integers, with a jump at each integer. On any flat step it is constant, so its derivative is 00; at each integer it is discontinuous, hence not differentiable.

Definition

  • Between consecutive integers, ⌊x⌋\lfloor x\rfloor is constant ⇒\Rightarrow derivative =0=0 there.
  • At every integer it jumps (discontinuous) ⇒\Rightarrow not differentiable at integers.
  • A function built from ⌊x⌋\lfloor x\rfloor inherits these jumps unless they cancel; check each integer in the domain.

Worked example

What is ddx⌊x⌋\dfrac{d}{dx}\lfloor x\rfloor for 2<x<32<x<3?
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2022 · Q71Easy

Example 4 · Differentiation · Differentiability of Absolute Value, Piecewise, and Greatest Integer Functions

Let y=[x+1]y=[x+1], −4<x<−3-4<x<-3 where [.][.] is the greatest integer function. What is the derivative of yy with respect to xx at x=−3.5x=-3.5?

Concept 5 of 6: Finding parameters so f is differentiable

When a piecewise function carries unknown constants and is declared differentiable at the join, you get two equations: continuity (the values match) and differentiability (the one-sided derivatives match). Solve them together for the unknowns.

Definition

For a piecewise ff differentiable at x=cx=c: 1. Continuity: set the two pieces' values equal at cc. 2. Differentiability: set the two pieces' derivatives equal at cc. Two equations in the unknown constants — solve simultaneously.

Worked example

Find a,ba, b so that f(x)={x2,x≤1ax+b,x>1f(x)=\begin{cases} x^2, & x\le 1\\ ax+b, & x>1\end{cases} is differentiable at x=1x=1.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Sep 2023 · Q63Hard

Example 5 · Differentiation · Differentiability of Absolute Value, Piecewise, and Greatest Integer Functions

Consider the following for the items that follow: Let f(x)={ax(x+1)+b,x<1x−1,1≤x≤2f(x)=\begin{cases}ax(x+1)+b, & x<1\\ x-1, & 1\leq x\leq 2\end{cases}
If f(x)f(x) is differentiable at x=1x=1, then what is the value of (a+b)(a+b)?

Concept 6 of 6: Derivative at an awkward point via the limit definition

When a point is special — a modulus, a ln⁡∣x∣\ln|x|, or a value patched in by hand (f(0)=0f(0)=0) — the rule-based derivative may not apply directly. Fall back to the definition: f′(c)=lim⁡h→0f(c+h)−f(c)hf'(c)=\lim_{h\to 0}\frac{f(c+h)-f(c)}{h} and evaluate the limit.

Definition

At a point where the usual rules are unsafe, compute f′(c)=lim⁡h→0f(c+h)−f(c)hf'(c)=\lim_{h\to 0}\dfrac{f(c+h)-f(c)}{h} directly. If the limit exists (and is the same from both sides), that value is the derivative; if it doesn't, ff is not differentiable at cc. The two standard limits these computations need: lim⁡h→0eh−1h=1\lim_{h\to0}\dfrac{e^h-1}{h}=1 (so for f(x)=e∣x∣f(x)=e^{|x|} the RHD at 0 is +1+1 and the LHD is −1-1 — not differentiable), and the small-uu approximation eu≈1+ue^u\approx1+u, which gives 1−e−x2≈x21-e^{-x^2}\approx x^2 and hence 1−e−x2≈∣x∣\sqrt{1-e^{-x^2}}\approx|x| — a corner at 0 disguised as a smooth expression. Sibling facts: lim⁡h→0hln⁡∣h∣=0\lim_{h\to0}h\ln|h|=0, lim⁡h→0sin⁡hh=1\lim_{h\to0}\dfrac{\sin h}{h}=1.

Derivative from first principles

f′(c)=lim⁡h→0f(c+h)−f(c)hf'(c) = \lim_{h \to 0} \dfrac{f(c+h) - f(c)}{h}

Worked example

For f(x)=x2ln⁡∣x∣f(x)=x^2\ln|x| with f(0)=0f(0)=0, find f′(0)f'(0).
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2018 · Q74Moderate

Example 6 · Differentiation · Differentiability of Absolute Value, Piecewise, and Greatest Integer Functions

For f(x)=x2ln⁡∣x∣f(x)=x^2\ln|x| (x≠0x\ne0), f(0)=0f(0)=0, what is f′(0)f'(0)?

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (2)

Watch out for (3)

Test yourself on Differentiation

15 past NDA questions from this chapter, timed at 19 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.

Related notes