Ask Your Question
0

desolve_system problem with exp()/e^

asked 2013-07-03 04:30:22 -0600

updated 2013-07-03 06:32:34 -0600

tmonteil gravatar image

Hi!

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

This is what I tried in Sage:

reset()

var('t')

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
0

answered 2013-07-03 05:51:36 -0600

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 http://maxima.sourceforge.net
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
                          dt
(%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
                         dt
(%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

Stats

Asked: 2013-07-03 04:30:22 -0600

Seen: 150 times

Last updated: Jul 03 '13