The following is Exercise 1.1.4 in Hatcher's Algebraic Topology:
A subspace $X\subset \Bbb R^n$ is said to be star-shaped if there is a point $x_0 \in X$ such that, for each$x \in X$ , the line segment from $x_0$ to $x$ lies in $X$.
Show that if a subspace $X\subset \Bbb R^n$ is locally star-shaped, in the sense that every point of $X$ has a star-shaped neighborhood in $X$, then every path in $X$ is homotopic in $X$ to a piecewise linear path , that is , a path consisting of a finite number ofstraight line segments traversed at constant speed.show this applies in particular when $X$ is open or when $X$ is a union of finitely many closed convex sets.
Thanks in advance.
Hint: Let $p: [0,1] \to X$ be a path. Consider the set $$\{t \in [0,1]: \text{there is a piecewise linear path from $p(0)$ to $p(t)$}\}$$
Is it open or closed?