Let $X = (-\pi/2,\pi/2), d_1(x,y) = | \tan x - \tan y|,\ d_2(x,y) = | x - y|$. Show that $d_1\sim d_2$, the space $(X,d_1)$ is complete, whereas the space $(X,d_2)$ is not. Conclude that completeness is not topological invariant.
For the first metric, I know that $((−\pi/2,\pi/2),d_1)$ is isometric to $(\mathbb R,d_\mathbb R)$ where $d_\mathbb R$ is standard distance in $\mathbb R$. So by using this fact, I found $(X,d_1)$ is complete. But I could not find a counter example for the second metric and also how can I show that $d_1\sim d_2$?
To show $d_1 \sim d_2$ it is enough to show that for an arbitrary open ball $B_2(x_0, r)$ with respect to $d_2$, there exists $r' > 0$ such that $B_1(x_0, r') \subseteq B_2(x_0, r)$, and vice versa.
Let $x, y \in X$. Using the mean value theorem, we have:
$$\left|\tan x - \tan y\right| = \frac1{\cos^2\theta}|x - y|$$ for some $\theta \in \langle x, y\rangle$.
Therefore:
$$|x - y| = (\cos^2\theta)\cdot\left|\tan x - \tan y\right| \le \left|\tan x - \tan y\right|$$
Hence, for any ball $B_2(x_0, r)$ we have $B_1(x_0, r) \subseteq B_2(x_0, r)$.
Now let $B_1(x_0, r)$ be a ball with respect to $d_1$.
Since $\tan$ is continuous, taking $\varepsilon = r$, there exists a $\delta > 0$ such that $$|x - x_0| < \delta \implies \left|\tan x - \tan x_0\right| < r$$ Therefore, $B_2(x_0, \delta) \subseteq B_1(x_0, r)$.
Hence, $d_1 \sim d_2$.