<s>[INST] Can't solve a quartic equation I'm trying to solve an algebraic question.The question wants me to solve $n^4+2n^3+6n^2+12n+25=m^2$.The question also states that n is a positive integer and the answer for $n^4+2n^3+6n^2+12n+25$ is a square number. Here's how I tried to solve it:
$$n^4+2n^3+6n^2+12n+25=\\n^4+6n^2+2n^3+12n+25=\\
n^2(n^2+6)+2n(n^2+6)+5^2=\\
(n\sqrt {n^2+6})^2+2n(n^2+6)+5^2.\\$$
Because $a^2+2ab+b^2=(a+b)^2$,so
$\sqrt {(n\sqrt {n^2+6})^2}\cdot\sqrt5^2=n(n^2+6)$
Then:
$$n\sqrt {n^2+6}\cdot 5=n(n^2+6)\\
\sqrt {n^2+6}\cdot 5=n^2+6\\
25(n^2+6)=n^4+12n^2+36\\
n^4+12n^2+36=25n^2+150\\
n^4-13n^2-114=0\\
(n^2+6)(n^2-19)=0\\
n^2=19\\
n=\sqrt 19$$
But $n$ is a positive integer.
Can anyone help?
 [/INST] I believe (correct me if I'm wrong) that $a^2-b^2$ only has factors $1, a^2-b^2, (a-b), (a+b)$ if $a$ and $b$ are coprime. Using this, we have that:
$$n^4+2n^3+6n^2+12n+25=m^2 \to n(n^3+2n^2+6n+12)=m^2-25$$
If we assume that $m\neq 5k,k\in\Bbb Z$, by what I stated earlier we have that either $n=1$ and $(n^3+...)=m^2-25$, which leads to $m=\pm\sqrt{46}$, or $(n^3+...)=1$ and $n=m^2-25$, which leads to $n\approx -1.896\to m\approx\sqrt{23.104}$, or that $(n^3+...)=n\pm 10\because m^2-25=(m+5)(m-5)$ and these factors are $10$ apart. Neither of these yields integer solutions, so we can safely discard them too.
In short, this is impossible unless $m$ is a multiple of $5$. Now see if you can find if it works when $m$ is. 
</s>