# Need help evaluating definite integral to a function of Y

Suppose $Y = \sqrt{2T}\cos(U)$, $0 \le u \le \pi$, and $0 \le \cos^{-1}(\frac{y}{\sqrt {2t}}) \le \pi )$, so $-1 \le \frac{y}{\sqrt{2t}} \le 1$, with all $\mathbb{R}$. The iterated integral is $$G(y)= P(Y \le y) =P(\sqrt{2T}\cos(U) \le y)=\int_{0}^{y}\int_{0}^{\cos^{-1}(\frac{y}{\sqrt {2t}})} \frac{e^{-t}}{\pi } \mathrm{d}u \mathrm{d}t$$

My Mathematica code is

Integrate[((E^-t)/(\[Pi])), {u, 0,  ArcCos[y/((2 t)^(1/2))]},
Assumptions ->
0 <= u <= \[Pi] && -1 <= ArcCos[y/((2 t)^(1/2))] <= 1 &&
Element[t, Reals] > 0]

Integrate[%, {t, 0, y},
Assumptions -> -1 <= ArcCos[y/((2 t)^(1/2))] <= 1 &&
Element[t, Reals] > 0]


but then Mathematica never seems to finish evaluating the second one, and so I have to Abort it. Is there any way to find this as a function of $y$? $G(y)$ is a CDF of $Y$.

-
Just to make sure, your original expression under the integral is independent of u ? If this is the case, you don't really have to write the whole thing as a double integral. The result of inner integration is obvious - it's just the upper limit. –  Vitaliy Kaurov Sep 6 '12 at 4:43
Yes, it is independent of $u$. That's a good point, I will just need to make sure it would be valid for this problem, and should have included that $Y = \sqrt{2T}\cos(U)$, and will do so now. –  Identity Sep 6 '12 at 4:55
How can you satisfy $-1 \le \frac{y}{\sqrt{2t}} \le 1$ when t is close to zero ? –  b.gatessucks Sep 6 '12 at 5:47
@b.g is right: executing Plot[ArcCos[1/Sqrt[2 t]], {t, 0, 1}] will immediately show that the inverse cosine is not even defined for sufficiently small values of $t$. The difficulty is that this problem--which appears to compute a probability by integration (assuming $T$ and $t$ are the same)--plays fast and loose with inverse trig functions and suffers accordingly. The solution is to re-solve the problem to generate an integral without the inverse cosine. –  whuber Sep 6 '12 at 15:28
f[y_?NumericQ] := NIntegrate[E^-t ArcCos[y/Sqrt[2 t]]/ Pi, {t, y ^2/2, y}]