Let $V$ be an algebraic variety (not irreducible) over $\mathbb{C}$, defined by an ideal $I = \{f_1,f_2,\dots, f_n\}$. $V$ is not necessarily pure dimensional. Suppose $V = R_1\cup R_2\cup\dots\cup R_k$ is a decomposition of $V$ into irreducible components. How can we characterize the set of points on $V$ that lies in at least two components? If this is hard to compute, is there a good approximation to this set (some bigger set that contains it)?

A second question related to the one above is: how can we find the equations that describe the singular loci (the difficulty lies in the fact that we don't know the dimension at the point we are interested in)? This loci will give an approximation to the set discussed above.