If $G$ be a group of order $8$ and $x$ be a element of order $4$. Prove that $x^2 \in Z(G)$ Now as $x$ is of order $4$ and it generates $H=\langle x\rangle$ a cyclic subgroup of $G$ of order $4$, hence index of $H$ in $G$ is $2$. 
So $H=\langle x\rangle$ is normal in $G$.
Now $gH=Hg $, for all $g$ in $G$.
=> $g(x^2)=(x^2)g\:$ (since  $x^2$ is an element of $H$), for all $g$ in $G$.
Hence $x^2 \in Z(G)$.
This was my approach. (I think that I am wrong in here, $g(x^2)=(x^2)g$)
Please, correct me wherever necessary.
And if you could provide a better solution, please do.
 A: Hint:
Normality only implies that $gH=Hg$, i.e. $$gh_1 = h_2g$$ where $h_1,h_2\in H$ might be different. Since $x$ has order four, list all elements of $H$. If $gx^2 = hg$, what could $h$ be?
A: $gH=Hg$ does not imply that $gh=hg$ for all $h\in H$. These are different things. 
Here is a possible solution. Let $g\in G$. Then $gx^2g^{-1}=(gxg^{-1})^2$. Since $\langle x\rangle\trianglelefteq G$ we know that $gxg^{-1}\in\langle x\rangle$. Now what $gxg^{-1}$ might be? Of course it can't be the identity $e$ because the identity is conjugate only to itself. Also it can't be $x^2$ because then we would get $e=(x^2)^2=(gxg^{-1})^2=gx^2g^{-1}$ which is again a contradiction. Hence $gxg^{-1}$ is either $x$ or $x^3$ and hence $gx^2g^{-1}=(gxg^{-1})^2=x^2$. 
A: This can be obtained by several methods.
(1) There are only two non-abelian groups of order $8$: $D_8$ and $Q_8$. You can check them respectively.
(2) $Z(G)$ must have order $p$ if $G$ has order $p^3$, with $G/Z(G)\cong\mathbb{Z}_p\times\mathbb{Z}_p$. In this case $p = 2$ and so $G/Z(G)\cong\mathbb{Z}_2\times\mathbb{Z}_2$. Hence for any $gZ(G)\in G/Z(G)$, $g^2Z(G) = Z(G)$.
Therefore, a more general case is that if $G$ has order $p^3$, where $p$ is a prime number, then $g^p\in Z(G)$ for all $g\in G$ (not necessarily to be of order $p^2$). In your question, $x$ is not necessarily to be of order $4$.
A: A priori, you don't have $gx^2=x^2g$, but what you have is $gx^2=hg$ for some $h\in H$. So, you have $gx^2g^{-1}\in H=\{1,x,x^2,x^3\}$. So, what you actually have is $$gx^2g^{-1}=x^i,\hbox{ for some }i=0,1,2,3$$
Now, the order of an element is preserved by conjugation,i.e. $o(h)=o(ghg^{-1})$(this is because conjugation is an isomorphism). In particular $$o(x^i)=o(gx^2g^{-1})=o(x^2)=2.$$But $o(x^0)=1$ and $o(x^1)=o(x^3)=4$. So, the only possibility is $i=2$. Hence $$gx^2g^{-1}=x^2$$ 
A: Your approach is not wrong at all , but it needs some clarity. And also a better understanding of what have u constructed. So, 
As u have shown,  $\Bbb{H}$= $<x>$ , where o(x)=4.  And as  $\Bbb{H}$ , is cyclic , order of it is also 4 .  And [  $\Bbb{S}$ :  $\Bbb{H}$ ]=2,  thus  $H\trianglelefteq S$ .  Now as identity is unique and it is in  $\Bbb{H}$ , then no element from  $\Bbb{S}$ \
$\Bbb{H}$  will have order 1 .
Now when we are considering g, it can be picked up either from  $\Bbb{H}$ or from , 
  $\Bbb{S}$ \ $\Bbb{H}$. 
Now if it's taken from  $\Bbb{H}$ , as  $\Bbb{H}$ is cyclic,  $\Bbb{H}$  must be commutative, thus ,
$\forall$ g in  $\Bbb{H}$ ,
g $x^{2}$ =  $x^{2}$g holds.
Now when g is in  $\Bbb{S}$  \  $\Bbb{H}$, o(g)≠1 . If it is 4 then the same argument comes . Now if o(g)=2=o( $x^{2}$ ), then they will commute and ,
g $x^{2}$= $x^{2}$ g holds .
And at last if, o(g)=8 , Then as o(g)=o( $\Bbb{S}$ )  ,   $\Bbb{S}$ will be cyclic. Thus it will be commutative. And then also, 
g $x^{2}$  = $x^{2}$g will hold.
So ,  $\forall$ g in  $\Bbb{S}$  , the relation will hold . 
Well, to understand this ongoing argument more clearly, let's have an example. Let's consider the dihedral group  $D_{4}$ which has 8 elements and they are , {r,  $r^{2}$ , $r^{3}$ , $r^{3}$ , b, b', d, d '} . Here,
b and b ' represent reflection about diagonals .
d and d ' represent reflection about the lines  joining middle points of opposite arms of the square .
r= $R_{90}$ ,
$r^{2}$=  $R_{180}$ , 
$r^{3}$= $R_{270}$ , 
 $r^{4}$=  $R_{360}$ .
Now as, b=r $\ast$  b  $\ast$ $r^{-1}$
And,  d= r $\ast$ d'  $\ast$ $r^{-1}$ .
We can construct 2 subgroups of $D_{4}$ , which are  , 
$\Bbb{T}$  = { e, b, b', $r^{2}$ }
$\Bbb{F}$  = { e, d, d' , $r^{2}$  }
Now ,  $\Bbb{T}$ $\trianglelefteq$ $D_{4}$ 
And , $\Bbb{F}$ $\trianglelefteq$ $D_{4}$
And most astonishingly these two are cyclic groups also . Additive cyclic groups , having the generator , $r^{2}$.
Now there  leaves only two proper subgroups of  $D_{4}$ , one is the group contained first four elements i.e {r, $r^{2}$ ,  $r^{3}$ ,  $r^{3}$ } , Which we have discussed earlier. So there left the group only {e,  $r^{2}$ } . 
And from all these one thing that we are sure about  is ,  $r^{2}$ is only the element ( of order 2) which commutes with every element of $D_{4}$
So,  $r^{2}$ $\in$ $\Bbb{Z}$( $D_{4}$ )
And it ends here .......( Well, it's just the beginning ! )....
A: The group $G$ looks like this:
$$\{1,x,x^2,x^3,g,gx,gx^2,gx^3\}$$
Furthermore, $g^2$ must belong to $\langle x\rangle$. If $g^2=x$ or $x^3$ then $G$ is cyclic. If $g^2=x^2$ then $x^2(gx^k)=g^3x^k=gx^2x^k=(gx^k)x^2$ 
A: With a bit more sophistication and almost hands-down: let $H=\langle x \rangle$, where $x$ has order $4$. Then, $|G:H|=2$, so $H$ is normal and $H \subseteq C_G(x) \subseteq G$. It follows that $G=C_G(x)$ or $H=C_G(x)$. The first case is equivalent to $x \in Z(G)$ and then certainly $x^2 \in Z(G)$. So let's assume $H=C_G(x)$. Then the $G$-conjugacy class $|Cl_G(x)|=|G:C_G(x)|=2$. Since in general a normal subgroup is the disjoint union of $G$-conjugacy classes, and $1 \in N$, this leads to $x^3 \in Cl_G(x)$ (remember that all the elements of a conjugacy class have the same order!) and thus $Cl_G(x^2)=\{x^2\}$. This is equivalent to $x^2 \in Z(G)$.

In general, if $N \unlhd G$ and $|N|=4$ then $x^2 \in Z(G)$ for all $x \in N$.

