Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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 I

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 I

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 I