Every path homotopic to a Piecewise linear path (Hatcher 1.1.4) I am stuck in the question from exercise 1 of Hatcher.
A subspace $X\subseteq \mathbb{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 \subseteq \mathbb{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 of straight 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.
I have been unable to get the meaning of the question properly and I am not able to figure out a possible approach. Kindly help me out. I have followed this link Exercise 1.1.4 in Hatcher's Algebraic Topology, star-shaped
but hasn't been of much help to me.
TIA
 A: I worked on this problem for a while too. Here's my solution:
Let $f : I \to X$ be any path in $X$. By hypothesis, each $f(t)\in X$ has a star-shaped neighbourhood $U_t$. The collection of these neighbourhoods $\{U_t \subset X : \forall t \in I\}$ is an open cover for $f(I)$. By compactness of $f(I) \subset X$, we have finite subcover $\{U_{t_0}, U_{t_1},\dots,U_{t_n}\}$. By looking at their preimage, we can choose a finite set of points $0=\tau_0 \leq \tau_1,\leq \cdots \leq \tau_k=1$ so that for each interval, $f([\tau_i,\tau_{i+1}]) $ contained in a single star-shaped neighbourhood, say $U_i$. Let $x_i$  be the point in $U_i$ where all the line segments from any other points to $x_i$ contain in $U_i$. 
For each $U_i$, define a path $L_i : I \to X$ as $L_i(s) = (L_{i}' \cdot L_i'' )(s)$, where 
\begin{align*}
L_i'(s) = f(\tau_i) + s(x_i - f(\tau_{i})), \quad L_{i}''(s) = x_i + s(f(\tau_{i+1})-x_i)
\end{align*}
are straight-lines from $f(\tau_{i})$ to $x_i$ and $x_i$ to $f(\tau_{i+1})$. By construction, the path $L_i$ contained in $U_i$. The crucial part is to show that the paths $L_i$ and $f|{[\tau_i,\tau_{i+1}]}$ (starts and ends at the same points and both lie on $U_i$) are homotopic. To show this, let $f_i := f|[\tau_i,\tau_{i+1}]$. Note that $\bar{L_i'} \cdot f_i \cdot \bar{L_i''}\simeq c_{x_i}$, by straight-line homotopy to $x_i$. Then 
$$ 
L_i' \cdot (\bar{L_i'} \cdot f_i \cdot \bar{L_i''}) \cdot L_i'' \simeq L_i' \cdot c_{x_i} \cdot  L_i'' \implies f_i \simeq L_i' \cdot L_i''.
$$
Hence the piecewise linear path $L : I \to X$ defined as $L = L_0 \cdot L_1 \cdots L_{k-1} $ is homotopic to $f$
$$
L=L_0 \cdot L_1 \cdots L_{k-1} \simeq f_0 \cdot f_1 \cdots f_{k-1} \simeq f.
$$
A: This is a good use case for so-called "real induction". The claim (a slightly specialized form of Theorem 2 from this article) is this:

A subset $S$ of $[0,1]$ is inductive if the following holds: 
  
  
*
  
*$0 \in S$.
  
*For all $x \in [0,1)$, if $x \in S$, then $[x,y] \subseteq S$ for some $y>x$.
  
*For all $x \in (0,1]$, if $[0,x) \subseteq S$, then $x \in S$.
  
  
  The theorem of real induction is that the only inductive subset of $[0,1]$ is $[0,1]$ itself.

So if we verify for a set $S \subseteq [0,1]$ that it is inductive, then we know $S = [0,1]$.
In this case, for a path $p: [0,1]\to X$, let $S$ be the set of $t \in [0,1]$ such that the sub-path from $p(0)$ to $p(t)$ is homotopic in $X$ to a piecewise linear path.
Checking (1), our "base case", is trivial. (Or a matter of definition: we should consider the constant function $p$ restricted to $\{0\}$ to be a piecewise linear path, since concatenating it with another piecewise linear path on the end produces another piecewise linear path.)
To check (2), let $x<1$ and suppose that the subpath from $p(0)$ to $p(x)$ is homotopic to a piecewise linear path. Let $X^*$ be a star-shaped neighborhood of $x$, centered at $x_0$; then by continuity there is some $y > x$ such that $p(t) \in X^*$ for $t \in [x,y]$.  You should show that the path $p$ on $[x,y]$ is homotopic in $X^*$ to the piecewise linear path that goes from $x$ to $x_0$ to $y$; this can be appended to the piecewise linear path homotopic to $p$ on $[0,x]$, to get a piecewise linear path homotopic to $p$ on $[0,y]$.
To check (3), we do the same thing, but instead of taking a point $y>x$, take a point $w<x$ such that $p(t) \in X^*$ for $t \in [w,x]$, and extend the piecewise linear path from $p(w)$ to $p(x)$.
