JEE Corner — Piecewise Functions and Substitution Tricks
Pattern 1 — Constants That Make a Function Continuous or Differentiable
JEE Main's favourite question from this chapter: a piecewise function with unknown constants, and the demand that it be continuous — or the stricter demand that it be differentiable — at the joint.
Continuity at the joint x=c: equate three things — LHL, RHL, f(c). One equation per unknown usually.
Differentiability at the joint:two conditions — first continuity (always check it; differentiability presumes it), then equality of the one-sided derivatives. Two equations, so typically two unknowns.
Worked template:f(x)={ax2+1,x+a,x≤1x>1 differentiable at x=1: continuity gives a+1=1+a (automatic here); matching slopes gives 2axx=1=1, so a=21.
When the piece at the joint is a limit-form like 3xsin5x or x21−cos2x, the constant is just the standard limit: limx→0xsinkx=k, limx→0x21−coskx=2k2, limx→0xekx−1=k, limx→0xlog(1+kx)=k.
Pattern 2 — Counting Kinks
Every ∣x−a∣ contributes a corner at a and smoothness everywhere else, and sums of moduli stack their corners. So:
∣x−1∣+∣x−3∣: non-differentiable at exactly x=1 and x=3.
∣x∣+∣x−1∣+∣x+1∣: exactly three bad points, −1,0,1.
∣sinx∣: corners wherever sinx=0with nonzero slope — every multiple of π.
General kink principle: ∣f(x)∣ picks up a corner at each simple zero of f (where f=0 but f′=0); at a zero of even multiplicity — like x2 at 0 — the graph touches smoothly and no corner forms. And one exotic specimen worth knowing: f(x)=x2sinx1 (with f(0)=0) is differentiable even at0 — the squeeze gives f′(0)=0 — showing differentiability at a point can coexist with wild oscillation nearby.
Pattern 3 — The Substitution Dictionary
Before differentiating any inverse-trig expression, try to collapse it:
See
Substitute
Get
2x1−x2
x=sinθ
sin2θ
1+x22x, 1+x21−x2, 1−x22x
x=tanθ
sin2θ, cos2θ, tan2θ
2x2−1
x=cosθ
cos2θ
3x−4x3
x=sinθ
sin3θ
1+sinxcosx
—
tan(4π−2x)
Each collapse turns a quotient-rule marathon into differentiating 2θ or 3θ — watch the interval, which decides the sign.
Pattern 4 — Differentiating One Function w.r.t. Another
"Differentiate u w.r.t. v" means dvdu=dv/dxdu/dx — compute both x-derivatives and divide. E.g. the derivative of ex w.r.t. x is 1/(2x)ex=2xex.
Worked Examples
Example 1 — A limit-form continuity constant
Find k so that f(x)=⎩⎨⎧x21−cos2x,k,x=0x=0 is continuous at 0.
Step 1 — the standard limit:1−cos2x=2sin2x, so x21−cos2x=2(xsinx)2→2.
Answer:k=2 — continuity at a removable point just means "set the value equal to the limit".
Example 2 — A differentiability constant
Find a so that f(x)={ax2+1,x+a,x≤1x>1 is differentiable at x=1.
Step 1 — continuity first: LHL =a+1, RHL =1+a — equal for every a; no constraint yet.
Step 2 — match the one-sided derivatives: left slope 2ax1=2a; right slope 1.
Answer:2a=1, so a=21 — the differentiability demand adds the equation that continuity alone could not supply.
Example 3 — Two constants across three pieces
Find a and b so that f(x)=⎩⎨⎧1,ax+b,7,x≤33<x<5x≥5 is continuous.
Step 1 — joint at 3:3a+b=1.
Step 2 — joint at 5:5a+b=7.
Step 3 — solve the pair: subtracting, 2a=6, so a=3 and b=1−9=−8.
Answer:a=3, b=−8 — the middle line must hit both flat pieces exactly.
Example 4 — Counting kinks in a modulus sum
At how many points is f(x)=∣x−1∣+∣x−3∣ not differentiable?
Step 1 — one corner per modulus: corners can only occur at x=1 and x=3.
Step 2 — check they survive: near x=1 the second term equals the linear function 3−x, which is smooth — so the corner of the first term is undisturbed; symmetrically at x=3.
Answer: exactly 2 points — continuous everywhere, corners at 1 and 3.
Example 5 — The oscillating exception
Show that f(x)={x2sinx1,0,x=0x=0 is differentiable at 0.
Step 1 — the difference quotient:hf(h)−f(0)=hsinh1.
Step 2 — squeeze:hsinh1≤∣h∣→0.
Answer:f′(0)=0 exists — the x2 factor tames the infinite oscillation of sinx1. (With xsinx1 instead, the quotient becomes sinh1, which has no limit — not differentiable. The power of x decides.)
Example 6 — Dictionary collapse with a sine substitution