Q.Does there exist a function which is continuous everywhere but not differentiable at exactly two points? Justify your answer.
🔒You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
🔒 Start your 10-day free trial to unlock the full solution →Concept understanding — Continuity Differentiability Relationship
How Continuity and Differentiability Are Related
Two properties describe how "well-behaved" a function is at a point. Continuity means the graph has no break there — you can draw through the point without lifting your pen. Differentiability means the graph is smooth there — it has one definite tangent line, so a well-defined slope f′(a). This concept is about the exact link between the two.
The theorem: If f is differentiable at x=a, then f is continuous at x=a.
Why differentiability forces continuity
If f′(a) exists, then
limx→a(f(x)−f(a))=limx→ax−af(x)−f(a)⋅(x−a)=f′(a)⋅0=0.
So limx→af(x)=f(a), which is exactly continuity at a. A curve that has a tangent cannot also have a jump — a break would send the difference quotient to infinity and the derivative would not exist.
The converse is FALSE
Continuity does not guarantee differentiability. A graph can be unbroken yet still have a sharp corner, and a corner has no single tangent.
The classic counterexample is f(x)=∣x∣ at x=0. It is continuous there (limx→0∣x∣=0=f(0)), but the slope from the left is −1 and from the right is +1. Since these disagree, f′(0) does not exist.
Putting it together
- Differentiable at a ⇒ continuous at a.
- Continuous at a ⇒ differentiable at a.
- Not continuous at a ⇒ not differentiable at a (the contrapositive of the theorem). …
Concept: Continuity Differentiability Relationship — a function can be continuous everywhere yet fail to be differentiable at isolated corner points.
Take f(x)=∣x∣+∣x−1∣.
- It's continuous everywhere, being a sum of the continuous functions ∣x∣ and ∣x−1∣.
- Piecewise: f(x)=1−2x for x<0, f(x)=1 for 0≤x≤1, f(x)=2x−1 for x>1.
- At x=0: left derivative −2= right derivative 0 — not differentiable. …
Yes — for example f(x)=∣x∣+∣x−1∣ is continuous everywhere but not differentiable at exactly the two points x=0 and x=1.
Differentiability is a stricter requirement than continuity: a function can be unbroken (continuous) yet still have a sharp corner at isolated points, where no single tangent line exists. The absolute value function ∣x∣ is the standard example of one corner, at x=0. To get exactly two non-differentiable points, add together two absolute-value functions with corners at two different locations.
Step 1 — Construct the function.
Let f(x)=∣x∣+∣x−1∣, which has potential corners at x=0 (from ∣x∣) and x=1 (from ∣x−1∣).
Step 2 — Continuity.
Each of ∣x∣ and ∣x−1∣ is continuous on R (absolute value of a continuous function is continuous), so their sum f is continuous everywhere, by the algebra of continuous functions.
Step 3 — Write f piecewise.
f(x)=⎩⎨⎧(−x)+(1−x)=1−2xx+(1−x)=1x+(x−1)=2x−1x<00≤x≤1x>1
Step 4 — Check differentiability at x=0.
Left-hand derivative (from the x<0 piece 1−2x): slope −2. Right-hand derivative (from the 0≤x≤1 piece, constant 1): slope 0. Since −2=0, f is not differentiable at x=0.
Step 5 — Check differentiability at x=1. …
Method: Constructing a Function with Exactly n Non-Differentiable Points
To build a function that is continuous everywhere but fails to be differentiable at exactly a chosen finite set of points, sum shifted copies of ∣x∣ — each copy contributes exactly one corner, at the point it's shifted to.
Steps
Step 1: Recall that g(x)=∣x∣ is continuous everywhere but has one non-differentiable point (a corner at x=0, where the left and right derivatives disagree)
Step 2: Shift the corner to any desired point c by using ∣x−c∣ instead
Step 3: Sum several shifted copies, one for each desired non-differentiable point
A sum of continuous functions is always continuous, so the sum stays continuous everywhere. Differentiability fails only where at least one individual term has a corner.
Step 4: Verify each corner point explicitly by computing the left-hand and right-hand derivatives there …
Common Mistakes
Mistake 1: Only checking that the corners "look like" they should be non-differentiable, without computing the one-sided derivatives explicitly.
Why it's wrong: a "show that" / "justify your answer" question requires the explicit left-hand and right-hand derivative computation at each claimed corner — an intuitive appeal to the shape of ∣x−c∣ is not a complete justification on its own. Correct approach: write out the piecewise formula near each corner and compute both one-sided derivatives.
Mistake 2: Assuming continuity is "automatic" without stating why the sum of two absolute-value functions is continuous. …
- JEE Main 2026Set 2026-01-24-s14 marksMCQQ.Let α, β ∈ R be such that the function f(x) = { 2α(x² − 2) + 2βx , x < 1 ; (α + 3)x + (α − β) , x ≥ 1 } be differentiable at all x ∈ R. Then 34(α + β) is equal to (A) 24 (B) 84 (C) 36 (D) 48
›Reveal solutionSolution
Matching the function and its derivative at the junction point x=1 gives two linear equations in α,β, solving which yields 34(α+β)=48.
A piecewise function is differentiable at the join point only if it is first continuous there, and second has equal one-sided derivatives — both conditions must be imposed.
- Continuity at x=1: 2α(1−2)+2β(1)=(α+3)(1)+(α−β), i.e. −2α+2β=2α+3−β, giving 3β−4α=3.
Continuity: equal values at x=1; Differentiability: equal derivatives at x=1
- Derivative matching: LHS derivative is 4αx+2β, at x=1 gives 4α+2β; RHS derivative is α+3 (constant). So 4α+2β=α+3, giving 3α+2β=3. …
- JEE Main 2025Set 2025-04-04-s14 marksQ.Let m and n be the number of points at which the function f(x) = max{x, x^3, x^5, ... x^21}, x ∈ R, is not differentiable and not continuous, respectively. Then m + n is equal to ______.
›Reveal solutionSolution
The maximum of several continuous functions is always continuous; non-differentiability can only occur where the "winning" function switches. Tracking which power wins in each range of x pins down exactly three corners.
Since f is the pointwise maximum of finitely many functions that are each continuous and differentiable on all of R (x,x3,…,x21), f itself is continuous everywhere — a maximum of continuous functions cannot create a jump. So n=0.
- For x>1: since xa<xb whenever a<b for x>1, the largest power wins throughout: f(x)=x21.
- For 0<x<1: here xa>xb whenever a<b (powers shrink as the exponent grows), so the smallest power wins throughout: f(x)=x.
- For −1<x<0: all values are negative; ∣x∣a>∣x∣b for a<b means xa is more negative for small exponents, so the largest (least negative) value comes from the biggest exponent: f(x)=x21 throughout.
- For x<−1: now ∣x∣a<∣x∣b for a<b, so the smallest exponent gives the least negative (largest) value: f(x)=x throughout.
So
f(x)=⎩⎨⎧x,x21,x,x21,x≤−1−1≤x≤00≤x≤1x≥1
(all pieces agree at the junction values, so f is continuous). …
- JEE Main 2024Set 2024-01-27-s24 marksMCQQ.Consider the function f:(0,2)→R defined by f(x)=2x+x2 and the function g(x) defined by g(x)=⎩⎨⎧min{f(t)},23+x,0<t≤x and 0<x≤11<x<2 Then: (A) g is continuous but not differentiable at x=1 (B) g is not continuous for all x∈(0,2) (C) g is neither continuous nor differentiable at x=1 (D) g is continuous and differentiable for all x∈(0,2)
›Reveal solutionSolution
Compute g on (0,1] as the running minimum of f, check continuity and differentiability at the join x=1.
- For f(t)=t/2+2/t on (0,∞), f′(t)=1/2−2/t2=0 gives t=2, a minimum. On (0,x] with x≤1, f is decreasing (since t<2), so the minimum over (0,x] is attained at t=x:
g(x)=f(x)=2x+x2,0<x≤1.
- At x=1: left value g(1)=1/2+2=5/2; right branch limit limx→1+(3/2+x)=5/2. So g is continuous at x=1 (and clearly continuous elsewhere). …
- JEE Main 2023Set 2023-01-24-s24 marksMCQQ.Let f(x) = \begin{cases} x^2 \sin(1/x), & x \neq 0 \ 0, & x = 0 \end{cases}. Then at x = 0 (A) f is continuous but not differentiable (B) f is continuous but f' is not continuous (C) f and f' both are continuous (D) f' is continuous but not differentiable
›Reveal solutionSolution
Compute f′ explicitly away from 0 and compare its limit there to its actual value at 0.
- f(0)=0 and limx→0x2sin(1/x)=0 (bounded × vanishing), so f is continuous at 0.
- f′(0)=limh→0hh2sin(1/h)−0=limh→0hsin(1/h)=0, so f′(0) exists.
- For x=0: f′(x)=2xsin(1/x)−cos(1/x) (product and chain rule). …
- JEE Main 2022Set 2022-06-26-s24 marksMCQQ.Let f(x) = min{1, 1 + sinx}, 0 ≤ x ≤ 2π. If m is the number of points, where f is not differentiable and n is the number of points, where f is not continuous, then the ordered pair (m, n) is equal to: (A) (2, 0) (B) (1, 0) (C) (1, 1) (D) (2, 1)
›Reveal solutionSolution
f is continuous everywhere but fails differentiability at exactly one point, giving (m,n)=(1,0).
- min{1,1+sinx}=1 whenever sinx≥0 (true for x∈[0,π]), and =1+sinx whenever sinx≤0 (true for x∈[π,2π]).
- At x=π (the only junction, since the min is continuous as the minimum of two continuous functions), both pieces evaluate to 1, so f is continuous on all of [0,2π] -- n=0. …
- JEE Main 2021Set 2021-07-20-s24 marksQ.Let a function g: [0,4] → R be defined as g(x) = max(0≤t≤x) (t³ - 6t² + 9t - 3) for 0 ≤ x ≤ 3, and g(x) = 4 - x for 3 < x ≤ 4. Then the number of points in the interval (0,4) where g(x) is NOT differentiable, is ________.
›Reveal solutionSolution
The running maximum of the cubic is smooth at x=1 (slope matches the flat piece that follows) but has a genuine corner at x=3, giving exactly one point of non-differentiability in (0,4).
- Let h(t)=t3−6t2+9t−3. Then h′(t)=3t2−12t+9=3(t−1)(t−3), so h increases on [0,1], decreases on [1,3].
- h(0)=−3, h(1)=1−6+9−3=1, h(3)=27−54+27−3=−3. Since h never exceeds h(1)=1 again after t=1 on [1,3], the running maximum g(x)=max0≤t≤xh(t) equals h(x) on [0,1] and the constant 1 on [1,3].
- At x=1: left-hand derivative is h′(1)=3(0)(−2)=0; right-hand derivative (constant piece) is also 0. The function value also matches (h(1)=1), so g is differentiable at x=1. …
- JEE Main 2021Set 2021-07-22-s24 marksQ.Let f: R → R be a function defined as f(x) = 3(1 − |x|/2), if |x| ≤ 2, and f(x) = 0, if |x| > 2. Let g: R → R be given by g(x) = f(x + 2) − f(x − 2). If n and m denote the number of points in R where g is not continuous and not differentiable, respectively, then n + m is equal to ______.
›Reveal solutionSolution
f is a continuous "tent" with sharp corners at −2,0,2; shifting and subtracting two copies leaves most corners intact, but the two copies' corners happen to cancel exactly at x=0.
- f(x)=3(1−∣x∣/2) on [−2,2], 0 elsewhere, is continuous everywhere, with non-differentiable "corner" points at x=−2,0,2 (slope jumps from +3/2 to −3/2 at the peak, and from ∓3/2 to 0 at the edges).
- g(x)=f(x+2)−f(x−2) is a difference of continuous functions, hence continuous everywhere: n=0.
- f(x+2)'s corners occur at x=−4,−2,0; f(x−2)'s corners occur at x=0,2,4. At x=−4,−2,2,4 only one of the two pieces has a corner (the other is smooth/flat there), so g inherits a genuine kink at each. …
- JEE Main 2021Set 2021-07-27-s24 marksMCQQ.Let f : [0, ∞) → [0, 3] be a function defined by f(x) = max{sin t : 0 ≤ t ≤ x}, for 0 ≤ x ≤ π, and f(x) = 2 + cos x, for x > π. Then which of the following is true? (A) f is continuous everywhere but not differentiable exactly at one point in (0, ∞) (B) f is differentiable everywhere in (0, ∞) (C) f is not continuous exactly at two points in (0, ∞) (D) f is continuous everywhere but not differentiable exactly at two points in (0, ∞)
›Reveal solutionSolution
f turns out to be continuous AND differentiable at both junction points, so it's smooth throughout (0,∞).
- For 0≤x≤π/2, sint is increasing on [0,x], so max[0,x]sint=sinx, giving f(x)=sinx.
- For π/2≤x≤π, the running maximum stays at sin(π/2)=1 (since sint decreases after π/2), so f(x)=1.
- For x>π, f(x)=2+cosx by definition.
- At x=π/2: left value sin(π/2)=1 equals right value 1 (continuous); left derivative cos(π/2)=0 equals right derivative 0 (differentiable). …
🎓Unlock everything free for 10 days
- ✓Full step-by-step solutions
- ✓Concept-first explanations
- ✓Methods, shortcuts & mistakes
- ✓PYQ mapping + timed mock tests
Full access for 10 days. No credit card required.