---
title: "Points of Non-Differentiability of a Mixed Modulus Function"
organization: "NityaDhi Digital Mathematics Lab (Asa Edtech Private Limited)"
url: "https://www.nityadhi.com/problems/hard-c12-w1-05-differentiability-product-modulus-trig"
board: "JEE Foundation"
grade: "Class 12"
published_at: "2026-11-24T15:00:00+05:30"
---

# Points of Non-Differentiability of a Mixed Modulus Function

Let $f: \mathbb{R} \to \mathbb{R}$ be defined by
$$f(x) = |x^2 - 4|\sin\left(\frac{\pi x}{2}\right) + |x^3 - 3x + 2| + |x - 1|\cos\left(\frac{\pi x}{2}\right).$$
Find all points $x \in \mathbb{R}$ at which $f(x)$ is **not** differentiable.

## Textbook Solution

**Step 1: Identify candidate points of non-differentiability**  
Each modulus expression $|g(x)|$ can only fail to be differentiable where $g(x) = 0$:  
- $x^2 - 4 = 0 \implies x = -2, 2$.  
- $x^3 - 3x + 2 = (x - 1)^2(x + 2) = 0 \implies x = 1, -2$.  
- $x - 1 = 0 \implies x = 1$.  
So the only candidate points are $x \in \{-2, 1, 2\}$.

**Step 2: Test $x = 2$**  
Near $x = 2$, $|x^3 - 3x + 2|$ and $|x - 1|\cos(\frac{\pi x}{2})$ are smooth ($C^\infty$). For $h_1(x) = |x^2 - 4|\sin(\frac{\pi x}{2})$:
$$\lim_{x \to 2^+} \frac{h_1(x) - h_1(2)}{x - 2} = \lim_{x \to 2^+} (x+2)\sin\left(\frac{\pi x}{2}\right) = 4 \sin \pi = 0,$$
$$\lim_{x \to 2^-} \frac{h_1(x) - h_1(2)}{x - 2} = \lim_{x \to 2^-} -(x+2)\sin\left(\frac{\pi x}{2}\right) = -4 \sin \pi = 0.$$
Thus $f$ is differentiable at $x = 2$.

**Step 3: Test $x = 1$**  
Near $x = 1$, $x^2 - 4 < 0$ so $|x^2-4|\sin(\frac{\pi x}{2})$ is smooth. Also $x + 2 > 0$, so $|(x-1)^2(x+2)| = (x-1)^2(x+2)$ is smooth. For $h_3(x) = |x-1|\cos(\frac{\pi x}{2})$:
$$\lim_{x \to 1^\pm} \frac{|x-1|\cos(\frac{\pi x}{2}) - 0}{x - 1} = \pm \cos\left(\frac{\pi}{2}\right) = 0.$$
Thus $f$ is differentiable at $x = 1$.

**Step 4: Test $x = -2$**  
Near $x = -2$:  
- $|x^2 - 4|\sin(\frac{\pi x}{2})$ is differentiable at $x = -2$ since $\sin(-\pi) = 0$.  
- $|x - 1|\cos(\frac{\pi x}{2})$ is smooth since $x - 1 = -3 \neq 0$.  
- However, $|x^3 - 3x + 2| = (x - 1)^2 |x + 2|$ has left-hand derivative $-(-2-1)^2 = -9$ and right-hand derivative $+(-2-1)^2 = +9$ at $x = -2$.  
Since the other two terms are differentiable at $x = -2$ and the middle term is not, $f$ is **not** differentiable at $x = -2$.

**Final Answer:** $x = -2$ (only $1$ point).

## Vedic Shortcut

**NityaDhi Corner-Cancellation Rule:**  
A sharp corner $|x - a| \cdot g(x)$ (with $g$ smooth) becomes **smooth** at $x = a$ if and only if $g(a) = 0$!  
- At $x = 2$: $|x-2|$ is multiplied by $\sin(\pi) = 0 \implies$ Smooth!  
- At $x = 1$: $|x-1|$ in term 2 has another factor $(x-1)$ (multiplicity 2), and in term 3 is multiplied by $\cos(\pi/2) = 0 \implies$ Smooth!  
- At $x = -2$: $|x+2|$ in term 2 is multiplied by $(x-1)^2 = 9 \neq 0 \implies$ Sharp corner!

## Common Mistakes

- Counting every zero inside a modulus sign ($-2, 1, 2$) without checking whether an accompanying factor vanishes at that point.  
- Forgetting that $|(x-1)^2|$ is $(x-1)^2$ everywhere and is always differentiable at $x = 1$.