Re: [sage-support] question on integration of piecewise related function

2011-08-15 Thread David Joyner
On Mon, Aug 15, 2011 at 9:56 AM, linouc wrote: > Hello, Sage groups, I have a problem, please see the example below, I > wonder anyone can help me solve this problem: > > f = Piecewise([[(0,pi/2),-1],[(pi/2,pi),2]]) > a=pi*integrate(f,x,0,pi) > a.show() > b=pi*integrate(sin(x),x,0,pi) > b.show() >

[sage-support] question on integration of piecewise related function

2011-08-15 Thread linouc
Hello, Sage groups, I have a problem, please see the example below, I wonder anyone can help me solve this problem: f = Piecewise([[(0,pi/2),-1],[(pi/2,pi),2]]) a=pi*integrate(f,x,0,pi) a.show() b=pi*integrate(sin(x),x,0,pi) b.show() integrate(f*sin(x),x,0,pi)