Opened 21 months ago

Last modified 2 months ago

#28319 new defect

Some ODEs with known solutions cause Sage to hang indefinitely

Reported by: gh-BrentBaccala Owned by:
Priority: minor Milestone: sage-9.4
Component: misc Keywords: ordinary differential equations
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Maxima's contrib_ode package links to several other Maxima packages, including kovacicODE, which implements Kovacic's algorithm. This algorithm finds all elementary solutions to a second-order linear, homogeneous differential equation with rational coefficients.

Although Sage has an interface to this package, it doesn't seem to work right. I checked this in Sage 8.9.beta4.

For example, this differential equation is Example 1 in §3.2 of Kovacic's original paper [1]:

sage: r = 1/4*(4*x^6 - 8*x^5 + 12*x^4 + 4*x^3 + 7*x^2 - 20*x + 4)/x^4
sage: y = function('y')(x)
sage: desolve(diff(y,x,2) - r*y, y)

This yields the message "Maxima was unable to solve this ODE. Consider to set option contrib_ode to True."

This message is intelligible, but is not grammatically correct. Running desolve with contrib_ode=True:

sage: desolve(diff(y,x,2) - r*y, y, contrib_ode=True)

causes Sage to hang until a keyboard interrupt. ps doesn't show maxima running at all during this time.

[1] gives a closed-form solution that can be easily verified:

sage: f = x^(-3/2)*(x^2-1)*exp(-1/x+x^2/2-x)
sage: expand(diff(f,x,2) - r*f)

We should investigate this problem, fix it (and the grammar of the error message), and possibly add all of the examples from [1] to our test suite.

[1]: Kovacic, An algorithm for solving second order linear homogeneous differential equations, J. Symbolic Comput. 2 (1986), no. 1, 3–43. MR 839134 (88c:12011)

Change History (4)

comment:1 Changed 16 months ago by embray

  • Milestone changed from sage-8.9 to sage-9.1

Ticket retargeted after milestone closed

comment:2 Changed 12 months ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-9.2

Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.

comment:3 Changed 8 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:4 Changed 2 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

Note: See TracTickets for help on using tickets.