First time here? Check out the FAQ!

Ask Your Question
0

Problem with integral

asked 9 years ago

Peter Luschny gravatar image

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 ...

Preview: (hide)

Comments

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

rws gravatar imagerws ( 9 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 9 years ago

calc314 gravatar image

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
Preview: (hide)
link

Comments

1
rws gravatar imagerws ( 9 years ago )

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 9 years ago

Seen: 234 times

Last updated: Jun 29 '15