Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

solve a system of two equations for a derivative

I have the following defined:

sage: var('a, t');

sage: function('x, y, v, u')

sage: de1 = diff(x(t),t) - diff(y(t),t) == x(t)

sage: de2 = diff(y(t),t) == y(t)

I'd like to solve these two equations algebraically for diff(x(t),t) and diff(y(t),t).

sage: sol = solve(de1, diff(x(t),t)); works, and i get an explicit solution for diff(x(t),t), but when i try solving both equations using:

sage: sol = solve([de1, de2],diff(x(t),t),diff(y(t),t));

i get the following error:

Traceback (most recent call last): File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 905, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/symbolic/relation.py", line 822, in solve variables = tuple(args[0]) TypeError: 'sage.symbolic.expression.Expression' object is not iterable

=============================

I'd appreciate any help with this. thank you.