Opened 3 years ago

Last modified 8 days ago

## #28319 new defect

# Some ODEs with known solutions cause Sage to hang indefinitely

Reported by: | Brent Baccala | Owned by: | |
---|---|---|---|

Priority: | minor | Milestone: | sage-9.8 |

Component: | misc | Keywords: | ordinary differential equations |

Cc: | Merged in: | ||

Authors: | Reviewers: | ||

Report Upstream: | N/A | Work issues: | |

Branch: | Commit: | ||

Dependencies: | Stopgaps: |

### Description

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) 0

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 (8)

### comment:1 Changed 3 years ago by

Milestone: | sage-8.9 → sage-9.1 |
---|

### comment:2 Changed 2 years ago by

Milestone: | sage-9.1 → 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 2 years ago by

Milestone: | sage-9.2 → sage-9.3 |
---|

### comment:4 Changed 20 months ago by

Milestone: | sage-9.3 → sage-9.4 |
---|

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

### comment:5 Changed 15 months ago by

Milestone: | sage-9.4 → sage-9.5 |
---|

### comment:6 Changed 9 months ago by

Milestone: | sage-9.5 → sage-9.6 |
---|

### comment:7 Changed 5 months ago by

Milestone: | sage-9.6 → sage-9.7 |
---|

### comment:8 Changed 8 days ago by

Milestone: | sage-9.7 → sage-9.8 |
---|

**Note:**See TracTickets for help on using tickets.

Ticket retargeted after milestone closed