#28666·sympy

`simplify` does not remove constants in `x² + 1 = y² + 1`

Author: randolf-scholzCreated Nov 28, 2025Updated Sep 15, 2026
Labelssimplify
python
import sympy as sp  # 1.14.0

x = sp.symbols("x", real=True)
y = sp.symbols("y", real=True)

display(sp.Eq(x + 1, y + 1).simplify())
display(sp.Eq(x**2 + 1, y**2 + 1).simplify())

$x+1=y+1$ simplifies to $x=y$ as expected, but $x^2 + 1 = y^2 + 1$ does not simplify to $x^2 = y^2$. Tested with version 1.14.0

Image

[Addition by cps]

Multiplicative constants are handled better but still, symbolic constants representing finite signed quantities could also be handled:

Image