TITLE: If $X,Y$ standard normal, find conditional distribution of $X+Y$ given $X>0$ and $Y>0$
QUESTION [5 upvotes]: The (old qualifying exam) question is this: if $X,Y$ are independent standard normals, what is the distribution of $Z=X+Y$ given that $X>0,Y>0$? 
We must find $P(Z\le z, X>0,Y>0)$ (and then divide this by $P(X>0,Y>0)=\frac14$), which means integrating $\frac1{2\pi}e^{-(x^2+y^2)/2}$ over the triangle $x+y\le z$ in the first quadrant. I figured using polar coordinates was the right idea. Converting $x+y=z$ to polar, we get $r(\cos\theta+\sin\theta)=r\sqrt{2}\cos(\theta-\pi/4)=z$, so
\begin{align*}
P(Z\le z,X>0,Y>0)
&=\frac1{2\pi}\int_0^{\pi/2}\int_0^{\frac{z\sec(\theta-\frac\pi4)}{\sqrt2}}e^{-r^2/2}\cdot r\,dr\,d\theta\\
&=\frac1{2\pi}\int_0^{\pi/2}(-e^{-r^2/2})\bigg|^{\frac{z\sec(\theta-\frac\pi4)}{\sqrt2}}_0\,d\theta\\
&=\frac1{2\pi}\int_0^{\pi/2}1-\exp\left(-\frac{z^2\sec^2(\theta-\pi/4)}{4}\right)\,d\theta\\
&=\frac14-\frac{e^{-z^2/4}}{2\pi}\int_0^{\pi/2}\exp\left(-\frac{\tan^2(\theta-\pi/4)}{4}\right)\,d\theta
\end{align*}
However, neither I nor Mathematica know what to do with the last integral. Am I missing any clever tricks, or is the best we can do to write $P(Z\le z|X>0,Y>0)=1-\frac{2}\pi\cdot e^{-z^2/4}\cdot\tau$, with $\tau$ being the value of the horrible integral?

REPLY [5 votes]: Because of the circular symmetry of the joint density of two independent standard normal random variables,

$P\{(X,Y) \in \text{triangle with vertices at $(0,0), (z,0), (0,z)$}\}$ is 
one-fourth the probability that the random point lies in the square 
with vertices $(z,0), (0,z), (-z,0), (0,-z)$.
Rotating the square about the origin till the sides are parallel to the axes
does not change $P\{(X,Y) \in \text{rotated square}\}$
$P\{(X,Y) \in \text{rotated square}\}$, whose vertices are at 
$\left(\pm \frac{z}{\sqrt{2}}, \pm \frac{z}{\sqrt{2}}, \right)$, is left
to you as an exercise.  

Can you take it from here?