# Moment generating function of Maxima $E[t \exp(\max(X,Y))]$

Let $$X,Y$$ be two standard normal random variables with correlation coefficient $$r\in[-1,1]$$.

I’m trying to compute the moment generating function of the maxima using Mathematica:

Expectation[Exp[t Max[X, r X + Sqrt[1 - r^2] Y]],             {X \[Distributed] NormalDistribution[],              Y \[Distributed] NormalDistribution[]}] 

Since the distribution of the maximum is known to follow the Skew Normal Distribution, I can easily compute the expectation myself to be

$$e^{t^2/2} (1 + \text{erf}(\sqrt{1-r}\,t/2),$$

but Mathematica seems to get bogged down.

I have some slightly more complicated expectations I would like to evaluate, so I wonder if there is some way I may help Mathematica solve things like this? I’m using Mathematica 12.0.0, and I’ve tried adding \$ Assumptions = -1 < r < 1.