DGS Studio

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

Try a change

Solve Equation opens the original input in the equation workspace and displays its symbolic results, conditions, and solution steps.

Edit and generate

Solve Equation opens the studio homepage and runs this field. Open in DGS Studio loads the same text and waits for you to generate it. The equation is sent once, as a query parameter.

Related examples