How to use this calculator
Find the smallest positive integer solution of x²−Dy²=1 for a positive nonsquare integer D.
- Enter Positive nonsquare D. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Fundamental Pell equation solution explained
Find the fundamental positive-integer solution of x²−Dy²=1 for a positive nonsquare integer D.
A numerical walkthrough
Positive nonsquare D = 2.
- Fundamental x: 3
- Fundamental y: 2
For D=2, the fundamental solution is x=3, y=2 because 3²−2·2²=1.
The model behind the numbers
Continued-fraction convergents of √D
D is the positive nonsquare integer in x²−Dy²=1; continued-fraction convergents are checked until the fundamental solution is found. Exact BigInt arithmetic with a 10,000-iteration cap; square D has no positive-y Pell solution..
What to enter
d— Positive nonsquare D- Positive nonsquare D. Enter a whole number.
Interpreting the result
Assumes positive nonsquare integer D. The continued-fraction search returns the smallest positive x and y satisfying x²−Dy²=1 using exact arithmetic; square D has no positive-y solution, and the search is capped at 10,000 iterations.
Frequently asked questions
Why must D be nonsquare?
The classical positive-y Pell problem requires a nonsquare D.
Is the smallest x guaranteed?
The continued-fraction convergent method finds the fundamental solution within the iteration budget.
Can the solution be enormous?
Yes, even modest D can produce large integers.
How do I use the Fundamental Pell equation solution calculator?
Enter Positive nonsquare D. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Fundamental Pell equation solution?
Positive nonsquare D = 2. Fundamental x: 3 Fundamental y: 2 For D=2, the fundamental solution is x=3, y=2 because 3²−2·2²=1.
Read our calculation methodology.