The following code returns 1/2
, however it can be easily verified that
$$\int_0^1 \max(x,\ 1-x)\,{\rm d}x = \frac34.$$
What's wrong?
from sage.symbolic.integration.integral import definite_integral
var('x')
definite_integral(max(x,1-x),x,0,1)
1 | initial version |
The following code returns 1/2
, however it can be easily verified that
$$\int_0^1 \max(x,\ 1-x)\,{\rm d}x = \frac34.$$
What's wrong?
from sage.symbolic.integration.integral import definite_integral
var('x')
definite_integral(max(x,1-x),x,0,1)