2
$\begingroup$

I understand Sqrt function won't simplify expressions such as $\sqrt{x^2}$ unless there is an assumption that $x \in \mathbb{R}$. In my computation, I get an output containing an expression like this after FullSimplify:

$$e^{i\phi}-\sqrt{e^{2i\phi}}$$

I attempted to use Assumptions as mentioned as above but it still won't simplify. The exact code I used is this:

$Assumptions = 2*π > {ϕ} > 0 && ϕ ∈ Reals ;

Any idea what I did wrong? Or any other solutions?

$\endgroup$
5
$\begingroup$

Your assumptions aren't quite strict enough -- for example, if $\phi=\frac{3\pi}2$, then $e^{i\phi}=-i$, but $\sqrt{e^{2i\phi}}=i$.

(Also, you have an error in your $Assumptions expression; $\phi$ should not have list brackets around it.)

Try instead:

$Assumptions = -π/2 < ϕ ≤ π/2;
E^(I ϕ) - Sqrt[E^(2 I ϕ)] // Simplify
(* => 0 *)

(You don't have to explicitly state that $\phi\in\mathbb R$, because the fact that it can be compared in an inequality already implies that it's real; the field of complex numbers is not ordered.)

$\endgroup$
  • $\begingroup$ Yes... Thank you for pointing that out. Also just a quick thing: can I ask if there is a difference in using Simplify[] versus // Simplify? $\endgroup$ – Histoscienology Jan 9 at 4:09
  • 1
    $\begingroup$ @Histoscienology No, Simplify[x], Simplify@x (prefix), and x//Simplify (postfix) are all equivalent (although they have different precedence rules). See here for more information. $\endgroup$ – Doorknob Jan 9 at 4:15

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.