Give an example (both graph and formula) of a function $g: \mathbb{R} \rightarrow \mathbb{R}$(or justify why it is not possible), which at the point $x_0 = \pi$
1) is continuous and is not differentiable
2) is discontinuous and is differentiable
Can someone help me how to solve it? I have some troubles with it.
For case $1$, consider $$g(x) = \lvert x-\pi \rvert .$$ This function has a $V$-shaped graph with minimum at $\pi$.
Case $2$ is impossible, since differentiability at $x_0$ implies continuity at $x_0$.