sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 481 forks source link

integral with sqrt(cos)*sin unsolved #18821

Open rwst opened 9 years ago

rwst commented 9 years ago
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:

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

http://ask.sagemath.org/question/27235/problem-with-integral/

Component: calculus

Keywords: Maxima, integrate

Issue created by migration from https://trac.sagemath.org/ticket/18821

fchapoton commented 5 years ago

Changed keywords from Maxima to Maxima, integrate

fchapoton commented 5 years ago
comment:1

Works in sage 8.9.b7:

sage: F = lambda z: (2/pi)*integral((4*cos(x)^2-1)^z*sin(x)^2,x,0,pi)
sage: 
sage: F(0)
1
sage: F(1)
0
sage: F(0.5)
(1.161499228562 + 1.520039988172*I)/pi

But symbolic integration F(1/2) get stuck inside Sympy.