We need
#cos(pi/4)=2cos^2(pi/8)-1#
#2cos^2(pi/8)=1+cos(pi/4)=1+sqrt2/2#
# **cos(pi/8)=sqrt(2+sqrt2)/2** #
#cos(pi/4)=1-2sin^2(pi/8)#
#2sin^2(pi/8)=1-cos(pi/4)=1-sqrt2/2#
# **sin(pi/8)=sqrt(2-sqrt2)/2** #
#cos(5/8pi)=cos(pi/8+pi/2)=cos(pi/8)cos(pi/2)-sin(pi/8)sin(pi/2)#
#=sqrt(2+sqrt2)/2*0-sqrt(2-sqrt2)/2*1=-sqrt(2-sqrt2)/2#
#sin(5/8pi)=sin(pi/8+pi/2)=sin(pi/8)cos(pi/2)+cos(pi/8)sin(pi/2)#
#=sqrt(2-sqrt2)/2*0+sqrt(2+sqrt2)/2*1#
#=sqrt(2+sqrt2)/2#
#cos(9/8pi)=cos(pi/8+pi)=cos(pi/8)cos(pi)-sin(pi/8)sin(pi)=-sqrt(2+sqrt2)/2#
#sin(9/8pi)=sin(pi/8+pi)=sin(pi/8)cos(pi)+cos(pi/8)sin(pi)=-sqrt(2-sqrt2)/2#
#cos(13/8pi)=cos(pi/8+3/2pi)=cos(pi/8)cos(3/2pi)-sin(pi/8)sin(3/2pi)=sqrt(2-sqrt2)/2#
#sin(9/8pi)=sin(pi/8+3/2pi)=sin(pi/8)cos(3/2pi)+cos(pi/8)sin(3/2pi)=-sqrt(2+sqrt2)/2#
We apply Euler's relation
#e^(itheta)=costheta+isintheta#
#e^(ipi/2)=cos(pi/2)+isin(pi/2)=i#
Therefore,
#z^4=9i=9e^(ipi/2+2kpi)#, #AA k in ZZ#
Therefore,
#z=root(4)9e^(ipi/8+2kpi/4)#
When,
#k=0#, #=>#, #z_1=root(4)9e^(i1/8pi)=root(4)9(cos(1/8pi)+isin(1/8pi))=root(4)9(sqrt(2+sqrt2)/2+isqrt(2-sqrt2)/2)#
#k=1#, #=>#, #z_2=root(4)9e^(i5/8pi)=root(4)9(cos(5/8pi)+isin(5/8pi))=root(4)9(-sqrt(2-sqrt2)/2+isqrt(2+sqrt2)/2)#
#k=2#, #=>#, #z_3=root(4)9e^(i9/8pi)=root(4)9(cos(9/8pi)+isin(9/8pi))=root(4)9(-sqrt(2+sqrt2)/2-isqrt(2-sqrt2)/2)#
#k=3#, #=>#, #z_4=root(4)9e^(i13/8pi)=root(4)9(cos(13/8pi)+isin(13/8pi))=root(4)9(sqrt(2-sqrt2)/2-isqrt(2+sqrt2)/2)#