Question:
Prove using $\epsilon$-$\delta$ definition that if $g$ continous in $a$ and that if $f$ continuous in $g(a)$ then $f\circ g$ is continuous in $a$
Rem: I know that there is a similar question here but this not the same question of mine as I am asking a proof by definition.
My Answer:
1- By assumption we know that because:
(i) $g$ is continuous in $a$ we have by definition that $\forall \epsilon_1>0, \exists \delta_1 > 0 : \forall |x-a|< \delta_1 \Rightarrow |g(x)-g(a)| \epsilon_1$
(ii) $f$ is continuous in $g(a)$ we have by definition that $\forall \epsilon_2>0, \exists \delta_2 > 0 : \forall |y-g(a)|< \delta_2 \Rightarrow |f(y)-f(g(a))| < \epsilon_2$
In order to prove that $f(g(x))$ is continuous by $\epsilon - \delta$ definition at $x=a$, we must show that $\forall \epsilon > 0 , \exists \delta > 0 : \forall |x-a| < \delta \Rightarrow |f(g(x))-f(g(a))| < \epsilon $
2- Given that $f(x)$ is continuous at $g(a)$ then according to (ii) $\forall \epsilon_2>0, \exists \delta_2 > 0 : \forall |y-g(a)|< \delta_2 \Rightarrow |f(y)-f(g(a))| < \epsilon_2$
3- Now because $g(x)$ is continuous at $a$ the definition in (i) is correct forall $\epsilon_1>0$ it is in particular true in the case for $\epsilon_1 = \delta_2 $ so in such a case we have that for $ \epsilon_1 = \delta_2 $ it exists at least one $\delta_2 > 0$ such that for $x$ verifying $|x-a| < \delta_1$ we have that $ |g(x)-g(a)| < \delta_2 = \epsilon_1$
4- Now let fixe one $\epsilon > 0 $
according to "3-" we can choose $\delta = \delta_1 > 0$ such that all the $x$ verifying $|x-a| < \delta_1 $ verify too that $|g(x)-g(a)| < \delta_2$
according to "2-" by the continuity of $f$ at $g(a)$ it implies that $|f(g(x))-f(g(a))|<\epsilon$
And this finish my prove because it is valable for any fixed $\epsilon > 0 $
Q.E.D.
Is it correct? especially part -3 and -4.