3

Given the equation |x - 5| + |y| = 5, how can one solve it using SymPy?

If I'm using a combination of solve() and Abs() it gives me this error

solving Abs(x - 5) when the argument is not real or imaginary

But, at the beginning of my session I wrote down that

x, y, z = symbols('x, y, z', RealNumber = True)

What am I doing wrong?

Thanks!

4

1 回答 1

3

好的,我发现了,问题出在哪里。声明错了,只好改成表格

x, y, z = symbols('x y z', real=True)
于 2015-10-18T13:21:23.027 回答