Error with integrate

31 views
Skip to first unread message

Matt Rissler

unread,
Nov 19, 2015, 10:41:37 AM11/19/15
to sage-support
integrate(x^(3-1)*(1-x)*(3-1),x,0,1)

Why is this returning 1/6 and not 1/30?

More generally why is 

integrate(x^(ai-1)*(1-x)*(bi-1),x,0,1)

returning (bi - 1)/(ai^2 + ai) and not beta(ai,bi) as it should?

Running this on SMC.

Dima Pasechnik

unread,
Nov 19, 2015, 11:31:10 AM11/19/15
to sage-support


On Thursday, 19 November 2015 15:41:37 UTC, Matt Rissler wrote:
integrate(x^(3-1)*(1-x)*(3-1),x,0,1)

Why is this returning 1/6 and not 1/30?

well you can check by hand that it is 1/6, for you are integrating a polynomial
2*x^2-2*x^3
the antiderivative is 2*(x^3/3-x^4/4), and you get 2*(1/3-1/4)-0=1/6...

perhaps you mean some other function....

Matt Rissler

unread,
Nov 19, 2015, 12:05:55 PM11/19/15
to sage-support
Thanks for debugging my code.  Should have been (1-x)^(3-1).  I'm blaming that on having a one-week old at home.
Reply all
Reply to author
Forward
0 new messages