prove for every open bounded subset of R, the largest open interval exists Show that if G is an open bounded subset of real numbers, and if x belongs to G, then there exists the largest open interval $I_x$ containing x such that  $I_x$ is a subset of G.

I know that every open subset can be written as countable union of mutually disjoint open intervals. so since G is open and G is the largest subset of itself and G contains x, then the largest open interval containing x, exists which is G itself.
I know my statement is not a real proof. the main concept of the question to me is confusing. I would appreciate any idea about the proof for this question.
 A: Let $U_1=\{y\in G:[x,y)\subseteq G\}.\ U_1$ is non-empty because $G$ is open. And since $G$ is bounded, $z:=\sup U_1$ exists and is finite. Now, $z\notin U_1$ but $x\le y<z$ satisfies $y\in U_1$ (why?), so the interval $[x,z)$ is maximal.
Set $U_2=\{y\in G:(y,x]\subseteq G\}$, repeat the above argument setting $w=\inf U_2$. 
It follows that $U=U_1\cup U_2=(w,z)\subseteq G$ is the maximal open interval containing $x$.
A: For $x,y\in \Bbb R$ let $In[x,y]=[\min(x,y),\max (x,y)].$ Show that $In[x,y]\cup In[x,z]=[\min(x,y,z),\max(x,y,z)]\supset In[y,z]$ for all $x,y,z\in \Bbb R.$
Any bounded $S\subset \Bbb R$ is an interval iff $S$ is convex iff $\forall y,z\in S\,(In[y,z]\subset S).$
$(1).$ Let $I_x=\cup \{In[x,y]: y\in \Bbb R\land In[x,y]\subset G\}.$
Obviously $I_x\subset G $ and hence also $I_x$  is bounded.
$(2).$ To show that $I_x$ is an interval:
Take any $y,z\in I_x$.  There exist $y',z'$ such that $y\in In[x,y'] \subset G$ and $z\in In[x,z']\subset G.$ So $In[x,y']$ and $In[x,z']$ are subsets of $I_x.$
We have $\min(x,y')\le y\le \max (x,y')$ and $\min (x,z') \le z \le \max (x,z'),$ which implies $\min(x,y',z') \le \min(y,z)\le \max(y,z) \le  \max (x,y',z'),$ so $$In[y,z]\subset [\min (x,y',z'),\max(x,y',z')]=In[x,y']\cup In[x,z']\subset I_x.$$
$(3).$ Let $U=\sup I_x$ and $L=\inf I_x,$ which exist because $I_x\ne \emptyset$ (because $In[x,x]=\{x\}\subset G$) and because $I_x$ is  bounded.  Since $I_x $ is  a bounded interval, we have $$(L,U)\subset I_x\subset [L,U].$$
By contradiction, assume $U\in G.$  Since $G$ is open,there exists $y>U$ such that $[U,y]\subset G.$ And we have $[x,U)\subset I_x\subset G,$ so $In[x,y]=[x,y]=[x,U)\cup [U,y]\subset G,$ implying $[x,y]\subset I_x .$ But then $\sup I_x\ge y>U=\sup I_x,$  which is absurd. Therefore $$U\not \in G.$$ Similarly we show that $$L\not \in G.$$ Therefore $$I_x=(L,U).$$ So $I_x$ is open. 
$(4).$ Finally, let $J$ be  $any$ interval such that $x\in J\subset G.$ Then $\sup J\le U,$ otherwise $U\in [x,U]\subset [x,\sup J)\subset G,$ implying $U\in G.$ Similarly $\inf J\ge L.$ Therefore $$J=J\cap G\subset [L,U]\cap G=(L,U)=I_x.$$
