I'm trying to figure out the stability of the origin $O(0,0)$ for the following system of differential equations : $$x'= -x^2 + 2xy$$ $$y'=-2y+y^2+xy$$ using the following method/theorem/lemma which I found in my notes (it's the only thing that is mentioned about systems which yield an eigenvalue equal to zero) :
Zero Eigenvalue : Stability
Let $f=(f_1,f_2) : \mathbb R^2 \to \mathbb R^2$, where $f\in C^k(\mathbb R^2), k\geq 1, f(0) = 0, Df(0)=0$.
Consider the following system : $$x'=f_1(x,y)$$ $$y' = -y + f_2(x,y)$$
which can be translated to :
$$\begin{bmatrix} x \\ y \end{bmatrix}'= \begin{bmatrix} 0 & 0 \\ 0 & -1 \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix} + f(x,y)$$
Observe that the linearized system has an eigenvalue equal to zero and that the critical point $O(0,0)$ is non-hyperbolic.
Solving the system of equations : $$\begin{cases} -y(x) + f_2(x,y(x)) = 0 \\ y(0) = y'(0) = 0 \end{cases}$$
the function $y(x)$ can be expressed in terms of $x$.
Finally : $$f_1(x,y(x))=ax^k+O(|x|^{k+1})$$ which leads to the origin $O(0,0)$ being asymptotically stable if $a<0$ and $k$ odd, else it's unstable.
Attempt/Discussion :
I'll let :
$$f_1(x,y) = -x^2 + 2xy$$ $$f_2(x,y) = y^2 + xy$$
since having $-2$ instead of $-1$ at my system's matrix will not change anything (just a multiplication constant).
Then, it's indeed easy to see that the matrix of the linearized system at the origin describes a non-hyperbolic critical point, as :
$$\det(J(0,0)) = 0$$
and that we have a zero eigenvalue, since $\det(J(0,0)-λI)=0$ yields a solution $λ=0$ (where $J(0,0)$ is the Jacobian at $(0,0)$).
Solving now :
$$-2y(x) + f_2(x,y(x)) = 0 \Rightarrow -2y(x) + y^2(x) + xy(x) = 0 \Rightarrow y^2(x) + (x-2)y(x) = 0 \Rightarrow y(x)[y(x) + x-2] = 0$$
which means that $y(x)=0$ or that $y(x) = 2-x$.
Now, I guess I'll have to check both cases, which means that at first :
$$f_1(x,y(x)=0) = -x^2$$
which, according to the theorem, yields that the origin $O(0,0)$ is unstable.
Checking for the other case :
$$f_1(x,y(x)=2-x)=-(2-x)^2 + 2x(2-x)=-4 + 4x - x^2 + 4x - 2x^2$$ $$=$$ $$-3x^2 + 8x - 4$$
Now, again, the power of $x$ is not odd so it means automatically that the origin is unstable ? Questioning this though, since the form is not the one reported by the theorem. What does the notation $O(|x|^{k+1})$ specifically refers too in such example ?
Also, wanted to ask, is my approach correct ? It seems that this is the only theorem-method we have been taught/expected to study for systems with an eigenvalue being zero, but I found a hard time applying it to more complicated systems (let's say with constants and higher powers).