Application of Urysohn's lemma I am working on the following hw problem: If we have that $X$ is a compact Hausdorff space, with $\{U_\alpha\}_{\alpha\in A}$, then we can find a finite number of continous functions $f_1,...,f_k$, with $f_i:X\mapsto [0,1]$ such that $f_1(x)+...+f_k(x)=1$ for all $x$, and for each $i$ there exists a $\alpha_i$ such that $\overline{f_i^{-1}((0,1])}\subset U_{\alpha_i}$. 
So this are my thoughts at the moment. Since $X$ is Hausdorff and compact it is normal, so we know that Urysohn's lemma applies. Meaning, if I have any two disjoint sets I can find a continous function that is $0$ is one of the sets and $1$ in the other one. 
My intuition is telling me to use compactness and find $U_{\alpha_1},..., U_{\alpha_k}$ that cover $X$, and then by the last requirement of the problem we would need $f_i(x)=0$ if $x\notin U_{\alpha_i}$. 
The problem is very clear if I can write my space $X$ as the disjoint union of finite closed sets cause then I could just apply Urysohns and get my functions very easily, but I do not see how to apply this lemma using the open cover given. Any hints would be greatly appreciated. 
 A: Such a family of functions is called a partition of unity (where unity = 1, because of the summing to 1 property), and these exists for all paracompact Hausdorff spaces. 
For a complete proof, see this, e.g. A compact (Hausdorff) space is paracompact Hausdorff (we can work with finite covers everywhere, but that makes the proof only slightly easier..).
Chapter 2 of the linked document handles the finite case, without going to paracompactness.
A: Let us recall some important definitions fristly:

A family $\{f_s\}_{s\in S}$ of continuous functions from a space $X$ to the closed unit interval $I$ is called a partition of unity on the space $X$ if $\Sigma_{s\in S}f_s(x)=1$ for every $x\in X$.
A partition of unity $\{f_s\}_{s\in S}$ on a spaceis subordinated to a cover $\mathscr U$ of $X$ if the cover $\{f_s^{-1}((0,1])\}_{s\in S}$ of the space $X$ is a refinement of $\mathscr U$.

Theroem 1: For every $T_1$-space $X$ the following conditions are equivalent:
1) The space $X$ is paracompact; 
2) Every open cover of the space $X$ has a partition of unity subordinated to it.
The proof of it can be seen the General Topology by Engelking Page 302.
Note that every compact Hausdorff space is paracompact.
