Suppose I have a variety $Z$ in $\mathbb{C}^4$ which is a (set theoretic) complete intersection of the hypersurfaces $\mathbf{Z}(P)$ and $\mathbf{Z}(Q)$. How can I compute a polynomial $R$ such that $\mathbf{Z}(R) \cap Z$ is a 1--dimensional variety that contains the singular locus of $Z$? If $(P,Q)$ was a radical ideal, then I could look at when the $2\times2$ minors of $\binom{\nabla P}{\nabla Q}$ vanish, but it seems that if $(P,Q)$ is not radical, then all of the $2\times2$ minors of $\binom{\nabla P}{\nabla Q}$ might vanish identically on $Z$.
As a final complication, my hope is that the degree of $R$ is $O(\textrm{deg} P + \textrm{deg} Q)$. Thanks!
[edit: In response to Sándor Kovács's answer, I have updated the problem. Previously I asked that $\mathbf{Z}(R) \cap Z$ be the singular locus of $Z$, instead of merely requiring that $\mathbf{Z}(R) \cap Z$ contain the singular locus]