The following exercise is taken from the book "An introduction to K-theory for $C^*$ algebras, exercise 13.4.
Let $A$ be the sub-$C^*$ algebra of $C([0,1],M_2(\Bbb{C}))$ consisting of all functions $f$ such that $$f(0)=\begin{pmatrix} d & 0 \\0 & 0 \end{pmatrix} \ \ \text{ and } \ \ f(1)=\begin{pmatrix} d_1 & 0 \\0 & d_2 \end{pmatrix}$$ for some $d,d_1,d_2\in \Bbb{C}$, and consider the elements $p,q\in A$ given by $$p(t)=\begin{pmatrix} 1 & 0 \\0 & 0 \end{pmatrix},\ \ \ \ q(t)=\begin{pmatrix} 1-t & \sqrt{t(1-t)} \\ \sqrt{t(1-t)} & t \end{pmatrix}.$$
$(i)$ I have shown that $p,q$ are projections in $A$.
$(ii)$ Show that $A=C^*(p,q)$ by the following hints:
(a). Use $$pq(t)=\begin{pmatrix} 1-t & \sqrt{t(1-t)} \\ 0 & 0 \end{pmatrix},\ \ \ (p-q)^2(t)=\begin{pmatrix} t & 0\\ 0 & t \end{pmatrix}.$$
I've shown that for any $d,d_1,d_2\in \Bbb{C}$ there exists $f\in C^*(p,q)$ with $f(0)=\text{diag}(d,0)$ and $f(1)=\text{diag}(d_1,d_2)$. If it is relevant, my $f$ is given by $f=d_1p(p-q)^2+d_2(1-p)(p-q)^2+dpqp$.
Here is my problematic step:
(c). If $\{e_{i,j}\}_{i,j=1,2}$ denote the standard matrix units for $M_2(\Bbb{C})$, and $0< \delta < 1/2$, then there exists $h_{i,j}\in C^*(p,q)$ with $\|h_{i,j}\|\leq 1$ and $h_{i,j}(t)=e_{i,j}$ for $t\in [\delta, 1-\delta]$.
My idea:
Assume we can get $g(t)=\begin{pmatrix} t(1-t) & t(1-t) \\ t(1-t) & t(1-t) \end{pmatrix} \in C^*(p,q)$, it should be possible and not very difficult, I think...
Then if I take $\min \{t(1-t), \delta(1-\delta)\}$ in each coordinate, after some normalizing,I get the desired matrix. But I couldn't find combinations that give me such a matrix (I've tried also the famous formula for minimum between two functions).
Moreover, after these steps I should conclude $(ii)$, and I'm not sure how to do it... any hints would be appreciated.
Thank you for your time.
Note that you cannot really use $1-p$ for your $f$, since the identity is not in your subalgebra. But you can still write $(p-q)^2-p(p-q)^2$.
The idea of the hint is that by choosing $d_1$ and $d_2$ in your $f$ you can get $$ t\,e_{11}=\begin{bmatrix}t&0\\0&0\end{bmatrix},\ \ \ t\,e_{22}=\begin{bmatrix}0&0\\0&t\end{bmatrix} $$ in $C^*(p,q)$. If you now calculate $p(p-q-te_{11}+te_{22})$ you get $$ \begin{bmatrix}0&-\sqrt{t(1-t)}\\0&0\end{bmatrix}\in C^*(p,q). $$ For $t\in (\delta,1-\delta)$, we can guarantee that $\sqrt{t(1-t)}>\sqrt{\delta-\delta^2}>0$.
Now, let $k\in C[0,1]$ be $$k(t)=\begin{cases}\dfrac t{\delta^2},&\ t\in[0,\delta]\\ \ \\ \dfrac1t,&\ t\in(\delta,1-\delta)\\ \ \\ \dfrac{1-t}{\delta(1-\delta)},&\ t\in [1-\delta,1 ]\end{cases}$$ and put $g(t)=\sqrt{k(t)\,k(1-t)}$. We get $$ g(te_{11})=\begin{bmatrix}g(t)&0\\0&0\end{bmatrix}\in C^*(p,q). $$ As $g(t)\,\sqrt{t(1-t)}=1$ on $(\delta,1-\delta)$, $$ h_{12}(t)=g(te_{11})\begin{bmatrix}0&\sqrt{t(1-t)}\\0&0\end{bmatrix}\in C^*(p,q) $$ is a function such that $h_{12}(t)=e_{12}$ for $t\in(\delta,1-\delta)$, and $\|h_{12}\|\leq1$.
With a similar idea one can obtain $h_{11}$ and $h_{22}$, by doing functional calculus on $te_{11}$ and $te_{22}$ (now with $g(0)=g(1)=1$), and $h_{21}=h_{12}^*$.
So, if you now take $f\in A$, you have $$f(t)=\begin{bmatrix}f_{11}(t)&f_{12}(t)\\ f_{21}(t)&f_{22}(t)\end{bmatrix},$$ with $f_{12}(0)=f_{12}(1)=0$, $f_{21}(0)=f_{21}(1)=0$, $f_{22}(0)=0$. You have $$ \begin{bmatrix}f_{11}(t)&0\\0&0\end{bmatrix}=f_{11}(te_{11})\in C^*(p,q). $$ Similarly, $f_{22}(t)\,e_{22}=f_{22}(te_{22})\in C^*(p,q)$. We can also get $f_{12}(t)e_{11}\in C^*(p,q)$. If we now write $g_n$ for the $g$ constructed above in the case $\delta=1/n$, we get that $f_{12}=\lim_ng_nf_{12}$ (it is essential here that $f_{12}(0)=f_{12}(1)=0$ for the limit to be uniform). Then $$ \begin{bmatrix}0&f_{12}(t)\\ 0&0\end{bmatrix}=\lim_n g_n(te_{11})f_{12}(te_{11})\,\begin{bmatrix}0&\sqrt{t(1-t)}\\0&0\end{bmatrix}\in C^*(p,q). $$