When Differentiation Gets Tricky: Handling Piecewise & Greatest Integer Functions
Master the art of differentiating discontinuous functions with step-by-step approaches for JEE Main & Advanced.
Why These Functions Are Challenging
Piecewise and greatest integer functions break the "smoothness" that standard differentiation rules assume. Based on JEE papers from 2015-2024, these functions appear in 3 out of every 4 calculus problems involving differentiation.
Key Challenge Points:
- Continuity Check must precede differentiability
- Left-hand & Right-hand derivatives must be equal
- Greatest Integer Function [[x]] is discontinuous at integers
- Piecewise junctions are critical points to examine
The Two-Step Approach: Continuity → Differentiability
For $f(x) = \begin{cases} f_1(x) & \text{if } x < a \\ f_2(x) & \text{if } x \geq a \end{cases}$
Check: $\lim_{x \to a^-} f(x) = \lim_{x \to a^+} f(x) = f(a)$
If continuous, check: $\lim_{h \to 0^-} \frac{f(a+h)-f(a)}{h} = \lim_{h \to 0^+} \frac{f(a+h)-f(a)}{h}$
Example: Check differentiability at x=1 for:
$f(x) = \begin{cases} x^2 & \text{if } x \leq 1 \\ 2x-1 & \text{if } x > 1 \end{cases}$
Continuity Check:
$\lim_{x \to 1^-} f(x) = 1^2 = 1$
$\lim_{x \to 1^+} f(x) = 2(1)-1 = 1$
$f(1) = 1$ ✓ Continuous
Differentiability Check:
LHD: $\lim_{h \to 0^-} \frac{(1+h)^2 - 1}{h} = \lim_{h \to 0^-} (2 + h) = 2$
RHD: $\lim_{h \to 0^+} \frac{[2(1+h)-1] - 1}{h} = \lim_{h \to 0^+} 2 = 2$
✓ Differentiable at x=1
Problem 1: Piecewise with Parameter
Find all values of $k$ for which $f(x) = \begin{cases} \frac{\sin x}{x} & \text{if } x \neq 0 \\ k & \text{if } x = 0 \end{cases}$ is differentiable at $x=0$.
Solution Approach:
Step 1: For differentiability at 0, function must be continuous at 0
$\lim_{x \to 0} f(x) = \lim_{x \to 0} \frac{\sin x}{x} = 1$
For continuity: $f(0) = \lim_{x \to 0} f(x) \Rightarrow k = 1$
Step 2: Check differentiability using first principles
$f'(0) = \lim_{h \to 0} \frac{f(h) - f(0)}{h} = \lim_{h \to 0} \frac{\frac{\sin h}{h} - 1}{h}$
$= \lim_{h \to 0} \frac{\sin h - h}{h^2} = \lim_{h \to 0} \frac{-\frac{h^3}{6} + \cdots}{h^2} = 0$
Step 3: Therefore, $f(x)$ is differentiable at $x=0$ only when $k=1$
Greatest Integer Function [[x]] Behavior
Critical Insight:
The greatest integer function $f(x) = [x]$ is:
- Discontinuous at all integer points
- Not differentiable at integer points
- Constant between integers, so derivative = 0 there
Example: $f(x) = x - [x]$ (Fractional Part Function)
At integer points:
Let $x = n$ where $n \in \mathbb{Z}$
LHD: $\lim_{h \to 0^-} \frac{(n+h) - [n+h] - (n - [n])}{h}$
$= \lim_{h \to 0^-} \frac{n+h - (n-1) - 1}{h} = \lim_{h \to 0^-} \frac{h}{h} = 1$
RHD: $\lim_{h \to 0^+} \frac{(n+h) - [n+h] - (n - [n])}{h}$
$= \lim_{h \to 0^+} \frac{n+h - n - 0}{h} = \lim_{h \to 0^+} \frac{h}{h} = 1$
Wait! Both limits equal 1? Let's check continuity first...
$\lim_{x \to n^-} (x - [x]) = n - (n-1) = 1$
$\lim_{x \to n^+} (x - [x]) = n - n = 0$
$f(n) = n - n = 0$
❌ Not continuous at integers ⇒ Not differentiable
Problem 2: Composite with Greatest Integer
Find the number of points where $f(x) = [x] + \sqrt{x - [x]}$ is not differentiable in $[0, 3]$.
Solution Approach:
Step 1: Let $x = n + t$ where $n = [x]$ and $t = x - [x] \in [0, 1)$
Then $f(x) = n + \sqrt{t}$
Step 2: Check differentiability at integer points $x = 1, 2$
At $x = 1$:
LHD: $\lim_{h \to 0^-} \frac{f(1+h)-f(1)}{h} = \lim_{h \to 0^-} \frac{(0 + \sqrt{1+h}) - 1}{h}$
Since for $h \to 0^-$, $1+h \in (0,1)$, so $[1+h] = 0$
RHD: $\lim_{h \to 0^+} \frac{f(1+h)-f(1)}{h} = \lim_{h \to 0^+} \frac{(1 + \sqrt{h}) - 1}{h}$
Step 3: Calculate limits
LHD $= \lim_{h \to 0^-} \frac{\sqrt{1+h} - 1}{h} = \frac{1}{2}$ (using binomial)
RHD $= \lim_{h \to 0^+} \frac{\sqrt{h}}{h} = \lim_{h \to 0^+} \frac{1}{\sqrt{h}} = \infty$
LHD ≠ RHD ⇒ Not differentiable at x=1
Step 4: Similarly, not differentiable at x=2
At x=0: Only RHD exists, so not differentiable
Answer: 3 points (x=0,1,2)
🚀 Quick Solving Strategies
For Piecewise Functions:
- Always check continuity before differentiability
- Junction points are prime suspects
- Calculate both LHD and RHD separately
- Watch for parameter conditions
For Greatest Integer Functions:
- Always discontinuous at integers
- Use substitution $x = n + t$, $t \in [0,1)$
- Check LHD and RHD at each integer
- Remember fractional part function pattern
Problems 3-8 Available in Full Version
Includes 6 more challenging JEE problems with mixed piecewise and greatest integer functions
📝 Quick Self-Test
Try these similar problems to test your understanding:
1. Check differentiability of $f(x) = |x-1| + |x-2|$ at x=1 and x=2
2. Find points of non-differentiability for $f(x) = [x^2]$ in $[0, 2]$
3. Determine if $f(x) = \begin{cases} x^2\sin(1/x) & x \neq 0 \\ 0 & x = 0 \end{cases}$ is differentiable at 0
Ready to Master All 8 Problems?
Get complete access to all problems with step-by-step video solutions and downloadable PDF