Opened 12 years ago

Closed 21 months ago

## #9825 closed defect (fixed)

# desolve_system unable to interpret ilt and Maxima's temporary variables

Reported by: | Ryan Hinton | Owned by: | Burcin Erocal |
---|---|---|---|

Priority: | major | Milestone: | sage-9.3 |

Component: | calculus | Keywords: | calculus, maxima, symbolics |

Cc: | Robert Marik | Merged in: | |

Authors: | Emmanuel Charpentier | Reviewers: | Karl-Dieter Crisman |

Report Upstream: | Fixed upstream, in a later stable release. | Work issues: | |

Branch: | 74d88f4 (Commits, GitHub, GitLab) | Commit: | 74d88f4c23873e83dad685dc1dbc4530f38bfb52 |

Dependencies: | Stopgaps: |

### Description

desolve_system sometimes generates a Maxima result that includes temporary variables that Sage does not parse correctly.

sage: t = var('t') sage: x1 = function('x1', t) sage: x2 = function('x2', t) sage: de1 = (diff(x1,t) == -3*(x2^2-1)) sage: de2 = (diff(x2,t) == 1) sage: desolve_system([de1, de2], [x1, x2], ivar=t) ... TypeError: unable to make sense of Maxima expression 'x1(t)=ilt(-((3*laplace(x2(t)^2,t,?g1543)-x1(0))*?g1543-3)/?g1543^2,?g1543,t)' in Sage

### Change History (22)

### comment:1 follow-up: 2 Changed 12 years ago by

### comment:2 Changed 12 years ago by

Replying to kcrisman:

On [ this Maxima list thread] we get the original system in Maxima notation - thanks to Stavros Macrackis:

Meaning this thread.

### comment:3 Changed 11 years ago by

I've followed up again at this new thread - apparently it never actually made it to their bug tracker?

### comment:5 Changed 9 years ago by

And this ask.sagemath question, thought here Maxima is actually asking a question about these variables!

### comment:6 Changed 9 years ago by

Milestone: | sage-5.11 → sage-5.12 |
---|

### comment:7 Changed 9 years ago by

Milestone: | sage-6.1 → sage-6.2 |
---|

### comment:8 Changed 9 years ago by

Milestone: | sage-6.2 → sage-6.3 |
---|

### comment:9 Changed 8 years ago by

Report Upstream: | N/A → Reported upstream. No feedback yet. |
---|

### comment:10 Changed 8 years ago by

Did you report it upstream to their bug tracker? I never heard on either of these emails, so I think this is how it will have to be reported.

### comment:12 Changed 8 years ago by

Sadly, that isn't always enough :( Reported upstream here, however, just now. There was internal discussion in the original Maxima thread so I took it that the experts had several possible resolutions.

### comment:13 Changed 8 years ago by

Milestone: | sage-6.3 → sage-6.4 |
---|

### comment:14 Changed 8 years ago by

Report Upstream: | Reported upstream. No feedback yet. → Fixed upstream, in a later stable release. |
---|

Upstream seems to have made a change that would do something about this. Anyone want to give it a whirl?

### comment:15 follow-up: 16 Changed 8 years ago by

Summary: | desolve_system unable to interpret Maxima's temporary variables → desolve_system unable to interpret ilt and Maxima's temporary variables |
---|

This now returns `[x1(t) == ilt(-(3*g3390*laplace(x2(t)^2, t, g3390) - g3390*x1(0) - 3)/g3390^2, g3390, t), x2(t) == t + x2(0)]`

so it becomes an issue to fix our Maxima interface.

### comment:16 Changed 8 years ago by

Replying to rws:

This now returns

`[x1(t) == ilt(-(3*g3390*laplace(x2(t)^2, t, g3390) - g3390*x1(0) - 3)/g3390^2, g3390, t), x2(t) == t + x2(0)]`

so it becomes an issue to fix our Maxima interface.

According to the documentation of `inverse_laplace`

this is probably more or less correct. We might want to do something about "ilt" so that it is more closely tied to `inverse_laplace`

, though.

### comment:17 Changed 21 months ago by

Milestone: | sage-6.4 → sage-duplicate/invalid/wontfix |
---|---|

Status: | new → needs_review |

This is now fixed (probably due to upstream upgrade) :

sage: x1, x2=function("x1, x2") sage: de1=x1(t).diff(t)==-3*(x2(t)-1) sage: de2=x2(t).diff(t)==1 sage: Sol=desolve_system([de1, de2],[x1(t),x2(t)],ivar=t) ; Sol [x1(t) == -3/2*t^2 - 3*t*x2(0) + 3*t + x1(0), x2(t) == t + x2(0)]

==> invalidation of the bug and review query in order to get this bug closed.

HTH,

### comment:18 Changed 21 months ago by

Status: | needs_review → needs_work |
---|

I guess as usual doctest needed? Looks like it was a combination of their upstream fix and something we did to parse it right.

### comment:19 Changed 21 months ago by

Branch: | → u/charpent/desolve_system_unable_to_interpret_ilt_and_maxima_s_temporary_variables |
---|

### comment:20 Changed 21 months ago by

Commit: | → 74d88f4c23873e83dad685dc1dbc4530f38bfb52 |
---|---|

Milestone: | sage-duplicate/invalid/wontfix → sage-9.3 |

Status: | needs_work → needs_review |

### comment:21 Changed 21 months ago by

Authors: | → Emmanuel Charpentier |
---|---|

Reviewers: | → Karl-Dieter Crisman |

Status: | needs_review → positive_review |

Thanks, this is great. Despite patchbot not yet reporting and my own Sage install being too brittle to test, Cell server says it's fine so let's do it.

### comment:22 Changed 21 months ago by

Branch: | u/charpent/desolve_system_unable_to_interpret_ilt_and_maxima_s_temporary_variables → 74d88f4c23873e83dad685dc1dbc4530f38bfb52 |
---|---|

Resolution: | → fixed |

Status: | positive_review → closed |

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

On [ this Maxima list thread] we get the original system in Maxima notation - thanks to Stavros Macrackis:

He also provides a simpler example which does this:

The suggestion is that the ilt should be replacing the

`?g1234`

type variables (which are indeed dummy variables, but native Lisp ones) by Maxima-type ones, so I am putting to reported upstream, developers acknowledge bug. However, my feeling is that we should fix this by parsing these things as well, should they come up again.