Ask Your Question

# 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

## 1 Answer

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+b*i

more

1

## Your Answer

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

Add Answer

## Stats

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

Seen: 90 times

Last updated: Jun 29 '15