Skip to content

A family of roots whose members carry a condition is not listed inside a bounded interval: sin(x)/x = 0 and x in [-10; 10] stays an intersection #2502

Closed

Description

@Rafael-SOWNet

Since #2481 a family of roots met with a bounded interval is listed: sin(x) = 1/2 and x in [0; 2pi] is { pi / 6, pi - pi / 6 }. Where the members of the family carry a condition, as they do for an equation with a denominator, the intersection is left as written. On master (b76751a), and the same on 2.8.0, solving for x:

Answered Should be
sin(x) = 0 and x in [-5; 5] { 0, pi + 2 * pi * (-1), pi } as answered
sin(x)/x = 0 and x in [-10; 10] union({ 2 * pi * n provided not 2 * pi * n = 0, pi + 2 * pi * n provided not pi + 2 * pi * n = 0 }, n in ZZ) /\ [-10; 10] { -3 pi, -2 pi, -pi, pi, 2 pi, 3 pi }
sin(x)^2/x = 0 and x in [-5; 5] the same family /\ [-5; 5] { -pi, pi }
cos(x)/(x - pi/2) = 0 and x in [-5; 5] union({ pi / 2 + 2 * pi * n provided not pi / 2 + 2 * pi * n - pi / 2 = 0, -pi / 2 + 2 * pi * n provided not -pi / 2 + 2 * pi * n - pi / 2 = 0 }, n in ZZ) /\ [-5; 5] { -3 pi / 2, -pi / 2, 3 pi / 2 }

The equation is not needed to see it. union({ 2 pi n }, n in ZZ) /\ [-10; 10] simplifies to { (-2) * pi, 0, 2 * pi }, and union({ 2 pi n provided not n = 0 }, n in ZZ) /\ [-10; 10] to [-10; 10] /\ union({ 2 * n * pi provided not n = 0 }, n in ZZ), where it is { -2 pi, 2 pi }.

RealMembers reads each member as c + k n with NumericLine. A member that is a provided node is not a sum of terms in n, so the method returns null for the whole family.

What decides such a member is already there once the index is a number. 2 * pi * n provided not 2 * pi * n = 0 is NaN at n = 0 and 2 * pi at n = 1 after InnerSimplified. And a finite set leaves out a member whose condition fails: { 2 * pi * 0 provided not 2 * pi * 0 = 0, 2 * pi * 1 provided not 2 * pi * 1 = 0 } simplifies to { 2 * pi }.

What it should do. Read the line c + k n from the expression of a conditioned member, find the indexes between the interval's ends as now, and put each index into the whole member, condition included. A member whose condition fails is left out. One whose condition is not decided leaves the intersection as written, as an undecided membership does now.

Membership has the same gap at the excluded point: 2 pi in union({ 2 * pi * n provided not 2 * pi * n = 0 }, n in ZZ) is True, and 0 in the same family is left as written, where it is False.

Two shapes further out. The symptom is the same and the cause is not; say if you want them as issues of their own.

Answered Should be
sin(e^x) = 0 and x in [0; 2] union(union({ ln(2 * pi * m) + 2 * pi * i * n }, m in ZZ \ { 0 }), n in ZZ) /\ [0; 2] \/ union(union({ ln(pi + 2 * pi * n) + 2 * pi * i * m }, m in ZZ), n in ZZ) /\ [0; 2] { ln(pi), ln(2 pi) }
x e^x = 2 and x in [-5; 5] union({ lambertw(n, 2) }, n in ZZ) /\ [-5; 5] { lambertw(2) }: lambertw(n, 2) is real at n = 0 alone

The first is a family inside a family. The index with the step 2 pi i gives a real member at one value only, which RealMembers finds for a single family. What is left is ln(2 pi m), which is not a line in m. In the second the member is not a line in n either.

Found while building browser demos of the library: the Calculus page of https://rafael-sownet.github.io/amlive/ marks the roots of sin(x)/x, and walks the family's indexes itself to do it.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions