another kind of division by zero in integration

8 views
Skip to first unread message

Qian Yun

unread,
Jan 26, 2024, 9:19:50 PM1/26/24
to fricas-devel

(1) -> integrate(1/(-1+cos(x)^2)^(1/2),x)

>> Error detected within library code:
catdef: division by zero


The trace is at the end of this mail.

Git bisect points to 2f4da615 in year 2015: "Consistently
integrate trigonometric functions via complex exponentials"

This commit exposes the bug instead of introducing the bug,
I think.

- Qian


===== TRACE =====

(4) -> integrate(1/(-1+cos(x)^2)^(1/2),x)
1<enter IntegrationResultToFunction.expand,36 :
x
4 tan(-)
--+ 1 2 2
arg1 = > - %F log(%F + ----------- %F + 1)
--+ 2 x 2
2 tan(-) + 1
%F + 1 = 0 2
arg2 = x
1<enter IntegrationResultToFunction.split,34 :
x
4 tan(-)
--+ 1 2 2
arg1 = > - %F log(%F + ----------- %F + 1)
--+ 2 x 2
2 tan(-) + 1
%F + 1 = 0 2
1>exit IntegrationResultToFunction.split,34 :
x
4 tan(-)
--+ 1 2 2
> - %F log(%F + ----------- %F + 1)
--+ 2 x 2
2 tan(-) + 1
%F + 1 = 0 2
1<enter IntegrationResultToFunction.ilog,63 :
arg1 = 0
x
4 tan(-)
2
arg2 = -----------
x 2
tan(-) + 1
2
arg3 = x
1<enter IntegrationResultToFunction.tantrick,72 :
arg1 = 0
x
4 tan(-)
2
arg2 = -----------
x 2
tan(-) + 1
2

>> Error detected within library code:
catdef: division by zero
Reply all
Reply to author
Forward
0 new messages