Integer Solutions
Integer Circle
The integer points on x^2 + y^2 = 25 are the 12 lattice points using 0, ±3, ±4, and ±5.
solve(x^2 + y^2 = 25, x, y, domain=integers) asks for the lattice points on the circle of radius 5. Each square is nonnegative, so |x| ≤ 5 and |y| ≤ 5. That box is forced by the equation. Every integer pair inside it is checked, and pairs outside it make one square larger than 25.
The 12 integer solutions are (0, ±5), (±5, 0), and all sign combinations of (±3, ±4) and (±4, ±3). Over the real numbers the circle has infinitely many points. The integer solution set is this finite list. Negative coordinates are included because the domain is all integers.
Equation
solve(x^2 + y^2 = 25, x, y, domain=integers)
How the equation is solved
Solve Equation keeps the algebra steps, not a curve. A linear equation isolates the variable. A polynomial can have several roots. A result is kept exact when it is an integer, a fraction, or a simple radical, and an approximation is added only when that helps.
Some inputs are identities or contradictions. 0·x = 0 is true for every x. 0·x = 5 is true for none. A system followed by 'find' solves the equations first and then evaluates the requested expression. The editor below sends the text you leave in the field.
Reading the input
solve(x^2 + y^2 = 25, x, y, domain=integers)— This is a command. The name selects the routine, and the items inside the parentheses are its arguments.
Try a change
- Edit one number in the field, then use Solve Equation. The studio opens on the homepage with the edited text and runs it.
- Use Open in DGS Studio when you want the expression loaded but not run yet.
Solve Equation opens the original input in the equation workspace and displays its symbolic results, conditions, and solution steps.