I'm having trouble getting dsolve to work with a system of equations. If
possible I'd like to find a work around so I can continue the work I'm
doing...
I'm using IPython 3.4. Here's a simple test case:
from sympy import *
t,c,d=symbols(r't,c,d')
A,B=symbols(r'A,B',cls=Function)
Eq1=Eq(A(t).diff(t),B(t)-B(t).diff(t)+c)
Eq2=Eq(A(t),B(t).diff(t)+A(t).diff(t)+d)
Now, I've tried this both with and without providing the functions to solve
for, and get different exceptions each way. If I try without:
dsolve([Eq1,Eq2])
I get traceback:
==============================================
---------------------------------------------------------------------------AttributeError
Traceback (most recent call
last)<ipython-input-16-5b402de4ba25> in <module>()----> 1 dsolve([Eq1,Eq2])
//anaconda/lib/python3.4/site-packages/sympy/solvers/ode.py in dsolve(eq, func,
hint, simplify, ics, xi, eta, x0, n, **kwargs) 577 """ 578 if
iterable(eq):--> 579 match = classify_sysode(eq, func) 580
eq = match['eq'] 581 order = match['order']
//anaconda/lib/python3.4/site-packages/sympy/solvers/ode.py in
classify_sysode(eq, funcs, **kwargs) 1445 if
matching_hints['no_of_equation'] == 2: 1446 if order_eq ==
1:-> 1447 type_of_equation = check_linear_2eq_order1(eq,
funcs, func_coef) 1448 elif order_eq == 2: 1449
type_of_equation = check_linear_2eq_order2(eq, funcs, func_coef)
//anaconda/lib/python3.4/site-packages/sympy/solvers/ode.py in
check_linear_2eq_order1(eq, func, func_coef) 1485 1486 def
check_linear_2eq_order1(eq, func, func_coef):-> 1487 x = func[0].func
1488 y = func[1].func 1489 fc = func_coef
AttributeError: 'list' object has no attribute 'func'
==========================================
If I try with, I get:
dsolve([Eq1,Eq2],[A(t),B(t)])
=============================================
---------------------------------------------------------------------------KeyError
Traceback (most recent call
last)<ipython-input-17-6cffcb27ff03> in <module>()----> 1
dsolve([Eq1,Eq2],[A(t),B(t)])
//anaconda/lib/python3.4/site-packages/sympy/solvers/ode.py in dsolve(eq, func,
hint, simplify, ics, xi, eta, x0, n, **kwargs) 577 """ 578 if
iterable(eq):--> 579 match = classify_sysode(eq, func) 580
eq = match['eq'] 581 order = match['order']
//anaconda/lib/python3.4/site-packages/sympy/solvers/ode.py in
classify_sysode(eq, funcs, **kwargs) 1364 func_dict = dict() 1365
for func in funcs:-> 1366 if not order[func]: 1367
max_order = 0 1368 for i, eqs_ in enumerate(eq):
KeyError: A(t)
==========================================================
--
You received this message because you are subscribed to the Google Groups
"sympy" 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/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/9c7fd385-0b1e-4505-8443-669f686f7054%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.