JEE Challenger
More from Continuity and Differentiability

Differentiability Analysis of Piecewise Absolute Cosine Function

Consider a real-valued function defined by:

f(x)={∣x2cos⁡(πx)∣,x≠00,x=0,x∈Rf(x) = \begin{cases} \left| x^2 \cos \left(\frac{\pi}{x}\right) \right|, & x \neq 0 \\ 0, & x = 0 \end{cases}, \quad x \in \mathbb{R}

Then ff is:

Options

A

differentiable at both x=0x = 0 and x=2x = 2

B

differentiable at x=0x = 0 but non-differentiable at x=2x = 2

Correct
C

non-differentiable at x=0x = 0 but differentiable at x=2x = 2

D

differentiable neither at x=0x = 0 nor at x=2x = 2

Step-by-Step Solution

To determine the differentiability of the function

f(x)={∣x2cos⁡(πx)∣,x≠00,x=0f(x) = \begin{cases} \left| x^2 \cos \left(\frac{\pi}{x}\right) \right|, & x \neq 0 \\ 0, & x = 0 \end{cases}

at x=0x = 0 and x=2x = 2, we analyze each point using the fundamental definition of differentiability.


1. Differentiability at x=0x = 0

By definition, the derivative of f(x)f(x) at x=0x = 0 is given by: f′(0)=lim⁡h→0f(0+h)−f(0)hf'(0) = \lim_{h \to 0} \frac{f(0+h) - f(0)}{h}

Substituting f(0)=0f(0) = 0 and f(h)=∣h2cos⁡(πh)∣=h2∣cos⁡(πh)∣f(h) = \left| h^2 \cos \left(\frac{\pi}{h}\right) \right| = h^2 \left| \cos \left(\frac{\pi}{h}\right) \right| for h≠0h \neq 0: f′(0)=lim⁡h→0h2∣cos⁡(πh)∣−0h=lim⁡h→0h∣cos⁡(πh)∣f'(0) = \lim_{h \to 0} \frac{h^2 \left| \cos \left(\frac{\pi}{h}\right) \right| - 0}{h} = \lim_{h \to 0} h \left| \cos \left(\frac{\pi}{h}\right) \right|

Since 0≤∣cos⁡(πh)∣≤10 \le \left| \cos \left(\frac{\pi}{h}\right) \right| \le 1 for all h≠0h \neq 0, we have: −∣h∣≤h∣cos⁡(πh)∣≤∣h∣-\left| h \right| \le h \left| \cos \left(\frac{\pi}{h}\right) \right| \le \left| h \right|

Applying the Squeeze (Sandwich) Theorem: lim⁡h→0(−∣h∣)=0andlim⁡h→0∣h∣=0\lim_{h \to 0} \left(-\left| h \right|\right) = 0 \quad \text{and} \quad \lim_{h \to 0} \left| h \right| = 0

Therefore, f′(0)=lim⁡h→0h∣cos⁡(πh)∣=0f'(0) = \lim_{h \to 0} h \left| \cos \left(\frac{\pi}{h}\right) \right| = 0

Since f′(0)f'(0) exists and is finite, ff is differentiable at x=0x = 0.


2. Differentiability at x=2x = 2

Let g(x)=x2cos⁡(πx)g(x) = x^2 \cos\left(\frac{\pi}{x}\right) so that f(x)=∣g(x)∣f(x) = |g(x)| near x=2x = 2.

At x=2x = 2: g(2)=22cos⁡(π2)=4×0=0g(2) = 2^2 \cos\left(\frac{\pi}{2}\right) = 4 \times 0 = 0

Now, we evaluate the derivative of g(x)g(x) at x=2x = 2: g′(x)=2xcos⁡(πx)+x2(−sin⁡(πx))⋅(−πx2)=2xcos⁡(πx)+πsin⁡(πx)g'(x) = 2x \cos\left(\frac{\pi}{x}\right) + x^2 \left( -\sin\left(\frac{\pi}{x}\right) \right) \cdot \left( -\frac{\pi}{x^2} \right) = 2x \cos\left(\frac{\pi}{x}\right) + \pi \sin\left(\frac{\pi}{x}\right)

Evaluating at x=2x = 2: g′(2)=2(2)cos⁡(π2)+πsin⁡(π2)=4(0)+π(1)=π≠0g'(2) = 2(2) \cos\left(\frac{\pi}{2}\right) + \pi \sin\left(\frac{\pi}{2}\right) = 4(0) + \pi(1) = \pi \neq 0

Now, let's find the Left-Hand Derivative (LHD) and Right-Hand Derivative (RHD) of f(x)f(x) at x=2x = 2:

  • Left-Hand Derivative (f′(2−)f'(2^-)): For x<2x < 2 (close to 22), πx>π2\frac{\pi}{x} > \frac{\pi}{2}, which implies cos⁡(πx)<0\cos\left(\frac{\pi}{x}\right) < 0, so g(x)<0g(x) < 0. Thus, f(x)=∣g(x)∣=−g(x)f(x) = |g(x)| = -g(x). f′(2−)=lim⁡x→2−−g(x)−0x−2=−g′(2)=−πf'(2^-) = \lim_{x \to 2^-} \frac{-g(x) - 0}{x - 2} = -g'(2) = -\pi

  • Right-Hand Derivative (f′(2+)f'(2^+)): For x>2x > 2 (close to 22), πx<π2\frac{\pi}{x} < \frac{\pi}{2}, which implies cos⁡(πx)>0\cos\left(\frac{\pi}{x}\right) > 0, so g(x)>0g(x) > 0. Thus, f(x)=∣g(x)∣=g(x)f(x) = |g(x)| = g(x). f′(2+)=lim⁡x→2+g(x)−0x−2=g′(2)=πf'(2^+) = \lim_{x \to 2^+} \frac{g(x) - 0}{x - 2} = g'(2) = \pi

Since f′(2−)≠f′(2+)f'(2^-) \neq f'(2^+) (−π≠π-\pi \neq \pi), ff is non-differentiable at x=2x = 2.


Conclusion

ff is differentiable at x=0x = 0 but non-differentiable at x=2x = 2.

Hence, the correct choice is B.