0
$\begingroup$

I want to simplify below expression:

Simplify[( 
 E^(2 I t) Sqrt[
  E^(-4 I t) (dk ro ((1 + E^(2 I t))^2 ep^2 + 
        4 (3 - 2 E^(2 I t) + 3 E^(4 I t)) ep G v + 
        4 (1 + E^(2 I t))^2 G^2 v^2) + 
     16 (-1 + E^(2 I t))^2 G^2 v xr)^2])/(
 dk ro ((1 + E^(2 I t))^2 ep^2 + 
     4 (3 - 2 E^(2 I t) + 3 E^(4 I t)) ep G v + 
     4 (1 + E^(2 I t))^2 G^2 v^2) + 16 (-1 + E^(2 I t))^2 G^2 v xr), 
 G > 0 && dk > 0 && ro > 0 && Element[ep, Reals] && 
  Element[G, Reals] && Element[t, Reals] && Element[dk, Reals] && 
  t > 0 && v > 0 && Element[v, Reals]]

But it returns exactly the same expression without any change! What should I do? Could anyone help me?

$\endgroup$
1
  • $\begingroup$ "But it returns exactly the same expression without any change!" - that means Mathematica is unable to find anything simpler than what you have. Were you expecting something simpler for this? $\endgroup$ Commented Mar 5, 2018 at 7:27

1 Answer 1

1
$\begingroup$

ExpToTrig helps here, as it allows the cancellation of many of the complex variables:

Simplify[ExpToTrig[(E^(2 I t) Sqrt[
      E^(-4 I t) (dk ro ((1 + E^(2 I t))^2 ep^2 + 
             4 (3 - 2 E^(2 I t) + 3 E^(4 I t)) ep G v + 
             4 (1 + E^(2 I t))^2 G^2 v^2) + 
          16 (-1 + E^(2 I t))^2 G^2 v xr)^2])/(dk ro ((1 + 
            E^(2 I t))^2 ep^2 + 
        4 (3 - 2 E^(2 I t) + 3 E^(4 I t)) ep G v + 
        4 (1 + E^(2 I t))^2 G^2 v^2) + 
     16 (-1 + E^(2 I t))^2 G^2 v xr)], 
 G > 0 && dk > 0 && ro > 0 && Element[ep, Reals] && t > 0 && v > 0]

The resulting simplification contains a term of the form $\frac{\sqrt{\cos(2t)^2}}{\cos(2t)}$, which doesn't simplify with only the assumption that $t>0$. If we assume that $\sqrt{\cos(2t)^2}$ and $\cos(2t)$ cancel, then the whole expression simplifies to $1$. However, that's not guaranteed to be true everywhere.

As an additional note, if you assume an ordering operation like t>0, Mathematica automatically assumes that the variable involved is real.

$\endgroup$
8
  • $\begingroup$ When I use your code, the output is: Sqrt[(dk ro (ep - 2 G v)^2 - 16 G^2 v xr + (dk ro (ep^2 + 12 ep G v + 4 G^2 v^2) + 16 G^2 v xr) Cos[2 t])^2]/( dk ro (ep - 2 G v)^2 - 16 G^2 v xr + (dk ro (ep^2 + 12 ep G v + 4 G^2 v^2) + 16 G^2 v xr) Cos[2 t]) $\endgroup$
    – Wat Watson
    Commented Mar 5, 2018 at 7:47
  • $\begingroup$ Yes, the Cos[2 t] term at the end of the numerator and denominator is the reason it doesn't simplify further. See FindInstance[Cos[2 t] != Sqrt[Cos[2 t]^2], t, Reals]. $\endgroup$
    – eyorble
    Commented Mar 5, 2018 at 7:47
  • $\begingroup$ If I assume $\frac{\sqrt{\cos(2t)^2}}{\cos(2t)}$ is -1, what does it return? $\endgroup$
    – Wat Watson
    Commented Mar 5, 2018 at 7:50
  • $\begingroup$ Hard to say, since that precise term doesn't actually appear. However, if you can provide an additional assumption on xr, further simplification into a piecewise function is possible. If xr is real, then the expression is always either -1 or 1, depending on how the terms compare. $\endgroup$
    – eyorble
    Commented Mar 5, 2018 at 7:56
  • $\begingroup$ I know that xr is real. Does it help? $\endgroup$
    – Wat Watson
    Commented Mar 5, 2018 at 7:59

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.