Arcsine law for Brownian motion Here is the question:

$(B_t,t\ge 0)$ is a standard brwonian motion, starting at $0$.
  $S_t=\sup_{0\le s\le t} B_s$. $T=\inf\{t\ge 0: B_t=S_1\}$.
  Show that $T$ follows the arcsinus law with density
  $g(t)=\frac{1}{\pi\sqrt{t(1-t)}}1_{]0,1[}(t)$.

I used Markov property to get the following equality:
$P(T<t)=P(\sup_{t<s<1}B_s<S_t)=E(P(\sup_{0<s<1-t}(B_{t+s}-B_t)<S_t-B_t|F_t))=P(\hat{S}_{1-t}<S_t-B_t).$
where $\hat{S}_{1-t}$ is defined for the brownian motion $\hat{B}_s=B_{t+s}-B_t$, which is independant of $F_t$.
However the reflexion principle tells us that $S_t-B_t$ has the same law as $S_t$, so we can also write that
$P(T<t)=P(\hat{S}_{1-t}<S_t)$.
To this point, we can calculate $P(T<t)$ because we know the joint density of $(\hat{S}_{1-t},S_t)$, but this calculation leads to a complicated form of integral and I can not get the density $g$ at the end.
Do you know how to get the arcsinus law? Thank you.

Let us start from the formula $\mathbb P(T\lt t)=\mathbb P(\hat S_{1-t}\lt S_t)$, where $0\leqslant t\leqslant 1$, and $\hat S_{1-t}$ and $S_t$ are the maxima at times $1-t$ and $t$ of two independent Brownian motions. 
Let $X$ and $Y$ denote two i.i.d. standard normal random variables, then $(\hat S_{1-t},S_t)$ coincides in distribution with $(\sqrt{1-t}|X|,\sqrt{t}|Y|)$ hence 
$$
\mathbb P(T\lt t)=\mathbb P(\sqrt{1-t}|X|\lt\sqrt{t}|Y|)=\mathbb P(|Z|\lt\sqrt{t}),
$$
where $Z=X/\sqrt{X^2+Y^2}$. Now, $Z=\sin\Theta$, where the random variable $\Theta$ is the argument of the two-dimensional random vector $(X,Y)$ whose density is $\mathrm e^{-(x^2+y^2)/2}/(2\pi)$, which is invariant by the rotations of center $(0,0)$. Hence $\Theta$ is uniformly distributed on $[-\pi,\pi]$ and 
$$
\mathbb P(T\lt t)=\mathbb P(|\sin\Theta|\lt\sqrt{t})=2\,\mathbb P(|\Theta|\lt\arcsin\sqrt{t})=\tfrac2\pi\,\arcsin\sqrt{t}.
$$
The density of the distribution of $T$ follows by differentiation.
