Skip to content

Three difficult Risch tests fail with 'buffered_operate_to! is not implemented' #139

Closed

Description

@s-celles

Running TEST_GROUP=difficult on current main (ea0d9e6), three Risch tests fail with

ErrorException("`buffered_operate_to!(::BigInt, ::BigInt, sub_mul, ::BigInt, ::Int64, ::BigInt)` is not implemented.")

for

  • (3 + 2x) / ((7 + 6x)^3)
  • (7 + 8x^3) / ((1 + x)*(1 + 2x)^3)
  • 1 / ((-1 + x^2)^2)

They are reported as regressions against test/difficult_baseline.jl (expected=1 actual=3, expected=0 actual=3, expected=1 actual=3).

What is known

buffered_operate_to! comes from MutableArithmetics, reached through AbstractAlgebra/Nemo. The method exists for uniform argument types but not for the mixed BigInt/Int64 combination reached here.

What I could not do

I could not build a minimal reproducer. Each of the three integrals succeeds when run on its own, and also when the three are run back to back in one session:

julia> using Symbolics, SymbolicIntegration; @variables x;

julia> integrate((3 + 2x)/((7 + 6x)^3), x, RischMethod(catch_errors=false))
(-(1//81) - (1//108)*x) / ((49//36) + (7//3)*x + x^2)

So the failure appears to depend on state accumulated over the full difficult run (hundreds of integrals) rather than on the integrand alone. Note also that the harness wraps both integrate and the simplify(computed - expected; expand=true) comparison in the same try, so the exception may be raised by either; I could not reproduce it from the comparison either.

Filing it here rather than upstream because I cannot yet point at the responsible package with a reproducer, and because the three entries currently sit in test/difficult_baseline.jl as unexplained regressions. Anyone able to catch a backtrace from inside a full difficult run would pin it down quickly.

Environment

Julia 1.13.0, Nemo 0.56.1, AbstractAlgebra 0.50.2, MutableArithmetics 1.8.0, Symbolics 7.39.2, SymbolicUtils 4.46.6.

Note that test/difficult_baseline.jl also reports six improvements on this environment (sin(x), sin(x)*x^2, cos(x)*x^3, sin(5x)*(2 + 3x), sin(1/x)/x^2 for Risch, and one RuleBased entry), so the baseline as a whole looks to have been recorded against older dependency versions.


Disclosure: this issue was investigated and written with AI assistance. The runs and version checks above were performed before filing.

Activity

  1. s-celles commented on Sep 27, 2026

    @s-celles
    ContributorAuthor

    Fixed by an upstream release. All three integrands now integrate without the
    buffered_operate_to! error:

    julia> method = RischMethod(catch_errors = false);
    
    julia> integrate((3 + 2x) / ((7 + 6x)^3), x, method)
    (-(1//81) - (1//108)*x) / ((49//36) + (7//3)*x + x^2)
    
    julia> integrate((7 + 8x^3) / ((1 + x) * (1 + 2x)^3), x, method)
    log(1 + x) + ((3//2)*x) / ((1//4) + x + x^2)
    
    julia> integrate(1 / ((-1 + x^2)^2), x, method)
    -(1//4)*log(1 - x) + (1//4)*log(1 + x) + ((-1//2)*x) / (-1 + x^2)

    Julia 1.13.0, with SymbolicUtils 4.48.0, Symbolics 7.41.1, Nemo 0.56.1 and
    AbstractAlgebra 0.50.2. The difficult CI logs of the currently open pull
    requests no longer mention buffered_operate_to! either.

    The cause was not MutableArithmetics or AbstractAlgebra, as this issue assumed,
    but a SymbolicUtils regression:

    So the affected window is SymbolicUtils v4.46.5 to v4.46.6. I checked the tag
    membership of both commits directly; the bisection that first pointed at them
    came from the automated review of #140.

    Worth noting that #136 raises the SymbolicUtils compat bound to "4.46.8", so
    once it lands a resolution inside the broken window is no longer possible.

    Closing as resolved upstream.

    Assisted by: AI

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