On Tuesday, June 26, 2012 7:11:50 AM UTC-4, Eric Kangas wrote:
>
> Hi,
>
> First of all I am using a coupled 2sd ODE. 
>
> First step was to declare variables:
>
> a,l,x,y,u,v,xdot,ydot,udot,vdot = var('a,l,x,y,u,v,xdot,ydot,udot,vdot', 
> domain = RR)
>
>
> Second step turn the two 2sd ODE into four 1st ODE.
>
> xdot = u;
>
> ydot = v;
>
> udot = -(1-a)*((x-a)/(sqrt((x-a)^2 + y^2))^3)-a*((x+1-a)/(sqrt((x+1-a)^2 + 
> y^2))^3)+x+2*v;
>
> vdot = -(1-a)*(y/(sqrt((x-a)^2 + y^2))^3)-a*(y/(sqrt((x+1-a)^2 + 
> y^2))^3)+y-2*u;
>
>
>
At this point you should be able to do

V(x,y,u,v) = [xdot,ydot,udot,vdot]
V.diff()

to get the Jacobian matrix.  It's true that we don't implement eigenvalues 
for such generic symbolic matrices - presumably in general the computation 
could take arbitrarily long or be too difficult for any system?

Also, I don't know why the determinant didn't work for you.

expand((V.diff()-diagonal_matrix([l,l,l,l])).det()).coeffs(l)

gets you go dN2, though for whatever reason I get only three things there 
instead of your four.

Can you do this same process with a less complex system to show what *does* 
work?  The coefficients here are ridiculously huge and so I'm not sure 
what's happening.  At any rate trying this with some random expressions 
(didn't do the solving) doesn't give this hang.

>
>

-- 
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/sage-support
URL: http://www.sagemath.org

Reply via email to