1
$\begingroup$

I'm trying to solve these two equations: $$ \cos\left(\frac{\gamma'}{2}\right) = g_0\qquad e^{i\beta'}\sin\left(\frac{\gamma'}{2}\right) = g_1 $$ Where $g_0$ is real and $g_1$ is complex. From the discussions on the math channel, we can find that $$ \gamma'=2\cos^{-1}(g_0),\qquad e^{i\beta'}=\pm\frac{g_1}{\sqrt{1-g_0^2}}\qquad\beta'=-i\log\frac{g_1}{\sqrt{1-g_0^2}}+k\pi,\ \text{where}\ k\in\mathbb{Z}$$ However, I'm still having trouble understanding the solution when $k$ is an odd number, say if it equals $1$, then I'm trying to verify the solution using Mathematica:
Given that

g_0 = 0.8974187611347583, g_1= -0.33540402107889095+0.28660723962849705*I

We can find $\gamma' = 0.913825694123124 , \beta_1'= 2.434484141132717 , \beta_2'=5.5760767947225105$ (differ by $1*\pi$).

However, when I tried to use Mathematica to verify the solutions, only $\beta_1'$ and $\gamma'$ works, by which I mean $e^{i\beta'}\sin\left(\frac{\gamma'}{2}\right)-g_1=0$.

When I plug $\beta_2', \gamma'$ into the equation, it returns 0.670808 - 0.573214 I. Why the second answer doesn't work? Thanks a lot for the help!!

PS: This is what I tried: Exp[I*5.5760767947225105]* Sin[0.913825694123124/2] - (-0.33540402107889095 + 0.28660723962849705*I) // Simplify

$\endgroup$
2
  • 1
    $\begingroup$ The solution is not correct for odd $k$. Solve reveals this; the general solution involves distinct arbitrary multiples of $4\pi$ and $2\pi$, as well as a coupled choice of sign. $\endgroup$ – Adam Mar 23 at 5:58
  • $\begingroup$ @Adam Thanks a lot for the comment!! Could you explain a bit more about the coupled choice of sign? Why does the general solution involve distinct arbitrary multiples of $4\pi$ and $2\pi$? $\endgroup$ – ZR- Mar 23 at 6:04
2
$\begingroup$
Clear["Global`*"]

eqns = {Cos[γ/2] == g0, Exp[I*β] Sin[γ/2] == g1};

sol = Solve[eqns, {β, γ}] // Simplify

enter image description here

Alternatively,

sol // TrigToExp

enter image description here

Verifying the solutions,

Assuming[Element[{C[1], C[2]}, Integers],
 eqns /. sol // Simplify]

(* {{True, True}, {True, True}} *)

For your specific values,

val = {g0 -> 0.8974187611347583, 
   g1 -> -0.33540402107889095 + 0.28660723962849705*I};

sol2 = sol /. val

enter image description here

Assuming[Element[{C[1], C[2]}, Integers],
 eqns /. val /. sol2 // Simplify]

(* {{True, True}, {True, True}} *)
$\endgroup$
4
  • $\begingroup$ Thanks a lot for the answer! ! What does the last section mean? (Assuming[Element[{C[1], C[2]}, Integers], eqns /. val /. sol2 // Simplify]) $\endgroup$ – ZR- Mar 23 at 6:24
  • 1
    $\begingroup$ Starting with the general equations, substitute your specific values so that g0 and g1 are replaced, then substitute using sol2 so that beta and gamma are replaced with their values, then Simplify using the assumptions that the arbitrary constants (C[1] and C[2]) are integers. Read the documentation on ReplaceAll (i.e., /.). $\endgroup$ – Bob Hanlon Mar 23 at 6:32
  • $\begingroup$ Thanks!! Could you also explain a little bit about the output? (* {{True, True}, {True, True}} *) $\endgroup$ – ZR- Mar 23 at 6:41
  • 1
    $\begingroup$ Look at the output for Clear[x]; x^2 == 4 /. {{x -> -2}, {x -> 2}} Look at documentation for Equal $\endgroup$ – Bob Hanlon Mar 23 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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