# Integer solution for $Rx^2+Sy^2=1$ .

Is there any integer solution in-terms of $R,S$ for the equation $Rx^2+Sy^2=1$ , .

For example $(\frac{1}{\sqrt {2R}},\frac{1}{\sqrt {2S}})$ is a solution but not integer solution .

Is there any integer solution tuple for the equation in terms of R and S?

If not , is there any simple efficient algorithm to get integer solution ?

• If $R,S > 0$ then there are at most finitely many solutions, and you can try them all. What should we assume about $R,S$? For example, some positive real values of $R,S$ will make the solution you gave an integer solution. – hardmath Nov 20 '14 at 13:13
• If $R$ and $S$ are both greater than 1, can this even have an integer solution? – Randy E Nov 20 '14 at 13:23
• If you want $R,S$ to be positive integers, it would be more interesting to ask for rational solutions $x,y$. – hardmath Nov 20 '14 at 13:29
• This is pretty much what we know about quadratic diophantines – chubakueno Nov 20 '14 at 14:21

If $R=1$ and $S$ is a negative integer, this is Pell's equation. Algorithms exist to find solutions. I don't know how simple or efficient these algorithms are, though.
If you explore that route, you might find some information on the more general case where $R$ is a positive integer and $S$ is a negative integer.