Derived subgroup not is local powering-invariant

Statement
It is possible to have a group $$G$$ such that the derived subgroup $$[G,G]$$ is not a local powering-invariant subgroup of $$G$$. Specifically, it is possible that there exists an element $$h \in [G,G]$$ and a natural number $$n$$ such that there exists a unique element $$u \in G$$ satisfying $$u^n = h$$, and despite this, $$u \notin H$$.

We can choose $$G$$ to be a metacyclic group. We could also choose $$G$$ to be a finitely generated nilpotent group, and in fact an example of a finitely generated group of nilpotency class two.

Related facts

 * Characteristic not implies powering-invariant
 * Center is local powering-invariant
 * Derived subgroup is divisibility-invariant in nilpotent group

Example of the infinite dihedral group (metacyclic example)
Consider the infinite dihedral group, given by the presentation:

$$G := \langle a,x \mid xax^{-1} = a^{-1}, x^2 = e \rangle$$

where $$e$$ denotes the identity of $$G$$. We find that:

$$[G,G] = \langle a^2 \rangle$$

is an infinite cyclic group.

Now consider the element $$h = a^2$$. Let $$n = 2$$. We note that all elements outside $$\langle a \rangle$$ have order two, hence any element $$u$$ with $$u^2 = h$$ must be inside $$\langle a \rangle$$. The only possibility is thus $$u = a$$, which is outside $$H$$. Thus, the element $$h = a^2$$ has a unique square root in $$G$$, but this is not in $$H$$, completing the proof.

Example of a central product (finitely generated group of nilpotency class two)
In this example, the generator of the derived subgroup has a unique square root, but this lies outside the derived subgroup (though still in the center). This gives an example where the whole group is a group of nilpotency class two.