# Triangle inequality for distance along a smooth path

For a domain $\Omega \subset \mathbb{C}$ and a $\rho: \Omega \rightarrow \mathbb{R}_0^+$, define the distance by: $$d_\rho (z_1,z_2) = \inf\limits_{\gamma \in C^1 (z_1,z_2)} \int_0^1 \rho(\gamma(t))\cdot|\dot{\gamma}(t)| \,dt,$$ where $C^1(z_1,z_2)$ is the space of smooth paths $\gamma: [0,1] \rightarrow \Omega$ such that $\gamma(0)=z_1$ and $\gamma(1)=z_2$.

I need to show that this satisfies $d_\rho (z_1,z_2) \leq d_\rho (z_1,w) + d_\rho (w,z_2)$.

I'm not very confident in what I did, which was to choose two paths $\gamma_1 \in C^1(z_0,w)$ and $\gamma_2 \in C^1(w,z_1)$, with $\dot{\gamma}_1 (1) = \dot{\gamma}_2(0)$ and $$\int_0^1 \rho(\gamma_1(t))\cdot|\dot{\gamma}_1(t)| \,dt = d_\rho (z_1,w) + \varepsilon/2,\\ \int_0^1 \rho(\gamma_2(t))\cdot|\dot{\gamma}_2(t)| \,dt = d_\rho (w,z_2) + \varepsilon/2$$ for some arbitrary $\varepsilon>0$.

Then a path $\gamma\in C^1(z_1,z_2)$ which is a concatenation of $\gamma_1$ and $\gamma_2$ has length $$\int_0^1 \rho(\gamma(t))\cdot|\dot{\gamma}(t)| \,dt \leq d_\rho(z_1,w) + d_\rho(w,z_2) + \varepsilon.$$ Thence $$d_\rho (z_1,z_2) \leq d_\rho(z_1,w) + d_\rho(w,z_2) + \varepsilon,$$ and since $\varepsilon$ is arbitrary, $$d_\rho (z_1,z_2) \leq d_\rho(z_1,w) + d_\rho(w,z_2).$$

(a) Minor issue: it's better to write $\dots < d_\rho(z_1,w)+\varepsilon/2$ (instead of $=$) because this is what the definition of infimum tells you.
(b) Major issue: How do you know you can arrange $\dot \gamma_1(1)=\dot \gamma_2(0)$? Not clear at all. One way to fix this is to take $\gamma_1$ and $\gamma_2$ so that the inequalities of the form $\int \dots < d_\rho(z_1,w)+\varepsilon/3$ hold, and then insert a connecting path in between. This extra path - call it $\gamma_{3/2}$ -- will begin and end at $w$ and will satisfy $\dot\gamma_{3/2}(0)=\dot \gamma_1(1)$ and $\dot\gamma_{3/2}(1)=\dot \gamma_2(0)$. It should also be smooth and very short -- so short that the integral over it will be $<\epsilon/3$.
One way to cook up this connector it to modify the familiar "polar flower" $r=\sin n\theta$ from calculus.