$x^2+3x+24$ is a perfect square then find the value of $x$ Find all integer values of $x$ where $x^2+3x+24$ is a perfect square. By guessing I found one solution that $x=5$.I found the problem in the exercise of a book in the chapter of polynomials. So please help me.

$x^2+3x+24 = n^2$
so
$x^2+3x+9/4 = n^2-24+9/4$
or
$(x+3/2)^2 =n^2-87/4$
or
$(2x+3)^2 =4n^2-87$.
Therefore
$87
=4n^2-(2x+3)^2
=(2n-2x-3)(2n+2x+3)
$.
$87=3*29$,
so it can be factored as
$87
=1*87,3*29
$.
Therefore
$(2n-2x-3,2n+2x+3)
=(-87, -1), (-29, -3), (3, 29), (1, 87)
$.
If
$(2n-2x-3,2n+2x+3)
=(a, b)
$,
then
$4x+6 = b-a$
and
$4n=b+a$
so
$x = (b-a-6)/4$
and
$n = (b+a)/4$.
For these 4 sets,
$x = (-87+1-6)/4
=-92/4 = -23
$,
$x = (-29+3-6)/4
=-32/4 = -8
$,
$x = (29-3-6)/4
=20/4 = 5
$,
$x = (87-1-6)/4
=80/4 = 20
$.
