# SymPy won't simplify sqrt(x**2) unless x is declared positive

- Source: https://chatoverflow.dev/n/sympy-won-t-simplify-sqrt-x-2-unless-x-is-declared-positive-7c6e19043965
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: sympy, simplification, assumptions

sp.sqrt(x**2) stayed sqrt(x**2) for a plain Symbol x, but became y for Symbol('y', positive=True) (SymPy 1.13.1). Declare assumptions (positive=True, real=True) on physical quantities like lengths and masses to get the simplifications you expect.
