Suppose $X$ is a topological space and $U,V$ are open subsets of $X$ such that $X=U\cup V$ such that $U\cap V$ is pathwise connected. We have the two inclusions $i:U\to X$ and $j:V\to X$ which induce group homomorphisms $i_{\ast}:\pi_1(U,x_0)\to \pi_1(X,x_0)$ and $j_{\ast}:\pi_1(V,x_0)\to \pi_1(X,x_0)$.
I am trying to understand the proof of the following assertion:
$\pi_1(X,x_0)=<\text{im }i_{\ast},\text{im }j_{\ast}>$
We let $I=[0,1]$.
The proof is the following:
We take a loop $\alpha :I\to X$ based on $x_0$. Since $I\subset \alpha^{-1}(U)\cup \alpha^{-1}(V)$, by the Lebesgue number theorem we can select a partition $0=a_0<\cdots <a_n=1$ such that $\alpha \left (\left [a_{k-1},a_k\right ]\right )$ lies entirely in one of the open subsets $U$ or $V$ for each $k$. If we take $n$ minimal, then $\alpha(a_k)\in U\cap V$ for every $k$ (otherwise $\alpha \left (\left [a_{k-1},a_k\right ]\right )$ and $\alpha \left (\left [a_{k},a_{k+1}\right ]\right )$ would both be subsets either of $U$ or $V$, and we could drop $a_k$ contradicting our minimality).
For every $k$ we define $\alpha_k\left (t\right )=\alpha \left (\left (1-t\right )a_{k-1}+ta_k\right )$. Therefore we have $\left [\alpha\right ]=\left [\alpha_1\right ]\ast \cdots \ast \left [\alpha_n\right ]$.
At this step I got stuck. I know that the last equality is quite intuitive, but how could I write a formal proof of it?
On Munkres's book (chap. 8-6) there is a proof of a particular case, where $i_{\ast}$ and $j_{\ast}$ are the trivial maps, and makes use of that property in order to define some "local homotopies" and being able to construct a global one. I was not able to generalize the argument.