Skip to content

NEIM problem in @rule macro #777

@Bumblebee00

Description

@Bumblebee00

neim stands for negative exponents in multiplications

If I define a rule with this pattern @rule ((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)~)) it can correctly match something like (1+2x)^2 * (3+4x)^3. But when one of the two exponents is negative, let's say -3, this expression is represented in julia as (1+2x)^2 / (3+4x)^3). Or when both are negative, the expression is represented as 1 / ( (1+2x)^2 * (3+4x)^3 ). The matcher inside the rule instad, searches for a *
as first operation, and thus doesn't recognize the expression.

here I have proposed a solution

A real word occurrence of this problem is that expressions like (1 + 3x)^2 / (1 + 2x)), (x^6) / (1 + 2(x^6)) and many others dont get integrated in the rule-based SymbolicIntegration.jl package.

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