I know that the electric field component of electromagnetic wave should be written as the first equation shown, but some times it can be expressed in terms of complex amplitude of electric field as in second equation. I later found integration in the exponent term and I didn't know why this term appeared. Which one is correct, or more general?
$$ \mathbf{E}(\mathbf{r},t)=\mathrm{Re}\left[\hat{\mathbf e}F(x,y) A(z,t)\exp(i\beta_0-i\omega_0t)\right], $$ $$ \mathbf{E}=\exp\left(-j\int_0^z\beta_\text{eq}\mathrm dz\right)\mathbf{A}. $$