How to Determine Differentiability of a Piecewise Function at a Point
Problem
Determine differentiability of function f(x) = x/2 if x ∈ ℚ, f(x) = x if x ∉ ℚ at x = 0
🎯 What You'll Learn
- Apply derivative definition rigorously
- Understand differentiability conditions
- Analyze complex function limits
Prerequisites: Limit concept, Function definition, Rational/irrational number understanding
💡 Quick Summary
This problem asks us to determine whether a piecewise function is differentiable at x = 0, where the function equals x/2 for rational inputs and x for irrational inputs. The key approach is to examine the derivative limit by checking what happens to the difference quotient f(h)/h as h approaches 0 from different types of numbers. The crucial insight is that since both rational and irrational numbers are dense around 0, we can approach zero through rational sequences (giving a derivative of 1/2) or irrational sequences (giving a derivative of 1). Since these two approaches yield different values and 1/2 ≠ 1, the derivative limit doesn't exist, so the function is not differentiable at x = 0. This beautifully illustrates how a function can be continuous at a point but still fail to be differentiable due to conflicting directional behaviors!
Step-by-Step Explanation
1. What We're Solving:
We have a piecewise function that behaves differently for rational and irrational numbers:- f(x) = x/2 when x is rational (x ∈ ℚ)
- f(x) = x when x is irrational (x ∉ ℚ)
2. The Approach:
To check differentiability at x = 0, we need to see if the derivative limit exists: $$\lim_{h \to 0} \frac{f(h) - f(0)}{h}$$Since our function is piecewise, we'll need to be clever about how we approach this limit. The key insight is that we can approach 0 through different types of numbers (rationals vs. irrationals) and see if we get the same limit!
3. Step-by-Step Solution:
Step 1: Find f(0) Since 0 is rational, f(0) = 0/2 = 0. Great!
Step 2: Set up the difference quotient We need: $\lim_{h \to 0} \frac{f(h) - f(0)}{h} = \lim_{h \to 0} \frac{f(h) - 0}{h} = \lim_{h \to 0} \frac{f(h)}{h}$
Step 3: Consider what happens as h approaches 0 Here's where it gets interesting! As h approaches 0, we have:
- When h is rational: $\frac{f(h)}{h} = \frac{h/2}{h} = \frac{1}{2}$
- When h is irrational: $\frac{f(h)}{h} = \frac{h}{h} = 1$
- Any neighborhood of 0 contains infinitely many rational numbers
- Any neighborhood of 0 contains infinitely many irrational numbers
For the limit to exist, ALL sequences approaching 0 must give the same value for the difference quotient.
4. The Answer:
The function f(x) is NOT differentiable at x = 0.The derivative limit doesn't exist because:
- Approaching through rational numbers gives us a derivative of 1/2
- Approaching through irrational numbers gives us a derivative of 1
- Since 1/2 ≠ 1, the limit doesn't exist
5. Memory Tip:
Think of this as a "split personality" function at x = 0! Even though the function is continuous at 0 (both pieces give f(0) = 0), it "can't decide" what slope it wants to have. Rationals pull it toward slope 1/2, while irrationals pull it toward slope 1. This tug-of-war means no single derivative exists!This is a perfect example of why differentiability is stronger than continuity - a function can be continuous but still fail to be differentiable when it has conflicting "directional behaviors."
⚠️ Common Mistakes to Avoid
- Incorrectly applying derivative limit definition
- Overlooking different function behaviors
- Not carefully examining limit behavior at zero
This explanation was generated by AI. While we work hard to be accurate, mistakes can happen! Always double-check important answers with your teacher or textbook.

Meet TinyProf
Your child's personal AI tutor that explains why, not just what. Snap a photo of any homework problem and get clear, step-by-step explanations that build real understanding.
- ✓Instant explanations — Just snap a photo of the problem
- ✓Guided learning — Socratic method helps kids discover answers
- ✓All subjects — Math, Science, English, History and more
- ✓Voice chat — Kids can talk through problems out loud
Trusted by parents who want their kids to actually learn, not just get answers.

TinyProf
📷 Problem detected:
Solve: 2x + 5 = 13
Step 1:
Subtract 5 from both sides...
Join our homework help community
Join thousands of students and parents helping each other with homework. Ask questions, share tips, and celebrate wins together.

Need help with YOUR homework?
TinyProf explains problems step-by-step so you actually understand. Join our waitlist for early access!