Originally Posted by

**HallsofIvy** No, sorry. When I said "Both P and Q are contained in the square in

...", I meant that every point of P and Q are in

.

This uses sin(1/x) so that the two sets can "dodge" one another very rapidly! Also, it is of importance that the closure of the set

includes the entire line segment (0, y) for y between -1 and 1.

I finally got it!

According to mathworld:A connected set is a set which cannot be partitioned into two nonempty subsets such that each subset has no points in common with the set closure of the other.

Here's Wolfram's plot.