Skip to content

Invalid output for incomplete elliptic integral of the second kind with k = 1 #321

Description

@shatalinra

Directory: boost/math/special_functions/
Files: ellint_2.hpp

Inside function ellint_e_imp in file ellint_2.hpp there is a special branch at 74 line for case when k = 1. It seems the original idea was that in this case the expression in the integral becomes sqrt(1 - sin(phi)^2). Using trigonometry, it simplifies to sqrt(cos(phi)^2) which is always non-negative. However, it is wrong to substitute that expression with just cos(phi) which can be negative. Therefore it is a mistake to just replace integral with sine function in that case and intergal suddenly loses its monotonically increasing property.

Activity

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions