Centre of $\langle H,x \rangle$ where $H$ is a proper subgroup of $G$ and $x\in G\setminus H$ I was wondering if there is any explicit formula for the following.

Let $G$ be a finite $p$-group and $H$ is a non-trivial proper subgroup of $G$. Further, suppose $x\in G\setminus H$. Then can we say something explicit about the $Z(\langle H,x\rangle)$?

I think $H\le \langle H,x\rangle$ which means $Z(\langle H,x\rangle)\cap H\le Z(H)$ if I am not wrong. But is there anything else we can say about $Z(\langle H,x\rangle)$?
Any help will be appreciated.
Thanks.
 A: The most general thing I think you can say is:

If $x\in C_G(H)$ then $Z(\langle H,x\rangle)=\langle Z(H),x\rangle$.
If $x\in N_G(H)\setminus C_G(H)$ and $x$ acts as an inner automorphism on $H$ then there is some $y\in\langle H,x\rangle$ with $Z(\langle H,x\rangle)=\langle Z(H),y\rangle$
If $x\in N_G(H)\setminus C_G(H)$ and $x$ and not all powers of $x$ act as outer automorphisms on $H$ then $Z(\langle H,x\rangle)=Z(H)\cap C_H(x)$

I doubt there's much you can say in general if $x\notin N_G(H)$. If $x\in N_G(H)\setminus C_G(H)$ and $x$ and all powers of $x$ acts as outer automorphisms on $H$ then you can study $Z(\langle H,x\rangle)$ inductively by replacing $H$ with $\langle H,w\rangle$ where $\langle w\rangle$ is the subgroup of $x$ acting on $H$ by inner automorphisms.
The case $x\in C_G(H)$ should be an easy exercise.
If $x$ acts as an inner automorphism then there is some $h\in H$ with $g^h=g^x$ for all $g\in H$ so $\langle H,x\rangle=\langle H,xh^{-1}\rangle$ and $xh^{-1}\in C_G(H)$ so by the previous case $Z(\langle H,x\rangle)=\langle Z(H),xh^{-1}\rangle$.
If $x$ and all powers of $x$ acts as a outer automorphisms then element of $\langle H,x\rangle\setminus H$ acts as an outer automorphism so is not in the center. Hence $Z(\langle H,x\rangle)\le H$ and any element of $H$ is in this center if and only if it commute with the elements of $H$ and with $x$.
