# Question:printing result into table form

## Question:printing result into table form

Maple
HIIIIIIIIIIIIIII! :) I'm doin a problem on the restricted 3 body problem...What i want is to creat a proc "equilibria(mu)" which finds all five equilibria of (DE) when mu_1=mu and displays, in a neat table, the (x,y)-position of each equilibrium and the eigenvalues of the vector field's Jacobian at that equilibrium. In addition, the table should indicate if the equilibrium is hyperbolic (all eigenvalues are real and non-zero), elliptic (all eigenvalues are imaginary and non-zero), hyperbolic-elliptic (a mixture of non-zero real and imaginary eigenvalues), or otherwise.. Now the difficulty is this, i can find the equ's and get the evalues, but i have a proble with gettin them into a table...i've been told that prinf is a good one to use, but i have no idea at which bit to use it..this is how far i've got > equilibria:=proc(mu) local x, y, mu_1, mu_2, r_1, r_2, V, f_expr, v, EQs, equilibria_1, N, xsp, u, equilibria_2, df_expr, linf, eigvals: x := 'x': y := 'y': mu_1 := mu: mu_2 := 1-mu_1: r_1 := sqrt( (x-mu_2)^2 + y^2 ): r_2 := sqrt( (x+mu_1)^2 + y^2 ): V := -(x^2 + y^2)/2 - mu_1/r_1 - mu_2/r_2: f_expr := <>: v := [x,px, y,py]: EQs := Equate(f_expr,[0,0,0,0]): equilibria_1 := solve(EQs, v): N := nops(equilibria_1): xsp := fsolve( subs( px=0,py=0,y=0, f_expr ), x=-1 ): u := [x = xsp, px = 0, y = 0, py = 0]: subs(px=0,py=0,y=0,x=xsp, f_expr): equilibria_1:= solve(EQs, v): equilibria_2:= [ equilibria_1[], u ]: print(equilibria = equilibria_2); N:=nops( { equilibria_2[] } ): print('N'=N): df_expr := Matrix(4,4, (i,j) -> diff( f_expr[i], v[j] ) ): linf := [ seq(subs(equilibria_2[i],df_expr), i=1..N ) ]: eigvals := [ seq( Eigenvalues(linf[i]), i=1..N ) ]: end proc: Can anyone out there help? Also, is there any simple way of returning the values in sci notation cos it all looks a bit untidy :) Must app, Regards TOM ﻿