I am able to manipulate the functions, but I am unable to plot them.

Here is the code:

 a,l,x,y,u,v,xdot,ydot,udot,vdot = var('a,l,x,y,u,v,xdot,ydot,udot,vdot', 
domain = RR)

i = var('i', domain = QQ)
 
xdot = x;

ydot = y;

udot = u^2+v;

vdot = v^2+u;

 N = 
matrix([(diff(xdot,x)-l,diff(xdot,y),diff(xdot,u),diff(xdot,v)),(diff(ydot,x),diff(ydot,y)-l,diff(ydot,u),diff(ydot,v)),(diff(udot,x),diff(udot,y),diff(udot,u)-l,diff(udot,v)),(diff(vdot,x),diff(vdot,y),diff(vdot,u),diff(vdot,v)-l)])

 dN = N[0,0]*(N[1,1]*(N[2,2]*N[3,3]-N[2,3]*N[3,2]) + 
N[1,2]*(N[1,2]*N[3,3]-N[3,2]*N[1,3]) + 
N[1,3]*(N[1,2]*N[2,3]-N[2,2]*N[1,3])) + 
N[1,0]*(N[0,1]*(N[2,2]*N[3,3]-N[3,2]*N[2,3]) + 
N[2,1]*(N[0,2]*N[3,3]-N[3,2]*N[0,3]) + 
N[3,1]*(N[0,2]*N[2,3]-N[2,2]*N[0,3])) + 
N[2,0]*(N[1,0]*(N[1,2]*N[3,3]-N[3,2]*N[1,3]) + 
N[1,1]*(N[0,2]*N[3,3]-N[3,2]*N[0,3]) + 
N[1,3]*(N[0,2]*N[1,3]-N[1,2]*N[0,3])) + 
N[3,0]*(N[0,1]*(N[1,2]*N[2,3]-N[2,2]*N[1,3]) + 
N[1,1]*(N[0,2]*N[2,3]-N[2,2]*N[0,3]) + N[2,1]*(N[0,2]*N[1,3]-N[1,2]*N[0,3]))

 soln = solve([dN == 0], l);

 sol0(u,v) = soln[0];

sol1(u,v) = soln[1];

sol2(u,v) = soln[2];




On Friday, March 9, 2012 12:18:40 PM UTC-8, D. S. McNeil wrote:
>
> You're probably getting a list of dictionaries:
>
> sage: var("x y")
> (x, y)
> sage: sols = solve([x^2-4==0, y^2-9==0], x, y, solution_dict=True)
> sage: sols
> [{y: -3, x: -2}, {y: -3, x: 2}, {y: 3, x: -2}, {y: 3, x: 2}]
>
> This is just like any other list -- the fact the elements happen to be
> dictionaries doesn't change anything -- and can be looped over and
> indexed.  For example:
>
> sage: sols[0]
> {y: -3, x: -2}
> sage: sols[0][x]
> -2
> sage: sols[0][y]
> -3
> sage: sols[1][x]
> 2
> sage: sols[1][y]
> -3
> sage: sum(sol[x]+sol[y] for sol in sols)
> 0
>
> etc.
>
>
> Doug
>
>
On Friday, March 9, 2012 12:18:40 PM UTC-8, D. S. McNeil wrote:
>
> You're probably getting a list of dictionaries:
>
> sage: var("x y")
> (x, y)
> sage: sols = solve([x^2-4==0, y^2-9==0], x, y, solution_dict=True)
> sage: sols
> [{y: -3, x: -2}, {y: -3, x: 2}, {y: 3, x: -2}, {y: 3, x: 2}]
>
> This is just like any other list -- the fact the elements happen to be
> dictionaries doesn't change anything -- and can be looped over and
> indexed.  For example:
>
> sage: sols[0]
> {y: -3, x: -2}
> sage: sols[0][x]
> -2
> sage: sols[0][y]
> -3
> sage: sols[1][x]
> 2
> sage: sols[1][y]
> -3
> sage: sum(sol[x]+sol[y] for sol in sols)
> 0
>
> etc.
>
>
> Doug
>
>
On Friday, March 9, 2012 12:18:40 PM UTC-8, D. S. McNeil wrote:
>
> You're probably getting a list of dictionaries:
>
> sage: var("x y")
> (x, y)
> sage: sols = solve([x^2-4==0, y^2-9==0], x, y, solution_dict=True)
> sage: sols
> [{y: -3, x: -2}, {y: -3, x: 2}, {y: 3, x: -2}, {y: 3, x: 2}]
>
> This is just like any other list -- the fact the elements happen to be
> dictionaries doesn't change anything -- and can be looped over and
> indexed.  For example:
>
> sage: sols[0]
> {y: -3, x: -2}
> sage: sols[0][x]
> -2
> sage: sols[0][y]
> -3
> sage: sols[1][x]
> 2
> sage: sols[1][y]
> -3
> sage: sum(sol[x]+sol[y] for sol in sols)
> 0
>
> etc.
>
>
> Doug
>
>

-- 
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