Equations in nilpotent groups

We show that there exists an algorithm to decide any single equation in the Heisenberg group in finite time. The method works for all two-step nilpotent groups with rank-one commutator, which includes the higher Heisenberg groups. We also prove that the decision problem for systems of equations is unsolvable in all non-abelian free nilpotent groups.