When I try to simplify the following integral in sympy
, it will not evaluate, i.e. the output is $\int_{-1}^1 |z| dz$ while the output I expect is 1.
z = symbols('z', real=True)
a = integrate(abs(z), (z, -1, 1))
simplify(a)
Similar integral without the absolute value on z
will evaluate.
How can I get sympy
to evaluate this integral?