# Square root of complex exponenial does not simplify

I am solving an eigenmatrix problem in which I have phase $$e^{i\theta}$$ in the matrix, which propagates to the eigenvalues/vectors. However, just by looking at it, I can see it has to simplify, but mathematica does not do the trick!

ClearAll["Global*"]
$Assumptions = {{Nph, Mph, \[Theta]} \[Element] Reals, 0 < Nph, 0 < Mph, 0 <= \[Theta] <= 2*\[Pi]}; Nphmat1 = (Nph + 1)*IdentityMatrix; Nphmat = Nph*IdentityMatrix; Mmat=Mph*{{1,0},{0,Exp[I*\[Theta]]}} U={{1,-1},{1,-1}}*1/Sqrt; Mu = U.Mmat.U\[Transpose] // FullSimplify; A={{Nphmat1,-Mu},{-Mu\[ConjugateTranspose],Nphmat}}// ArrayFlatten; {eigs, vecs} = Eigensystem[A] /. {Mph -> Sqrt[Nph*(Nph + 1)]} // Simplify;  As an example of eigenvalue, I get $$\frac{1}{2}e^{-4i\theta}(e^{4i\theta}+\sqrt{e^{8i\theta}})(1+2Nph)$$, which should simplify to simple $$(1+2Nph)$$. I know this is related to already posted topics where it is mentioned that it is due to the branch of the complex functions, but I already limit the values of $$\theta$$ at the initial Assumptions, so I don't know what else to do. • which should simplify to simple (1+2Nph). are you sure? I get zero. Jul 28, 2022 at 7:23 • you are completely right, there was a mistake with the sign. I edited it. Jul 28, 2022 at 7:29 •$\theta = \pi/4$is compatible with your $Assumptions and then $e^{4i\theta} = -1$ and $e^{8i\theta} = 1$. Jul 28, 2022 at 7:31
• It seems to me that @user293787 made an important comment that your assumptions do not make that simplification valid. If instead, you take theta to be smaller than Pi/8 and positive in your $Assumptions, you get your expected simplification. That said, is theta really smaller than Pi/8 in your case? Jul 28, 2022 at 15:08 ## 1 Answer which should simplify to simple (1+2Nph) One way to simplify this is to to simplify with side relation ClearAll[x, theta]; expr = 1/2*Exp[-4*I*theta]*(Exp[4*I*theta] + Sqrt[Exp[8*I*theta]])*(1 + 2*n*p*h) Simplify[expr, {x == I*theta}] Assuming[x > 0, Simplify[%]] You can also get same result using Assuming[Element[x, Reals], Simplify[%]] This might sound like a little cheating, but it is simpler than doing it in complex domain. • using this trick, I would have to do it expression by expression, one by one, right? As I have a set of eigenvalues/vectors, it is not possible to do it to the full eigensystem? Jul 28, 2022 at 7:36 • @J.Agusti Yes, as I mentioned, I assumed the term 4*I*theta is known and everything is integer multiple of this phase. i.e. 4*I*theta or 8*I*theta or 12*I*theta and so on. I do not know what you have, as I only used the example you showed. So this might not work for you if you have phases not this uniform. Jul 28, 2022 at 7:40 • In my case, all the other eigenvalues have this term$4i\theta$, which is fixed as you mentioned. So somehow, I could iterate this over all the eigenvectors/values. Jul 28, 2022 at 7:59 • @J.Agusti I actually just tried it. It also works on non-integer multiples! Also, it works on just doing x=I*theta, much simpler. Will update my answer now. So all you have to do is use Simplify[expr, {x == I*theta}] This will get rid of all the complex I*theta and you will end up with simpler expression with just x` which you can simplify more easily with assumptions on$x\$ Jul 28, 2022 at 8:01
• It seems to me that @user293787 made an important comment below your question that your assumptions do not make that simplification valid. If instead, you take theta to be smaller than Pi/8 you get your expected simplification. Jul 28, 2022 at 15:07