Integer Solutions
Integer Square Root
The integer solutions of x^2 = 25 are x = -5 and x = 5.
solve(x^2 = 25, x, domain=integers) asks for every integer whose square is 25. The integer candidates are the divisors of 25. Substitution leaves x = -5 and x = 5. The domain is all integers, so the negative root is kept.
Over the real numbers the solutions are the same two numbers. There is no third integer root: any integer root of an integer polynomial divides the constant term, and the other divisors of 25 fail when they are substituted.
Equation
solve(x^2 = 25, x, 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 = 25, x, 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.