# desolve not using/understanding assume()

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 close merge delete

Sort by ยป oldest newest most voted

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
more

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.

( 2012-05-07 15:33:55 -0600 )edit