Question: Multiple Integration with badly behaved integrand

restart;

with(VectorCalculus);

with(LinearAlgebra);

r1 := Vector([0, 0, 1]);

r2 := Vector([sin(theta1), 0, cos(theta1)]);

r3 := Vector([VectorCalculus:-`*`(sin(theta2), cos(phi2)), VectorCalculus:-`*`(sin(theta2), sin(phi2)), cos(theta2)]);

M := Matrix([r1, r2, r3]); ex := `assuming`([simplify(VectorCalculus:-`*`(Determinant(M), 1/VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`+`(1, DotProduct(r1, r2)), DotProduct(r1, r3)), DotProduct(r2, r3))))], [theta1 > 0, theta2 > 0, phi2 > 0]);

dex := eval(simplify(diff(arctan(ex), phi2)), phi2 = t);

VectorCalculus:-`*`(2, Int(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, Int(dex, t = 0 .. phi2)), 1/VectorCalculus:-`*`(4, Pi)), VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, Pi), sin(theta1)), sin(theta2)), 1/VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(4, Pi), 4), Pi))), [phi2 = 0 .. Pi, theta2 = 0 .. Pi, theta1 = 0 .. Pi], method = _CubaCuhre, epsilon = 0.5e-2));

evalf(%)

 

 

Ok I deleted my other question, since there was a mistake. I actually want to integrate the following expression. The arctan is not every positive in my integral there, so I needed to go this way to make it continuous. The problem here is the nested integral inside Int(...,t=0..phi2) which leads to maple not being able to evaluate.

Please Wait...