Message Boards Message Boards

Plot ArcSin[Cos[x]]-ArcCos[Abs[Sin[x]]] using W|A?

Posted 4 years ago

ArcSin[Cos[x]]-ArcCos[Abs[Sin[x]]]

link to wolframalpha

two gap

Where did the breaks come from if they shouldn't be?

thanks for the answer

POSTED BY: Aleksey Belyanin
5 Replies

The function ArcCos[t] has infinite derivative for t=1. Whatever approximation is likely to lose precision.

POSTED BY: Gianluca Gorni

When x is near Pi/2, a small variation in Abs[Sin[x]] causes a large variation in ArcCos. I suppose this can cause little instabilities when working with machine numbers. The gaps will be related to the algorithms used to calculate ArcCos near 1. I don't have the expertise to say more.

POSTED BY: Gianluca Gorni

https://en.wikipedia.org/wiki/Taylor_series

I think one of the decompositions of a number of Taylor is used. Do you want to say that with arccos(1) this approach produces an inadequate result?

POSTED BY: Aleksey Belyanin

The function ArcCos[t] has infinite derivative for t=1. I suppose this causes some numerical instability of ArcCos[Abs[Sin[x]]] when x is near Pi/2. Just set WorkingPrecision -> 10 to increase the precision of the calculation.

POSTED BY: Gianluca Gorni

Does an increase in accuracy help? does this only hide the problem from scope? I just want to understand what causes this instability at the Pi / 2 point? Is it possible to determine the distance between two gaps?

sorry my English.

POSTED BY: Aleksey Belyanin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract