ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 29 Jun 2015 15:21:52 +0200Another problem with integralhttps://ask.sagemath.org/question/27237/another-problem-with-integral/This is a follow-up to 'Problem with integral' which is a follow-up of 'Problem with hypergeometric'. I am still trying to solve the same basic problem with Sage and I am just reporting what I am experiencing.
F = lambda z: (1/pi)*integral((x-1)^z*sqrt(1/x-1/4), x,0,4)
print F(1/2).n()
NaN
print F(3/2).n()
0.509025648974361 Exception ValueError: ValueError('negative number to a fractional power not real',) in 'sage.gsl.integration.c_ff' ignored [The error message some 20 times.]
With Maple:
F := z -> (1/Pi)*int((x-1)^z*sqrt(1/x-1/4), x=0..4);
evalf(F(1/2)); 0.3697166867 + 0.4838248688*I
evalf(F(3/2)); 0.5090256475 - 0.3669993270 IPeter LuschnyMon, 29 Jun 2015 15:21:52 +0200https://ask.sagemath.org/question/27237/integral should not be zerohttps://ask.sagemath.org/question/24532/integral-should-not-be-zero/
F = sqrt((cos(x) - 1)^2 + sin(x)^2)
F.integrate(x, 0, 2*pi)
yields 0, the expected answer is 8.
jllbMon, 20 Oct 2014 00:44:26 +0200https://ask.sagemath.org/question/24532/