# 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. – yohbs Sep 8 '15 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. – rhermans Sep 8 '15 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 '15 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? – phchen Sep 8 '15 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. – phchen Sep 8 '15 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? – phchen Sep 8 '15 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. – Jason B. Sep 8 '15 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$$ – yohbs Sep 8 '15 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. – phchen Sep 8 '15 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. – phchen Sep 8 '15 at 9:01
{"ft_lang_label":"__label__en","ft_lang_prob":0.80532515,"math_prob":0.9801268,"size":627,"snap":"2020-24-2020-29","text_gpt3_token_len":182,"char_repetition_ratio":0.12199037,"word_repetition_ratio":0.0,"special_character_ratio":0.32057416,"punctuation_ratio":0.07317073,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9993212,"pos_list":[0,1,2],"im_url_duplicate_count":[null,5,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-05-31T00:33:35Z\",\"WARC-Record-ID\":\"<urn:uuid:2be9740b-7ed8-4762-942b-1253a3fd897d>\",\"Content-Length\":\"171747\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5853c782-7022-4dd9-9b82-eafca9e6087f>\",\"WARC-Concurrent-To\":\"<urn:uuid:ebc94f4d-939a-4a22-b26d-6b8ce07d438b>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://mathematica.stackexchange.com/questions/94203/how-to-evaluate-i-e-fraci-k2-sqrt-e-i-k-1/94231\",\"WARC-Payload-Digest\":\"sha1:O7P72QPE7UUGU63SXXDHH32NSK4XSP35\",\"WARC-Block-Digest\":\"sha1:TIQUTDHGW7KJJFTZZZ2XNYEFGGUDYQRC\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-24/CC-MAIN-2020-24_segments_1590347410535.45_warc_CC-MAIN-20200530231809-20200531021809-00523.warc.gz\"}"}