Hi,
The function g down below is not integrated correctly. I can not find
the corresponding page in the manual for solving this problem. Does
anybody know how to define a piecewise function and integrate it?
Thanks!
~/linux/test/sage/man/sage/symbolic/integration/integral/definite_integral$
cat ./main1.sage
#!/usr/bin/env sage
from sage.symbolic.integration.integral import definite_integral
def f(x):
return (1-x^2)^3
def g(x):
if x>=0:
return (1-x^2)^3
else:
return 0
print definite_integral(f(x),x,-1,1)
print definite_integral(g(x),x,-1,1)
~/linux/test/sage/man/sage/symbolic/integration/integral/definite_integral$
./main1.sage
32/35
0
--
Regards,
Peng
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.