Differentiability Piecewise A29A24
1. **Problem Statement:** We are given a piecewise function:
$$f(x) = \begin{cases} x^2 \cos\left(\frac{\pi}{x}\right), & x \neq 0 \\ 0, & x = 0 \end{cases}$$
We need to determine the differentiability of $f$ at $x=0$ and $x=2$.
2. **Recall the definition of differentiability:** A function $f$ is differentiable at a point $a$ if the limit
$$\lim_{h \to 0} \frac{f(a+h) - f(a)}{h}$$
exists.
3. **Check differentiability at $x=0$: **
- Since $f(0) = 0$, compute
$$\lim_{h \to 0} \frac{f(h) - f(0)}{h} = \lim_{h \to 0} \frac{h^2 \cos\left(\frac{\pi}{h}\right)}{h} = \lim_{h \to 0} h \cos\left(\frac{\pi}{h}\right).$$
- Note that $|\cos(\frac{\pi}{h})| \leq 1$, so
$$|h \cos\left(\frac{\pi}{h}\right)| \leq |h|,$$
which tends to 0 as $h \to 0$.
- Therefore,
$$\lim_{h \to 0} h \cos\left(\frac{\pi}{h}\right) = 0,$$
so $f$ is differentiable at $x=0$ with $f'(0) = 0$.
4. **Check differentiability at $x=2$: **
- For $x \neq 0$, $f(x) = x^2 \cos\left(\frac{\pi}{x}\right)$ is a product of differentiable functions where defined.
- Both $x^2$ and $\cos\left(\frac{\pi}{x}\right)$ are differentiable at $x=2$.
- Hence, $f$ is differentiable at $x=2$.
5. **Conclusion:** $f$ is differentiable both at $x=0$ and $x=2$.
**Final answer:** (A) differentiable both at $x=0$ and $x=2$.