Ask Your Question

desolve_system problem with exp()/e^

asked 2013-07-03 11:30:22 +0200

TeHeRu33 gravatar image

updated 2023-01-09 23:59:32 +0200

tmonteil gravatar image


I'm trying to solve ode system: x'=-2x+2y+e^t, y'=-2x+3y+3e^t

This is what I tried in Sage:



x = function('x', t)

y = function('y', t)

dgl1 = x.diff(t) == -2 * x + 2 * y + exp(t)

dgl2 = y.diff(t) == -2 * x + 3 * y + 3 * exp(t)

dgls = [dgl1, dgl2]

aw = [0, 0, -1]

S = desolve_system(dgls, [x, y], aw)

But I always get this error:

Traceback (click to the left of this block for traceback)


TypeError: ECL says: Maxima asks: Is ?g9271-1 positive, negative, or zero?

If I remove the exp(t) it works fine, also if I replace the exp(t) with for example 2^t Sage gives me a solution. I already tried using e^t instead of exp(t) and tried some assumptions (assume(x >= 0), assume(t >= 0), etc.). Anyone got an idea what I'm doing wrong? Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-03 12:51:36 +0200

kcrisman gravatar image

The ?g1234 is supposed to be an internal variable that the end user would not see, even in Maxima. See Trac 9825.

But I can't reproduce this in Maxima. Sorry this isn't much of an answer. Maybe this will spur someone one to be able to reproduce it; certainly this is an upstream bug, in the sense that it doesn't raise an error.

Maxima 5.29.1
using Lisp ECL 12.12.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) dgl1:'diff('x(t),t,1)=-2*x+2*y+exp(t);
                          d                         t
(%o1)                     -- (x(t)) = 2 y - 2 x + %e
(%i2) dgl2:'diff('y(t),t,1)=-2*x+3*y+3*exp(t);
                         d                           t
(%o2)                    -- (y(t)) = 3 y - 2 x + 3 %e
(%i6) atvalue(x(t),t=0,0);
(%o6)                                  0
(%i7) atvalue(y(t),t=0,-1);
(%o7)                                 - 1
(%i8) [desolve([dgl1,dgl2],[x(t),y(t)]);](http://)

desolve: can't handle this case.
 -- an error. To debug this try: debugmode(true);
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-07-03 11:30:22 +0200

Seen: 355 times

Last updated: Jul 03 '13