We first solve Pell's equation with by finding the units of the ring of integers of using Sage.
The subgroup of cubes gives us the units with integer (not both negative).
A great article about Pell's equation is [Len02]. The MathSciNet review begins: ``This wonderful article begins with history and some elementary facts and proceeds to greater and greater depth about the existence of solutions to Pell equations and then later the algorithmic issues of finding those solutions. The cattle problem is discussed, as are modern smooth number methods for solving Pell equations and the algorithmic issues of representing very large solutions in a reasonable way.''
The simplest solutions to Pell's equation can be huge, even when is quite small. Read Lenstra's paper for some examples from over two thousand years ago. Here is one example for .
William Stein 2012-09-24