I have a homework assignement due tomorrow morning and I have some idea on how to do this problem but I am not very sure.

Define functions f and g on [-1,1] by

$\displaystyle

f(x) = xcos(1/x), if \quad x \neq 0; $

$\displaystyle

f(x)= 0, if \quad x=0;

$

$\displaystyle

g(x) = cos(1/x), if \quad x \neq 0; $

$\displaystyle

g(x)= 0, if \quad x=0;

$

Prove that f is continous at 0 and that g is not continuous at 0. Explain why these functions are continuous at every other point in [-1,1].

So I was thinking for f(x) just using the definition of continuity:

$\displaystyle \left| f(0) - f(x) \right| = \left| 0 - xcos(1/x) \right| = \left| xcos(1/x)\right| < \left| x \right| \left| cos(1/x) \right| < \left| x \right| < \epsilon$

Choose $\displaystyle \delta = \epsilon $

$\displaystyle

\left| x- 0 \right| < \delta

$

Ok this proves that f is continuous at 0 right??

I am not entirely sure how to prove g(x) isn't continuous but also that these functions are continuous at every other points!

Any suggestion??