Ask Your Question
1

desolve not using/understanding assume()

asked 2012-05-07 09:35:59 +0200

Alexander gravatar image

I am trying to solve a differential equation with symbolic variables, but assume() does not seem to help answer maximas question:

t,a,b = var('t,a,b')
v = function('v',t)
de = diff(v,t)-a*v^2-b
assume((a*b)>0)
sol=desolve(de, dvar=v, ivar=t)

I still get the error message:

TypeError: ECL says: Maxima asks: Is  a*b  positive or negative?

How can i fix this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-05-07 10:11:18 +0200

ndomes gravatar image

updated 2012-05-07 15:06:45 +0200

You try to pass an assumption on an expression to maxima. Very Likely you can pass an assumption on symbolic variables only.

t,a,b = var('t,a,b')
v = function('v',t)
de = diff(v,t)-a*v^2-b
forget()
assume(a>0)
assume(b>0)
print assumptions()
sol=desolve(de, dvar=v, ivar=t)
print sol
forget()
assume(a<0)
assume(b<0)
print assumptions()
sol=desolve(de, dvar=v, ivar=t)
sol
edit flag offensive delete link more

Comments

You can actually sometimes pass in more complicated thing to Maxima's assume, but there isn't necessarily a guarantee it will do much with those more complex ones.

kcrisman gravatar imagekcrisman ( 2012-05-07 22:33:55 +0200 )edit

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: 2012-05-07 09:35:59 +0200

Seen: 457 times

Last updated: May 07 '12