Find integer solutions to linear, quadratic, and Pell-type equations. Complete step-by-step solutions with visualization.
Linear Diophantine Equation: \(ax + by = c\)
where \(a, b, c\) are integers, and we seek integer solutions \((x, y)\).
Pell's Equation: \(x^2 - Dy^2 = 1\)
where \(D\) is a positive non-square integer, and we seek positive integer solutions \((x, y)\).
Quadratic Diophantine Equation: \(ax^2 + bxy + cy^2 + dx + ey + f = 0\)
Simplified forms available below.
Custom Diophantine Equation: Enter any equation in x and y
Use standard mathematical notation. Example: "x^2 + 2*y^2 = 17" or "x^2 + y^2 - 25 = 0"
Diophantine equations are polynomial equations with integer coefficients where only integer solutions are sought. They are named after the ancient Greek mathematician Diophantus of Alexandria.
General Form:
A Diophantine equation in two variables has the form:
\(P(x, y) = 0\)
where \(P(x, y)\) is a polynomial with integer coefficients, and we seek integer pairs \((x, y)\) that satisfy the equation.
Linear Diophantine Equations: \(ax + by = c\)
These have solutions if and only if \(\gcd(a, b)\) divides \(c\). The extended Euclidean algorithm finds all solutions.
Pell's Equation: \(x^2 - Dy^2 = 1\)
For non-square positive integer \(D\), Pell's equation has infinitely many solutions. The fundamental solution generates all others.
Quadratic Diophantine Equations: \(ax^2 + bxy + cy^2 + dx + ey + f = 0\)
These can often be transformed into Pell-type equations or solved by factoring over the integers.
| Method | Applicable To | Key Idea | Example |
|---|---|---|---|
| Extended Euclidean Algorithm | Linear equations | Find gcd and express as linear combination | \(12x + 15y = 9\) |
| Continued Fractions | Pell's equation | Use convergents of \(\sqrt{D}\) | \(x^2 - 2y^2 = 1\) |
| Factorization | Quadratic equations | Rewrite as product of linear factors | \(x^2 - y^2 = (x-y)(x+y)\) |
| Modular Arithmetic | All types | Check possibilities modulo n | \(x^2 + y^2 = z^2 \mod 4\) |
| Parametrization | Homogeneous equations | Express variables in terms of parameters | Pythagorean triples |
Pythagorean Triples: \(x^2 + y^2 = z^2\)
All primitive solutions given by: \(x = m^2 - n^2\), \(y = 2mn\), \(z = m^2 + n^2\) with \(m > n > 0\), \(\gcd(m, n) = 1\), \(m\) and \(n\) of opposite parity.
Fermat's Last Theorem: \(x^n + y^n = z^n\) for \(n > 2\)
Proven by Andrew Wiles in 1994: No nontrivial integer solutions exist for \(n > 2\).
Brahmagupta's Identity: If \((x_1, y_1)\) and \((x_2, y_2)\) solve \(x^2 - Dy^2 = k\), then their composition gives another solution.
This is the basis for the Brahmagupta-Bhaskara equation and the chakravala method.
Diophantus of Alexandria writes Arithmetica, containing 130 algebraic problems with integer solutions.
Brahmagupta gives the first systematic solution to Pell's equation \(x^2 - Dy^2 = 1\).
Bhaskara II develops the chakravala method, a complete algorithm for solving Pell's equation.
Pierre de Fermat challenges European mathematicians to solve Pell's equation for specific values of D.
Joseph-Louis Lagrange proves that Pell's equation always has infinitely many solutions for non-square D.
Calculator Features:
Diophantus of Alexandria (c. 200-284 CE) is often called the "father of algebra." His work Arithmetica was the first to use symbols for unknowns and powers, laying the foundation for algebraic notation.
Learn More