2

(I tried posting this in Scientific Computing but they said to post it here; sorry if this is again off-topic.)

I'm using dsolve on Octave for the first time (Thanks so much for including this feature, BTW; this SimPy connection is just great), and it works fine with most of the ODEs and IVPs I've tried, but this one gives me an error:

>> pkg load symbolic
>> syms x(t)
>> ode1 = diff(x,t) == -t/x
>> cond1 = x(0) == 5
>> dsolve(ode1, cond1)
error: Python exception: AttributeError: 'list' object has no attribute 'subs'
    occurred at line 15 of the Python code block error: called from
    python_cmd at line 176 column 5
    dsolve at line 200 column 10

Just solving the ODE worked fine; it only crashes with the IVP:

>> dsolve(ode1)
ans =
{
(sym)

             _________
            ╱       2
  x(t) = -╲╱  C₁ - t

(sym)

            _________
           ╱       2
  x(t) = ╲╱  C₁ - t

I tried other initial conditions, but got the same error:

>> cond2 = x(-3) == 0.1
warning: Using rat() heuristics for double-precision input (is this what you wanted?)
warning: called from
    sym at line 225 column 7
    binop_helper at line 60 column 5
    ineq_helper at line 35 column 5
    eq at line 91 column 5
cond2 = (sym) x(-3) = 1/10
>> dsolve(ode1, cond2)
error: Python exception: AttributeError: 'list' object has no attribute 'subs'
    occurred at line 15 of the Python code block
error: called from
    python_cmd at line 176 column 5
    dsolve at line 200 column 10

Can anyone help with this? I'd really like to use Octave to solve ODEs and IVPs explicitly

Community
  • 1
  • 1
  • (Here is the old post http://scicomp.stackexchange.com/questions/26464/dsolve-sympy-error-python-exception-attributeerror-list-object-has-no-attri ) – Jeffrey Rolland Mar 24 '17 at 04:19

1 Answers1

0

The Short Answer:

Unfortunately, it is not yet supported.

The Longer Answer:

I came across the same problem, and had a look inside the script to see what was going wrong.

On line 174 of the dsolve.m function, you will find the following:

% FIXME: it is not currently supported a list of boundary/initial conditions

What you can do:

If you really need it, I would suggest contacting the authors of the package, and let them know that there are actually people wanting this functionality. Visit the Forge page to see the details of the author of the package.

https://octave.sourceforge.io/symbolic/index.html