Discrete mathematics proof union/intersect/difference Prove that $$A\cup B=(A\setminus B)\cup (B\setminus A)\cup (A\cap B)$$
I'm new to proofs so I'm not sure how to approach this problem. Any help is appreciated.
 A: To show that two sets are equal, we must show that they are each subsets of the other. That is, you must show:


*

*$A \cup B \subseteq (A \setminus B) \cup (B \setminus A) \cup (A \cap B)$,

*$(A \setminus B) \cup (B \setminus A) \cup (A \cap B) \subseteq A \cup B$.
To show that $X \subseteq Y$ we take any element $x \in X$ and we need to show that $x \in Y$.
Suppose $x \in A \cup B$, which means that $x \in A$ or $x \in B$. Now break it into cases:


*

*$x \in A$


*

*$x \in B$ (then $x \in A$ and $x \in B$ means $x \in A \cap B$)

*$x \notin B$ (then $x \in A$ and $x \notin B$ means $x \in A \setminus B$)


*$x \in B$


*

*$x \in A$ (then...)

*$x \notin A$ (then...)



Now to show the second inclusion, suppose $x \in (A \setminus B) \cup (B \setminus A) \cup (A \cap B)$. Cases:


*

*$x \in A \setminus B$ (then...)

*$x \in B \setminus A$ (then...)

*$x \in A \cap B$ (then...)


You don't need to consider subcases here to show that $x \in A \cup B$.
A: \begin{align}
&A=A\cap\left(B\cup B^C\right)=\left(A\cap B\right)\cup\left(A\cap B^C\right)=\left(A\cap B\right)\cup\left(A\setminus B\right)\\
&B=\left(B\cap A\right)\cup\left(B\setminus A\right)\\
&A\cup B=(A\cap B)\cup (A\setminus B)\cup (B\setminus A)
\end{align}
A: Venn diagrams are really useful when working with sets with the first time to get a grasp of the core concepts.

