Let $X$ be the closed unit ball in $\mathbb{R^2}$, and let $X^*$ be the partition of $X$ consisting of all the one point sets for which $x^2+y^2 <1$, along with the set $S^1=\{(x,y)|x^2+y^2=1\}$. One can show that $X^*$ is homeomorphic with the subspace of $\mathbb{R}^3$ called the unit 2-sphere.
To show this, I need to find a function $f:X \to S^2$ such that $f(x)=f(y)$ if and only if $x \sim y$, where $\sim$ is the equivalence relation induced by the partition of $X$. However, I cannot think of such function. I would greatly appreciate it if anyone can provide me with an example.
You're saying that the space $D^2/\partial D^2$ is homeomorphic to $S^2$, and this is true. Consider the function $D^2\to S^2$ obtained by placing the disk with the origin tangent to say the north pole of $S^2$ and wrapping it over the sphere. Explicitly, consider the parametrization of the unit disk by $(\tau \cos \theta,\tau\sin\theta,1)$ on top of the sphere where $\theta$ is the angle traced with the $x$-axis. A point in the sphere can be written as $(\sin u\cos\theta,\sin u\sin \theta,\cos u)$ where $\theta$ is the angle traced with the $x$-axis and $u$ the angle of elevation. You can now define $$(\tau\cos\theta,\tau\sin\theta,1)\to (\sin \pi \tau \cos\theta,\sin\pi \tau \sin\theta,\cos \pi\tau)$$
Note that when $\tau=1$, all points are mapped to $(0,0,-1)$, which is the south of the sphere.