1
$\begingroup$

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[2];
Nphmat = Nph*IdentityMatrix[2];
Mmat=Mph*{{1,0},{0,Exp[I*\[Theta]]}}
U={{1,-1},{1,-1}}*1/Sqrt[2];

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.

$\endgroup$
4
  • $\begingroup$ which should simplify to simple (1+2Nph). are you sure? I get zero. $\endgroup$
    – Nasser
    Jul 28, 2022 at 7:23
  • $\begingroup$ you are completely right, there was a mistake with the sign. I edited it. $\endgroup$
    – J.Agusti
    Jul 28, 2022 at 7:29
  • 1
    $\begingroup$ $\theta = \pi/4$ is compatible with your $Assumptions and then $e^{4i\theta} = -1$ and $e^{8i\theta} = 1$. $\endgroup$
    – user293787
    Jul 28, 2022 at 7:31
  • 1
    $\begingroup$ 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? $\endgroup$ Jul 28, 2022 at 15:08

1 Answer 1

2
$\begingroup$

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}]

Mathematica graphics

Assuming[x > 0, Simplify[%]]

Mathematica graphics

You can also get same result using

Assuming[Element[x, Reals], Simplify[%]]

Mathematica graphics

This might sound like a little cheating, but it is simpler than doing it in complex domain.

$\endgroup$
6
  • $\begingroup$ 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? $\endgroup$
    – J.Agusti
    Jul 28, 2022 at 7:36
  • $\begingroup$ @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. $\endgroup$
    – Nasser
    Jul 28, 2022 at 7:40
  • $\begingroup$ 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. $\endgroup$
    – J.Agusti
    Jul 28, 2022 at 7:59
  • 1
    $\begingroup$ @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$ $\endgroup$
    – Nasser
    Jul 28, 2022 at 8:01
  • $\begingroup$ 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. $\endgroup$ Jul 28, 2022 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.