Why do I get "Re" function when it is clear which is the real part?

Mathematica keeps giving me the "Re" function in an evaluation, even though my parameter assumptions should be enough to deduce the real part:

Here is the latex result:

As you can see, I keep getting the Real function in the exponential, but I do not know how to get rid of it... My assumptions should make it clear which one is the imaginary part, since I give as assumtpions that all parameters are real...

Here is the code:

z[y_] := (B^2 + 1)^(1/4) + B/(B^2 + 1) kx;
F[n_] := Integrate[Exp[-z[y]^2]*HermiteH[n, z[y]]*Exp[-(y - y0)^2/(4 σ^2) + I k0y*y],
{y, -Infinity, Infinity}, Assumptions -> σ > 0 && kx ∈ Reals &&
B ∈ Reals && k0y ∈ Reals && y0 ∈ Reals];

Simplify[Abs[F[1]]^2]


16 E^(-2 Re[ Sqrt[1 + B^2] + (2 B kx)/(1 + B^2)^(3/4) + (B^2 kx^2)/(1 + B^2)^2 - Ik0y (y0 + σ^2 Ik0y)]) π Abs[(((1 + B^2)^(1/4) + B^2 (1 + B^2)^(1/4) + B kx) σ)/(1 + B^2)]^2

I guess my question is: How can I get rid of the Re function? Future computations will become much lengthier so I want to be able to short it now.

Use Assumptions with the final Simplify.

z[y_] = (B^2 + 1)^(1/4) + B/(B^2 + 1) kx;
F[n_] = Integrate[Exp[-z[y]^2]*HermiteH[n, z[y]]* Exp[-(y - y0)^2/(4 σ^2) + I k0y*y]
, {y, -Infinity, Infinity}];

Simplify[Abs[F[1]]^2,
Assumptions -> σ > 0 && kx ∈ Reals && B ∈ Reals&& k0y ∈ Reals && y0 ∈ Reals]


$16 \pi \sigma ^2 \left(\frac{B \text{kx}}{B^2+1}+\sqrt[4]{B^2+1}\right)^2 \exp \left(-2 \left(\frac{B^2 \text{kx}^2}{\left(B^2+1\right)^2}+\frac{2 B \text{kx}}{\left(B^2+1\right)^{3/4}}+\sqrt{B^2+1}+\text{k0y}^2 \sigma ^2\right)\right)$

• Worked like a charm, thank you. I just started using Mathematica so I falsely assumed that the assumptions given to the integral would propagate. Dec 14 '17 at 14:03
• you will learn the tricks in time ;). On a quick note, if ∈ Reals fails to work, try >0. Dec 14 '17 at 14:10
• note you can set \$Assumptions , which will get passed to anything having the Assumptions option. Dec 14 '17 at 15:57