# How to evaluate $-i e^{\frac{i k}{2}} \sqrt{-e^{-i k}} = 1$?

In my calculation, there exist some expressions like $-i e^{\frac{i k}{2}} \sqrt{-e^{-i k}}$, which are not simplified to be $1$, and makes further calculations rather complicated.

I tried to simplify the expression:

Simplify[-I Exp[(I k)/2] Sqrt[-Exp[-I k]]]
(* I E^((3 I k)/2) (-E^(-I k))^(3/2) *)


But these expressions are made lengthier using Mathematica. I find Mathematica does compute the square root of negative number:

Simplify[Sqrt[-1]]
(* I *)


But Mathematica doesn't combine them in the easiest way.

How is it possible to use Mathematica to simplify $-i e^{\frac{i k}{2}} \sqrt{-e^{-i k}}$ to $1$ in my calculation?

• Hi. Welcome to Mathematica.SE! Please give your raw code as a copy-pasteable text, not as latex. Sep 8, 2015 at 7:59
• Greetings! Make the most of Mma.SE and take the tour now. Help us to help you, write an excellent question. Edit if improvable, show due diligence, give brief context, include minimum working examples of code and data in formatted form. As you receive give back, vote and answer questions, keep the site useful, be kind, correct mistakes and share what you have learned. Sep 8, 2015 at 8:01
• I guess k is along the lines of a wavenumber and can become complex. The standard approach is to manage your range of values for k by defining a branch cut. You then have to work out the Riemann surface on which your calculation is restricted.
– Hugh
Sep 8, 2015 at 9:46
• Yes, I think that is what I need, I can reformulate my calculation in this way, but how to define a branch cut? Could you please give me an example? Sep 8, 2015 at 12:49

One thing you can try is PowerExpand

PowerExpand[-I Exp[(I k)/2] Sqrt[-Exp[-I k]]]


which returns 1. Note that PowerExpand works by making assumptions about the domain of the variables.

• This method does solve my problem, which has a restricted range of k. But other readers should be careful about the assumption on the variables: "PowerExpand expands a square root, implicitly assuming positive real values". It's copied from the documentation center. Sep 8, 2015 at 17:24

This doesn't work simply because the expression -I Exp[I k/2] Sqrt[-Exp[-I k]] is not equal to 1. Try plugging in $k=-1.0$ and see.

• I see the problem, the expression has two possible values : $\pm1$. But how can I choose its value to be 1 in my calculation? Sep 8, 2015 at 8:45
• Can someone explain to me why this evaluates this way? Am I not allowed to pull the -1 outside of the square root? As in, Sqrt[a b]=Sqrt[a] Sqrt[b]? Because if I do this manually, {-I Exp[I k/2] Sqrt[-Exp[-I k]], -I Exp[I k/2] I Sqrt[Exp[-I k]]} /. k -> -1.0 then it gives the expected answer. Sep 8, 2015 at 9:19
• @JasonB No, you are not allowed to do that for general complex numbers. Look at this, for example: $$1=\sqrt{1}=\sqrt{-1\cdot-1}=\sqrt{-1}\cdot\sqrt{-1}=i\cdot i=-1$$ Sep 8, 2015 at 9:23
• @JasonB, This is called "Root of unity", for a general complex number $z$, $z^{1/n}$ will give you $n$ different solutions. Usually we need to define a solution space to refine the solution as Hugh mentioned, but I don't know how to do it in Mathematica. And I missed it when I wrote this question at the beginning. Sep 8, 2015 at 13:17

Plot[-I Exp[(I k)/2] Sqrt[-Exp[-I k]], {k, 0, 50},

• In this graph, Mathematica seems to choose solution to be 1 or -1 periodically ([0,2$\pi$],[2$\pi$,4$\pi$],[4$\pi$,6$\pi$]......). What if I want to choose them to be 1, how can I make it? I try the following code: "Simplify[-I E^((I k)/2) Sqrt[-E^(-I k)],Assumptions->{k>0,k<2[Pi]}]" but it still gives me the complicated form. Sep 8, 2015 at 9:01