Problem with integral

Considering my last question ('Problem with hypergeometric') I tried to replace my Ansatz with a different formula. Here what happened:

F = lambda z: (2/pi)*integral((4*cos(x)^2-1)^z*sin(x)^2,x,0,pi)
print F(1/2)


RuntimeError: ECL says: Error executing code in Maxima:

With Maple:

F := z -> (2/Pi)*int((4*cos(x)^2-1)^z*sin(x)^2,x=0..Pi);
evalf(F(1/2));  .3697166864+.4838437554*I


Oh mei oh mei ...

edit retag close merge delete

Well, SymPy and Fricas can't solve it either.

( 2015-06-29 15:07:47 +0200 )edit

Sort by ยป oldest newest most voted

This is definitely an issue. Looks like you can do it by integrating the real and imaginary parts separately:

a=numerical_integral(real(2/pi*(4*cos(x)^2-1)^(.5)*sin(x)^2),0,pi)
b=numerical_integral(imag(2/pi*(4*cos(x)^2-1)^(.5)*sin(x)^2),0,pi)
a[0]+b[0]*i

more

1
( 2015-06-30 08:27:01 +0200 )edit

Please start posting anonymously - your entry will be published after you log in or create a new account.

Stats

Asked: 2015-06-29 14:59:58 +0200

Seen: 160 times

Last updated: Jun 29 '15