Ask Your Question

differential equation problems.

asked 2011-01-18 17:24:58 +0200

mhfrey gravatar image

updated 2011-05-05 15:38:20 +0200

Kelvin Li gravatar image

I am trying to get the differential equation examples to work:

x = var('x') y = function('y',x) desolve(diff(y,x) + y - 1, y)


t = var('t') x = function('x',t) DE = diff(x, t) + x - 1 desolve(DE, [x,t])

Both return errors. What am I doing wrong?

edit retag flag offensive close merge delete


Surprising! I copy pasted both the equations and they work fine for me.

Shashank gravatar imageShashank ( 2011-01-18 19:11:41 +0200 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2011-01-18 19:14:14 +0200

DSM gravatar image

You may not be doing anything wrong. I got two different kinds of errors:

TypeError: Error executing code in Maxima
    sage99 : ('y(x))+(diff('y(x), x, 1))+(-1)$
Maxima ERROR:
     sage99 : ('y(x))+(diff('y(x), x, 1))+(-1)$

stdin:7094:Incorrect syntax: Too many )'s
stdin:7145:Incorrect syntax: Premature termination of input at $.


sage: desolve(diff(y,x) + y - 1, y)

before getting the right answer:

sage: desolve(diff(y,x) + y - 1, y)
(c + e^x)*e^(-x)

Then I did it from a restart and everything worked the first time, and I can't reproduce the errors anymore. Looks like the maxima interface can get itself into a state, whether because of something I'd done previously or not. But this definitely shouldn't happen: were these the same kinds of errors you saw?

edit flag offensive delete link more

answered 2011-01-18 20:54:09 +0200

mhfrey gravatar image

I had to restart and it is working now for both examples. Unfortunately I did not capture the error information. If I see it again I will capture the information and post it.

Thank you for your help.

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: 2011-01-18 17:24:58 +0200

Seen: 468 times

Last updated: Jan 18 '11