Prove that the function is continuous and differentiable (not as easy as it sounds imo) From an old exam:

The not-necessary-continuous function $f: \mathbb{R} \rightarrow
\mathbb{R}$ is given. We know that $|f(x)| < 1$ for all $x \in
\mathbb{R}$.
Let $a(x) = (x-3)f(x)$ and $b(x) = (x-3)^{2}f(x)$.
  
  
*
  
*Prove that $a$ is continuous at $x_{0}=3$
  
*Prove that $b$ is differentiable at $x_{0}=3$
  

1.We need to show that left and right side limit are the same. If that's the case, the function is continuous:
$$\lim_{x\rightarrow 3^{-}}\left((x-3)f(x)) \right )= (3-3)\cdot f(3)= 0 \cdot f(3)= 0$$
$$\lim_{x\rightarrow 3^{+}}\left((x-3)f(x)) \right )= (3-3)\cdot f(3)= 0 \cdot f(3)= 0$$
Thus the function $a$ is continuous at $x_{0}=3$.
2.I will use difference-quotient for proving differentiability:
$$\lim_{x\rightarrow 3^{-}}\left ( \frac{b(x)-b(x_{0})}{x-x_{0}} \right )= \lim_{x\rightarrow 3^{-}} \left ( \frac{(x-3)^{2}f(x)-(3-3)^{2}f(3)}{x-3} \right ) =  \lim_{x\rightarrow 3^{-}} \frac{(x-3)^{2}f(x)-0 \cdot f(3)}{x-3}= \lim_{x\rightarrow 3^{-}}\frac{(x-3)^{2}f(x)}{x-3}= \lim_{x\rightarrow 3^{-}}(x-3)f(x) = 0$$
Apply same for the right side and get $0$ as well. Thus $b$ is differentiable at $x_{0} = 3$.
Did I do this task correctly or it's completely wrong..? :o
 A: You started off correctly but in flow used the wrong result that $\lim_{x \to 3}f(x) = f(3)$. This is not known in advance as we don't know whether $f$ is continuous or not. Another problem is that you are trying to deal with both $x \to 3^{-}$ and $x \to 3^{+}$ separately. This is required only when the definition of function concerned is different for cases $x < 3$ and $x > 3$.
You only to need to prove one result here and that is $$\lim_{x \to 3}(x - 3)f(x) = 0$$ and this is easily done by using Squeeze theorem. Let $a(x) = (x - 3)f(x)$ then we know that $$0 \leq |a(x)| = |(x - 3)||f(x)| \leq |x - 3|$$ because we know that $|f(x)| \leq 1$. Thus by Squeeze theorem we get $$\lim_{x \to 3}|a(x)| = 0$$ Further $$-|a(x)| \leq a(x)\leq |a(x)|$$ and again applying Squeeze theorem gives us $$\lim_{x \to 3}a(x) = 0$$ Now note that $a(3) = 0$ so $a$ is continuous at $3$.
The second part about $b(x)$ is easy if you know the first part.

As requested by OP here is an approach via $\epsilon-\delta$ definition. As I have mentioned in comments this definition can not be used to evaluate a limit of a function, but it can be used to check whether a number is a limit of the function or not. So in this method we need to guess the limit somehow.
For the current we are asked to prove that $a(x)$ is continuous at $x_{0} = 3$. By definition of continuity this is equivalent to proving that $\lim_{x \to 3}a(x) = a(3)$. Now $a(3) = 0$ so we have to prove that $\lim_{x \to 3}a(x) = 0$. So you see that the question itself has given you the limit $0$ so that the trouble of guessing the limit is not here. Lucky!!
Now to prove that $\lim_{x \to 3}a(x) = 0$ we need to ensure that for every $\epsilon > 0$ there is a number $\delta > 0$ such that $$|a(x) - 0| < \epsilon$$ whenever $0 < |x - 3| < \delta$. Thus we need to start with an $\epsilon > 0$ and somehow try to find a suitable $\delta > 0$ (depending on $\epsilon$) such that $|a(x)| < \epsilon$ whenever $0 < |x - 3| < \delta$.
Now let $\epsilon > 0$ be given. Our goal to satisfy the inequality $$|a(x)| < \epsilon$$ or $$|(x - 3)f(x)| < \epsilon$$ Now note that $|f(x)| < 1$ so we already know that $$|(x - 3)f(x)| = |x - 3| |f(x)| < |x - 3|$$ and hence if we can get $|x - 3| < \epsilon$ then automatically we will have $$|a(x)| < |x - 3| < \epsilon$$ and our goal will be achieved. Thus we can take $\delta = \epsilon$ here and then $0 < |x - 3| < \delta$ will imply $0 < |x - 3| < \epsilon$ and this will imply that $|a(x)| < \epsilon$. Our proof is now complete and $\lim_{x \to 3}a(x) = 0$.
A: 
$$\lim_{x\rightarrow 3^{-}}\left((x-3)f(x)) \right )= (3-3)\cdot f(3)= 0 \cdot f(3)= 0$$

Wrong. You implicitly assume several things here:


*

*That $\lim_{x\to 3^-} (x-3)f(x)=\lim_{x\to 3^-}(x-3)\cdot \lim_{x\to 3^-} f(x)$

*That $\lim_{x\to 3^-} f(x)$ exists

*That $\lim_{x\to 3^-}=f(3)$.


none of these things are neccesarily true from what you know!

A much easier approach to prove that $a(x)$ is continuous is to go from the $\epsilon-\delta$ definition. You can


*

*Simply calculate what $a(0)$ is

*Prove that for each $\epsilon$, taking a small enough $\delta $ will cause $|a(x)-a(3)|$ to be smaller than $\epsilon$ if $|x-3|<\delta$


Hint:
$|a(x)| = |(x-3)f(x)| = |x-3||f(x)|$
now, can you estimate one of those two factors? What do you know about $f$?
