High Quality Content by WIKIPEDIA articles! Pell's equation is any Diophantine equation of the form x^2-ny^2=1, where n is a nonsquare integer and x and y are integers. Trivially, x = 1 and y = 0 always solve this equation. Lagrange proved that for any natural number n that is not a perfect square there are x and y 0 that satisfy Pell's equation. Moreover, infinitely many such solutions of this equation exist. These solutions yield good rational approximations of the form x/y to the square root of n.