Skip to content

tan or cotan of arcsin or arccos equal to i returns numerical junk instead of { } #2763

Backlog

Description

@Rafael-SOWNet

On master (9b75a26), tan or cotan of an inverse sine or cosine set equal to ±i returns large complex numbers from the numerical search. tan(w) never equals ±i for any finite w (tan(w) = i means e^(2iw) = 0), so the answer is { }, which the solver already gives for tan(x) = i itself.

Solve master true answer
tan(arcsin(x)) = i { -24258808.638504 + 87745223.784967i, 24258808.638504 + 87745223.784967i } (1.6 s) { }
cotan(arccos(x)) = i three roots of size about 10^8 { }
tan(x) = i { } { }

The reported values are not roots: tan(arcsin(x)) - i at them is not 0, only small because tan(arcsin(x)) = x / sqrt(1 - x^2) tends to ±i as |x| grows. The analytical path inverts tan to the empty set and the search then runs on the original equation.

Found by #2761's sweep over outer trigonometric functions of inverse ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions