New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5th-order ODE with irrational coefficient fails #15520

Open
cbm755 opened this Issue Nov 21, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@cbm755
Copy link
Contributor

cbm755 commented Nov 21, 2018

Follow up to #15311.

Thanks @oscarbenjamin for the fix in #15408.
I think there are some deeper issues. If those were fixed perhaps your fix would not be needed. Or maybe it is still needed to get concrete results instead of RootOf junk; I'm not sure.

Anyway, consider this existing test:

 def test_nth_linear_constant_coeff_homogeneous_rootof():
     eq = f(x).diff(x, 5) + 11*f(x).diff(x) - 2*f(x)
     sol = Eq(f(x),
         C1*exp(x*rootof(x**5 + 11*x - 2, 0)) +
         C2*exp(x*rootof(x**5 + 11*x - 2, 1)) +
         C3*exp(x*rootof(x**5 + 11*x - 2, 2)) +
         C4*exp(x*rootof(x**5 + 11*x - 2, 3)) +
        C5*exp(x*rootof(x**5 + 11*x - 2, 4)))
    assert dsolve(eq) == sol

But if you change the 11 to sqrt(3), it will fail

eq = f(x).diff(x, 5) + sqrt(3)*f(x).diff(x) - 2*f(x)
NotImplementedError: CRootOf is not supported over EX

Inevitably roots will return empty for some polynomials of degree 5 and above (b/c of Abel-Ruffini). And then the new code falls back on RootOf, which fails as per @oscarbenjamin's issue #15413.

skirpichev referenced this issue in skirpichev/diofant Nov 21, 2018

skirpichev added a commit to skirpichev/diofant that referenced this issue Nov 21, 2018

Add regression test
Closes sympy/sympy#15520

And a minor rewrite of
test_nth_linear_constant_coeff_homogeneous_RootOf()

skirpichev added a commit to skirpichev/diofant that referenced this issue Nov 21, 2018

Add regression test
Closes sympy/sympy#15520

And a minor rewrite of
test_nth_linear_constant_coeff_homogeneous_RootOf()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment