Open in CoCalc with one click!
%default_mode fricas
ex:=sqrt( cot(x)^2 )
+-------+ | 2 \|cot(x) Type: Expression(Integer)
i1:=integrate(ex, x = %pi/4 .. 3*%pi/4,"noPole")
0 Type: Union(f1: OrderedCompletion(Expression(Integer)),...)
%sage s1=integrate(sqrt( cot(x)^2 ), x,pi/4,3*pi/4);s1
0
i2:=integrate(ex, x)
sin(2x) 2 2log(-----------) - log(-----------) cos(2x) + 1 cos(2x) + 1 ------------------------------------ 2 Type: Union(Expression(Integer),...)
d1:=differentiate(i2,x)
2 2 sin(2x) + 2cos(2x) + 2cos(2x) ------------------------------- (cos(2x) + 1)sin(2x) Type: Expression(Integer)
normalize(ex-d1)
0 Type: Expression(Integer)
%sage s2=integrate( sqrt( cot(x)^2 ), x); s2
-1/2*log(tan(x)^2 + 1) + log(tan(x))
%sage (fricas(s2)-fricas('i2')).normalize()
0