# About the solutions of the diophantine equation $x×(2a-x)=b$

Let us consider a real dynamical system $$s′=g(s)$$. In order to study the stability of the central manifold, we reformulate the problem as follows: For given fixed positive integers $$a,b$$, I am asking if this equation $$x(2a-x)=b$$ has positive integer solutions $$1≤x.

We can find the solution:

$$x=a\pm\sqrt{a^2-b}$$

however, we need $$x$$ to be an integer for a given $$a,b$$. So, my question is about ideas that permit us to conclude that a positive integer solution $$x$$ exists. I notice that we do not need the concepts from mapping theory and this is just an algebraic equation.

• so you want $a^2-b=c^2$ implying that $b=(a-c)\cdot (a+c)$ so, for example, you need $a-b$ to be a square in $Z/aZ$ Commented Nov 10, 2020 at 16:26
• $w=x-a, \; \;$ $w^2 = a^2 - b, \; \;$ $w^2 - a^2 = b$ all possible $w$ are given by factoring $b$ Commented Nov 10, 2020 at 16:26
• @WillJagy: But $1≤x<a$. Commented Nov 10, 2020 at 16:32
• @Phicar: Can you elaborate with your idea. Commented Nov 10, 2020 at 16:33

Let $$b=b_0b_1$$ a factorization of $$b$$. If we have
$$x=b_0,\\2a-x=b_1$$ then $$2a=b_0+b_1.$$
So $$a$$ must be the arithmetic mean of two factors of $$b$$.