But the answer makes no sense. So what is the role of y(z) in here? If I 
omit the second argument, it complains

sage: desolve( diff(y(x),x) + y(x) - 1)
TypeError: desolve() takes at least 2 arguments (1 given)

If I give it the second argument, but without y(x), but just  y, it 
complains (this is good, since I said y is function so it needs an argument)


desolve( diff(y(x),x) + y(x) - Integer(1),y)
AttributeError: 'NewSymbolicFunction' object has no attribute 'operator'

But if I give it a function y of different independent variable that what I 
am solving for, it works? Should it not be doing checking on this function 
to make sure it is the dependent variable in the ode itself?

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


On Monday, August 4, 2014 1:42:04 AM UTC-5, Nils Bruin wrote:
>
> On Sunday, August 3, 2014 11:32:36 PM UTC-7, Nasser M. Abbasi wrote:
>>
>> Thanks. Ok, Now I understand. But then why do I get this answer now:
>>
>> sage: z = var('z')
>> sage: x = var('x')
>> sage: y = function('y')
>> sage: desolve( diff(y(x),x) + y(x) - 1,y(z))
>> y(x) == (c + e^x)*e^(-x)    ---->???
>>
>> The ode is function of x. How did it then accept y(z) with no error as 
>> what I am solving for?
>>
>> Well, it did give you back a differently formatted answer compared to 
> what you got when you asked it to solve wrt. y(x). In a way the answer is 
> correct: If you set y(x) to be what is returned then the differential 
> equation is satisfied, independent of what y(z) is.
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to