[GAP Forum] Sqrt(1+2i)

Marek Mitros marek at mitros.org
Fri May 3 17:48:46 BST 2013


Dear Forum,Consider following GAP code - see below. It means that square
root of unit complex number (1+2i)/Sqrt(5) belongs to cyclotomics CF(40)
field. In the code below I use (2+i)/Sqrt(5) but the same is valid for
(1+2i)/Sqrt(5).Somobody has answered that Sqrt(1+2i) is not cyclotomics.
Maybe it is true, I don't know. For my purpose it is enough to work with
unit complex.Regards,Marekx:=Indeterminate(CF(40),"x"); gap>
a:=(2+i)/Sqrt(5);
1/5*E(20)+2/5*E(20)^4-2/5*E(20)^8
+1/5*E(20)^9-2/5*E(20)^12-1/5*E(20)^13
+2/5*E(20)^16-1/5*E(20)^17
gap> f:=x*x-a;
x^2+(-1/5*E(20)-2/5*E(20)^4+2/5*E(20)^8-1/5*\
E(20)^9+2/5*E(20)^12+1/5*E(20)^13-2/5*E(20)^\
16+1/5*E(20)^17)
gap> sol:=RootsOfPolynomial(CF(40),f);
[ 1/5*E(40)^7-2/5*E(40)^13+1/5*E(40)^21
     -1/5*E(40)^23-1/5*E(40)^29-2/5*E(40)^31
     +2/5*E(40)^37+2/5*E(40)^39,
  -1/5*E(40)^7+2/5*E(40)^13-1/5*E(40)^21
     +1/5*E(40)^23+1/5*E(40)^29+2/5*E(40)^31
     -2/5*E(40)^37-2/5*E(40)^39 ]
03-10-2012 14:13, "Marek Mitros" <marek at mitros.org> napisał(a):

> Dear Forum Users,
>
> I need to calculate Sqrt(1+2i) i.e. find the complex number z=a+bi
> such that z^2=(1+2i). Using traditional pen and paper I calculated
> that a=Sqrt((1+Sqrt(5))/2) and b=Sqrt((Sqrt(5)-1)/2). But how to
> express these numbers in GAP ? Is this number cyclotomic or not ?
> Using formula for tangent (x/2) = (1-cos(x))/sin(x) I obtain number
> c=1+ ((Sqrt(5)-1)/2)*i which is collinear with needed number i.e. have
> the same angle. So we have ImaginaryPart(c*(1-2*i))=0.
>
> Another question I have is how to normalize complex number in GAP.
> E.g. I have number c=1+ ((Sqrt(5)-1)/2)*i and I would like to find
> number c/|c| i.e. lying on unit circle on complex plane. If the |c|^2
> is rational then I can apply Sqrt. But this does not work for real
> cyclotomics.
>
> Any advice ?
>
> Regards,
> Marek
>


More information about the Forum mailing list