Let $X$ be a space with some $p\in X$ such that if $U\subseteq X$ is open and $p\in U$, then $U=X$. Show $X$ is path connected.
My thoughts: Let $u\not=v\in X$. We need a continuous map $\gamma:[0,1]\to X$ such that $\gamma(0)=u$ and $\gamma(1)=v$. I chose the following: $$ \gamma(t)=\begin{cases} u&\text{if }t=0\\ p&\text{if }0<t<1\\ v&\text{if }t=1. \end{cases} $$ Now let $U\subseteq X$ be open. If $p\in U$ then $U=X$ so $\gamma^{-1}(X)=[0,1]$ so we're good here. But I think there are issues if $p\not\in U$... am I on the right track? Or can someone suggest me a different map to use?
As suggested in the comment, one could instead choose
$$\gamma(t) = \begin{cases} u & \text{ if } x\in [0,1/2), \\ p & \text{ if } x = 1/2, \\ v & \text{ if } x\in (1/2, 1].\end{cases}$$
This $\gamma$ is continuous: let $U \subset X$ be any open set. Then $\gamma^{-1} (U) = [0,1]$ when $p\in U$. When $p\notin U$,
$$\gamma^{-1} (U) = \begin{cases} \emptyset &\text{ if } u, v\notin U, \\ [0,1/2) & \text{ if } u\in U, v\notin U, \\ (1/2, 1] &\text{ if } u\notin U, v\in U , \\ [0,1/2) \cup (1/2, 1]& \text{ if } u, v\in U. \end{cases}$$
Thus $\gamma^{-1}(U)$ is open for all open set $U$.