# need integer square root

• September 29th 2011, 12:34 PM
moriman
need integer square root
In another thread I have ended up with this equation

$y=\dfrac{(3v_1+u_1)\pm\sqrt{u_1^2+6u_1v_1+v_1^2}}{ 2}$

I need y to be an integer <> 0, so the first requirement is that

$u_1^2+6u_1v_1+v_1^2$ be a perfect square

If I go at it like this

$x^2=u^2+6uv+v^2$

$x^2=(u+v)^2+4uv$

$x^2-(u+v)^2=4uv$

$(x+(u+v) )(x-(u+v) )=4uv$

$let\ \ \ \ \ x+(u+v)=r$

$and\ \ \ \ x-(u+v)=s$

$x=(r+s)/2$

$u+v=(r-s)/2$

$uv=rs/4$

But I have no individual values of $u$ and $v$ now so cannot calculate

$3v_1+u_1$

Anyone have any other ideas how I can ensure $u_1^2+6u_1v_1+v_1^2$ is a perfect square?