I am reaching out for specific advice on how one should go about finding counterexamples. It seems almost every time I've ever attempted a "find a counterexample" problem, I have to cheat by asking a friend, or I have to use a computer. That being said, I've encountered another problem which I can look up the solution to, and probably understand why it is a counter example after it is given to me, but I am helpless when it comes to actually finding it. That being said, I am asking if someone could post a counterexample to the following problem and explain to me their thought process. This would help me so much.
Problem: Give an example of two subgroups $H$ and $K$ of a group $G$ whose union $H\cup K$ is not a subgroup of $G$.
How far I've gotten: I know that a nonempty subset $H$ of a finite group $G$ is a subgroup if and only if $a,b\in H$ implies $ab\in H$. Using this we can know that If $a,b\in H\cup K$, but $ab\not \in H\cup K$, then $H$ is not a subgroup of $G$. So I know what a counterexample should look like if I see one, but how do I find it?
Thanks so much.
Perhaps the best way of going about these things is to look towards the simplest possible counterexamples first. For example, if you have ever taken point-set topology, you'll know that the indiscrete topology and the discrete topology are the first two spaces that should pop into your mind when looking for examples simply because they are so easily "grokked" by our minds (followed by metric spaces, then Hausdorff spaces, and so forth).
So what about when it comes to problems like this in abstract algebra? Well, we've been well-acquainted with the additive group $\mathbb{Z}$ since grade school! Why not start there?
My (naive) advice is to try to make a property fail in simple, easy-to-work-with structures first, and only dive into the abstraction as a last resort. Finally, as a general rule of thumb, it's easier to prove something once you've developed a certain degree of intuition and are convinced the result should go one way or another. The great Riemann conveyed this best: "If only I had the theorems! Then I should find the proofs easily enough."