The codes

x,y = var('x,y');
f(x) = acos(sqrt((1-tan(x)^2)/2));
g(x) = integral(sin(y)^4,(y,f(x),pi-f(x)));
h(x) = sin(x)^2*cos(x)*g(x);
integral(h(x),(x,-pi/4,pi/4)), numerical_integral(h(x),-pi/4,pi/4)

produce

(1/16*sqrt(2)*pi, (0.1963495451106892, 9.705160370278192e-07))

SageMath version: 9.8 on Ubuntu 22.04 (SAGE was complied from source)

We believe the numerical answer is correct (that should be 
pi/16=0.1963....) since we got that answer by computing the integral in 
another way by hand.

We were surprised that 'integral' can give us an answer and even more 
surprised by the fact that it is off by a factor of sqrt(2) from the answer 
given by 'numerical_integral'.

Any insight of what's happening here?

--Pong

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/f1b3157d-20b5-4e7f-aa72-8046f84d5183n%40googlegroups.com.

Reply via email to