# Question:selecting poles with positive imaginary parts from a list including I and -I

## Question:selecting poles with positive imaginary parts from a list including I and -I

Maple

> I found this information and code quite useful. Now my set t1 changes slightly to include I and -I. I also set up conditionl statements to extract the right elements according to the criteria on the value of beta*Q as adviced previously. I then test this out using the values for (beta,Q) as (1,1), (-1,1),(0,1).

When beta*Q is positive (one in this case) I is not selected as one of the elements having positive imaginary parts.

When beta*Q is negative (minus one in this case) minus I is selected as one of the elements having positive imaginary parts.

When beta*Q is zero there is no evaluation as to which elements have positive imaginary parts.

I can see that the code works well with the elements having the square root sign but I can't get it to work when I and -I appear in the list of elements t1. So how can I select the elements with positive imaginary parts when I and -I appear in the list t1.

> t1 := [((-4*Pi^2-beta^2+4*beta^2*Q^2*Pi^2-8*I*Pi^2*beta*Q)/(4*Pi^2+beta^2-4*beta^2*Q*Pi+4*beta^2*Q^2*Pi^2))^(1/2), -((-4*Pi^2-beta^2+4*beta^2*Q^2*Pi^2-8*I*Pi^2*beta*Q)/(4*Pi^2+beta^2-4*beta^2*Q*Pi+4*beta^2*Q^2*Pi^2))^(1/2), -((-4*Pi^2-beta^2+4*beta^2*Q^2*Pi^2+8*I*Pi^2*beta*Q)/(4*Pi^2+beta^2-4*beta^2*Q*Pi+4*beta^2*Q^2*Pi^2))^(1/2), I, -I, ((-4*Pi^2-beta^2+4*beta^2*Q^2*Pi^2+8*I*Pi^2*beta*Q)/(4*Pi^2+beta^2-4*beta^2*Q*Pi+4*beta^2*Q^2*Pi^2))^(1/2)];

for_beta and for_Q are just variable names.

> for_beta:= -1; for_Q:=1;

> if for_beta*for_Q > 0 then

select(t->sign(t*indets(t,imaginary)[])=1,t1)

elif for_beta*for_Q < 0 then

remove(t->sign(t*indets(t,imaginary)[])=1,t1)

elif for_beta*for_Q = 0 then

select(t->sign(t)=1,t1)

fi;

﻿