On May 28, 2012, at 4:26 AM, "[email protected]"
<[email protected]> wrote:

> On 28 May 2012 00:34, Aaron Meurer <[email protected]> wrote:
>> Not yet, I'm afraid, though most of the work that would be needed to
>> do it is already there (the exception is for non-diagonalizable
>> systems, for which the methods are not fully implemented in the
>> matrices yet).
>>
>
> If I want to do it "by hand" what are the steps (I am asking in order
> not to miss something that is already implemented)?

1. Convert the system to a matrix.
2. Diagonalize the matrix.
3. Solve the diagonal system.
4. Find the initial conditions in the diagonal basis.
5. Solve for the arbitrary constants.
6. Put the solution back in the original basis.

Currently only 2 and 3 are implemented (3 is of course trivial). Note
that if you want you can also do 1, 2, 3, 6, 5.

If you're interested in extending dsolve(), there's an extensive
docstring at the top of ode.py explaining everything you need to do.
The most difficult part is actually not what you expect:  matching the
ODE and pulling out the coefficients in a general way.

>
>> By the way, it never occurred to me to allow initial conditions to
>> just be entered as equations.  My idea was to enter them as a
>> dictionary, like dsolve([f(x).diff(x) - f(x)], ics={f(0)=1}).  Do you
>> think that doing it your way would be better?  I suppose it would be
>> possible to be fancy and define coupled initial conditions. See issue
>> 1621.
>
> It is just a habit I have from Mathematica. I suppose that there are
> some really weird cases where it may be advantageous, but for now I
> prefer your proposal about kwargs.

Well now I'm starting to like your way. Your way allows much more
general things, though it also puts a lot more parsing burden on the
implementation.

Aaron Meurer

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to