Epsilon delta proof of nested sine function

epsilon-delta

I know that $\lim_{x->0}f(x)=\pi$ and $\lim_{x->\pi}\sin(x)=0$.
I have to prove that $\lim_{x->\pi}f(\sin(x))=\pi$ using the epsilon delta proof.
My idea was to use the value of $\delta=MAX(\delta_1,\delta_2)$ where $0<|x|<\delta_1$ and $0<|x-\pi|<\delta_2$. Then $|f(x)-\pi|<\epsilon$ and $|\sin(⁡x)|<\epsilon$.
Let $\epsilon>0$ and take $\delta=MAX(\delta_1,\delta_2)$.
Assume $0<|\sin(x)-\pi|<\delta$. Then $|f(x)-\pi|<\epsilon$ and $|\sin(⁡x)|<\epsilon$. Can I from that somehow conclude that $|f(\sin(x))-\pi|<\epsilon$?

Best Answer

Let $\varepsilon>0$ be fixed. Since $f(x)\to\pi$ as $x\to 0$, there is some $\delta'>0$ such that

$$\left|f(x)-\pi\right|<\varepsilon$$

whenever $\left|x\right|<\delta'$. Similarly, since $\sin(x)\to0$ as $x\to\pi$, there is some $\delta>0$ such that

$$\left|\sin(x)\right|<\delta'$$

whenever $\left|x-\pi\right|<\delta$. Combining these we notice that we have the implications

$$\left|x-\pi\right|<\delta \implies \left|\sin(x)\right|<\delta' \implies \left|f(\sin(x))-\pi\right|<\varepsilon.$$

Thus

$$\left|f(\sin(x))-\pi\right|<\varepsilon$$

whenever $\left|x-\pi\right|<\delta$, which proves the assertion.