Simplifying with assumption

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?

• "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? Commented Mar 5, 2018 at 7:27

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.

• 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]) Commented Mar 5, 2018 at 7:47
• 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]. Commented Mar 5, 2018 at 7:47
• If I assume $\frac{\sqrt{\cos(2t)^2}}{\cos(2t)}$ is -1, what does it return? Commented Mar 5, 2018 at 7:50
• 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. Commented Mar 5, 2018 at 7:56
• I know that xr is real. Does it help? Commented Mar 5, 2018 at 7:59