Post Reply 
Incorrectly calculated integral.
05-21-2023, 01:56 PM (This post was last modified: 05-21-2023 02:36 PM by Albert Chan.)
Post: #4
RE: Incorrectly calculated integral.
(05-20-2023 08:00 PM)parisse Wrote:  Without dot, the CAS tries to compute a symbolic antiderivative. It transforms
f:=integrate(1/sqrt(1-(2+sqrt(3))/4*sin(x)^2),x,0,80*pi/180)
to integration(2/(sqrt(sin(x)^2+4*sqrt(3)-8)*(i*sqrt(2)/2-i*sqrt(6)/2)),x,0,80*pi/180) ...

This is a true bug, not just sqrt picking wrong branch.
Integand denominator should have +i*sqrt(6), not -i*sqrt(6)

m = (2 + √3)/4 ≈ 0.933      → √m = (√2 + √6)/4 ≈ 0.966
s = sin(x)

√(1-m*s^2) = ±√(-m) * √(s^2-1/m) = ±√(m)*i * √(s^2-1/m)

1-m*s^2 > 1-m > 0. Even if we pick the wrong sign, we should have correct size result.

Cas> m := (2+sqrt(3))/4
Cas> approx(int(1/(sqrt(m)*i * sqrt(sin(x)^2-1/m)), x, 0, 80*pi/180))

−2.13389514232

The bug is when Cas simplify √(-m).
Note: XCas 1.9.0-31 had the same bug

Cas> simplify(sqrt(-(2+sqrt(3))/4))          → (i*√2+(−i)*√6)/4 ≈ -0.259*i      ???

(05-20-2023 08:00 PM)parisse Wrote:  ... the choice of sqrt branch is not the same as for the initial integrand.

Another way is to stop integrand rewrite

Cas> quote(int(1/sqrt(1-(2+sqrt(3))/4*sin(x)^2), x, 0, 80/180*pi))
Cas> float(Ans)

2.13389514232
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Incorrectly calculated integral. - hp-zl - 05-20-2023, 06:00 PM
RE: Incorrectly calculated integral. - Albert Chan - 05-21-2023 01:56 PM



User(s) browsing this thread: 1 Guest(s)