Does solve(...) respects symbol(..., real=True) assumption?
wli75 opened this issue · comments
wli75 commented
Does solve
know about symbol assumptions?
I'm surprised sympy suggested the first solution in the following example.
L, a, b, x = symbols("L a b x", negative=False, real=True)
L_eq = Eq(L ** 2, (a + x) ** 2 + (b + (a * b / x)) ** 2)
solve(L_eq, L)
# [
# (-a - x)*sqrt(b**2 + x**2)/x, # I'm surprised sympy suggested this
# (a + x)*sqrt(b**2 + x**2)/x
# ]