Everyone help me please!
Find for all $x$ is positive Such that $x^2+5x+2$ is perfect square of integer First I suppose $x^2+5x+2= y^2$ and substract $y^2$ from both side Got $(x-y)(x+y)=-2x-5$ But I can't consider in case by case
Everyone help me please!
Find for all $x$ is positive Such that $x^2+5x+2$ is perfect square of integer First I suppose $x^2+5x+2= y^2$ and substract $y^2$ from both side Got $(x-y)(x+y)=-2x-5$ But I can't consider in case by case
Let $x^2+5x+2=(x+a)^2$ where $a$ is any integer
$$\implies x=\dfrac{a^2-2}{5-2a}$$
As $x>0$ we need $(a^2-2)(5-2a)>0$
$\iff2<a^2<\dfrac{25}4\implies1.4<a<2.5\implies a=2$
Clearly $a=2$ satisfies the requirement.
Observation:
Again, $2x=\dfrac{2a^2-4}{5-2a}=-a+\dfrac{5a-4}{5-2a}$
$2(2x+a)=\dfrac{10a-8}{5-2a}=-5+\dfrac{17}{5-2a}$
So, $5-2a$ must divide $17$
Take $x^2+5x+2=y^2$ for some integer $y$. Then from the quadratic formula, we know that $$x=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a}$$ $$x=\dfrac{-5\pm\sqrt{5^2-4(2-y^2)}}{2}=\dfrac{-5\pm\sqrt{25-8+4y^2)}}{2}=\dfrac{-5\pm\sqrt{17+4y^2)}}{2}$$
Now, for $x$ to be an integer, $4y^2+17$ should be a perfect square. So, take $4y^2+17=k^2$ for some $k$.
$$4y^2-k^2=17$$ $$(2y+k)(2y-k)=17$$
Now we have four combinations of $(2y+k)$ and $(2y-k)$.
Can you take it from here?
Hint $$x^2+5x+2=y^2 \Rightarrow 4x^2+20x+8 =4y^2 \Rightarrow 4x^2+20x+25 =4y^2 +17 \\\Rightarrow (2x+5)^2-(2y)^2 =17 \Rightarrow (2x+5-2y)(2x+5+2y) =17$$
Let $x^2+5x+2 =y^2$. Since
$$x^2< x^2+5x+2 < x^2+6x+9$$
we have $$x^2<y^2<(x+3)^2\implies y\in\{x+1,x+2\}$$
Case 1: $$x^2+5x+2 = (x+1)^2 = x^2+2x+1\implies x= -1/3$$ so no solution.
Case 2: $$x^2+5x+2 = (x+2)^2 = x^2+4x+4\implies x= 2$$