Diophantine Equation Solver
Diophantine Equation Solver finds integer solutions to linear equations of the form \\( ax + by = c \\) with solution plotting.
Diophantine Equation Solver
Finds integer solutions to the linear Diophantine equation:
Equation: \\( ax + by = c \\)
Conditions for Solvability:
- Solutions exist if and only if \\(\gcd(a, b)\\) divides \\( c \\).
- If \\(\gcd(a, b) = d\\) and \\( d \mid c \\), a particular solution can be found.
- General solution: If \\( (x_0, y_0) \\) is a particular solution, then: \\[ x = x_0 + \frac{b}{d} k, \quad y = y_0 – \frac{a}{d} k, \quad k \in \mathbb{Z} \\]
Where:
- \\( a, b \\): Integer coefficients
- \\( x, y \\): Integer variables
- \\( c \\): Integer constant
- \\( \gcd(a, b) \\): Greatest common divisor
- \\( k \\): Integer parameter
Diophantine Equation Solver
Diophantine Equation Solver (Example 1)
Equation: \\( 3x + 6y = 9 \\)
\\[ \gcd(3, 6) = 3, \quad 3 \mid 9 \\]
\\[ x_0 = 3, y_0 = 0 \quad (\text{particular solution}) \\]
\\[ x = 3 + 2k, \quad y = -k, \quad k \in \mathbb{Z} \\]
Diophantine Equation Solver (Example 2)
Equation: \\( 4x + 6y = 10 \\)
\\[ \gcd(4, 6) = 2, \quad 2 \mid 10 \\]
\\[ x_0 = 2, y_0 = 1 \quad (\text{particular solution}) \\]
\\[ x = 2 + 3k, \quad y = 1 – 2k, \quad k \in \mathbb{Z} \\]
Diophantine Equation Solver (Example 3)
Equation: \\( 5x + 7y = 13 \\)
\\[ \gcd(5, 7) = 1, \quad 1 \mid 13 \\]
\\[ x_0 = 6, y_0 = -1 \quad (\text{particular solution}) \\]
\\[ x = 6 + 7k, \quad y = -1 – 5k, \quad k \in \mathbb{Z} \\]
Diophantine Equation Solver (Example 4)
Equation: \\( 2x + 4y = 6 \\)
\\[ \gcd(2, 4) = 2, \quad 2 \mid 6 \\]
\\[ x_0 = 3, y_0 = 0 \quad (\text{particular solution}) \\]
\\[ x = 3 + 2k, \quad y = -k, \quad k \in \mathbb{Z} \\]