Boundary of the union of two sets

is it true that:

$$\partial(A\cup B) = (\partial(A)\cap \mbox{int}(X-B))\cup (\partial(B)\cap \mbox{int}(X-A))$$

? (where $\partial(A)$ is the boundary of A, int(A) is the interior, and A and B are two subsets of the topological space X)

I can prove that:

$$\partial(A\cup B) \subset (\partial(A)\cap (X-\mbox{int}(B)))\cup (\partial(B)\cap (X-\mbox{int}(A)))$$

But I have an example where the equality doesn't hold. (I can show all this if anyone wants). But in the example, the first equalitiy does hold, and it seems like it would always hold, but I can't prove it.

Edit: Actually, now I think I have an example where the first equality doesn't hold. Now I have no idea what $\partial(A\cup B)$ is. (It also isn't $(\partial(A)\cap (X-B))\cup (\partial(B)\cap (X-A))$, because I have a counterexample of that too)

Last edited:

I might as well show the counterexample I found. For these two sets, none of the above equalities hold (here X is $\Re^2$):
$$A= {0\le x < 1,0\le y \le 1}$$
$$B= {1\le x \le 2,0\le y \le 1}$$