Solution (source code)

= Solution

Put $y=\dot x$. The planar <autonomous differential equation> is
$$
\dot x=y,\qquad \dot y=x^2-p-(q+x)y.
$$
Its <equilibria> have $y=0$, $x^2=p$. There are none for $p<0$, one at $p=0$, and two $x_\pm=\pm\sqrt p$ for $p>0$. At an <equilibrium> $x_*$ the <stability matrix> is
$$
J_* =\begin{pmatrix}0&1\\2x_*&-(q+x_*)\end{pmatrix},\qquad
\operatorname{tr}J_*=-(q+x_*),\quad \det J_*=-2x_*.
$$
Writing $s=\sqrt p>0$, $x_+=s$ is always a <saddle equilibrium>. At $x_-=-s$, the determinant is $2s>0$ and the trace is $s-q$: it is attracting for $q>s$ and repelling for $q<s$.

At $p=0$ and $q\ne0$, the <eigenvalues> are $0,-q$; the nonzero quadratic term and parameter unfolding give a <saddle-node bifurcation>. At $p>0$, the trace crosses zero at $q=s$, with <eigenvalues> $\pm i\sqrt{2s}$, giving a <Hopf bifurcation>. It is nondegenerate: around $x=-s$ the equation is $\ddot\xi+(q-s)\dot\xi+2s\xi-\xi^2+\xi\dot\xi=0$. At $q=s$, a small oscillatory expansion of leading amplitude $r$ has $\langle\xi\dot\xi^2\rangle=r^4/8+O(r^5)$, so the first nonlinear damping is positive and nonzero. For example, its second-order oscillatory expansion is $\xi=r\cos(\Omega t)+r^2/(2\Omega^2)-r^2\cos(2\Omega t)/(6\Omega^2)-r^2\sin(2\Omega t)/(6\Omega)$ with $\Omega^2=2s$. Thus the small attracting <limit cycle> is on the $q<s$ side. At $(p,q)=(0,0)$ the matrix has a double zero <eigenvalue> and a nontrivial Jordan block, the <Bogdanov–Takens bifurcation> organizing the two curves. \b[The local bifurcation curves are]
$$
\boxed{p=0\quad\text{and}\quad q=\sqrt p\ (p>0).}
$$
A change between node and focus away from these curves is not itself a local bifurcation.

For the requested global exclusion, suppose $x(t)$ were periodic with period $T$. Integrate the original equation over a period. The integrals of $\ddot x$, $q\dot x$, and $x\dot x=\frac12(d/dt)x^2$ vanish. Therefore
$$
\int_0^T x(t)^2\,dt=pT.
$$
The left side is nonnegative and the right side is negative when $p<0$. This contradiction proves \b[there are no <periodic orbits> for $p<0$], independently of $q$.