Solution (source code)

= Solution

Substitution of the center-manifold <series> into the $v$ equation gives at cubic order
$$
\frac12(av^3-v^3)=\frac{a-1}{2}v^3.
$$
Keeping the $v^5$ terms from $3av^2w$, $z w$, and the quartic term in $z$ gives
$$
\boxed{
\dot v=\frac{a-1}{2}v^3+
\frac{3a^2+8a-3}{8}v^5+O(v^7)
=\frac{a-1}{2}v^3+
\frac{(3a-1)(a+3)}8v^5+O(v^7)}.
$$