prove $P\{\int_{0}^{\infty}f(W_s)ds=\infty\}=1$ where $W_s$ is standard Brownian motion and $f:\mathbb{R}\to [0,\infty)$ is Borel-measurable function satisfies that $\{y\in \mathbb{R}:f(y)>0\}$ has positive Lebsgue measure.
Is $\int_{0}^{\infty}f(W_s)ds$ a Brownian motion? can I use the recurrent property of the Brownian motion to prove this?
 A: We need to show that
$$
\int_0^T f(B_t) dt\to\infty, T\to\infty.
$$
I will use the occupation density formula (UPD see a simpler argument below):
$$
\int_0^T f(B_t) dt = \int_{\mathbb{R}} f(x) L^x_T(B) dx,
$$
where $L_T^x(B) = \lim_{\varepsilon \to 0} \frac{1}{2\varepsilon}\int_0^T \mathbf{1}_{[x-\varepsilon,x+\varepsilon]}(B_t) dt$ is the local time of $B$ at $x$ on $[0,T]$. Since $B$ is recurrent, for each $x\in\mathbb{R}$, $L_T^x(B)\to +\infty$, $T\to +\infty$. Therefore, by the Fatou lemma,
$$
\liminf_{T\to\infty} \int_0^T f(B_t) dt \ge \int_{\mathbb {R}} f(x)\liminf_{T\to\infty} L_T^x(B_t) dx = +\infty.
$$

In fact, one can show (e.g. using the self-similarity of Brownian motion) the following convergence in distribution (if $f$ is not integrable, then the convergence is to infinity):
$$
\frac{1}{\sqrt{T}} \int_0^T f(B_t)dt \overset{d}{\rightarrow} \int_{\mathbb R} f(x) dx \cdot L_1^0(B)\overset{d}{=} \int_{\mathbb R} f(x) dx \cdot |B_1| , T\to \infty.
$$

Here is a simpler argument. From the assumption it follows that there are some $a<b$ such that $$\int_a^b f(x) dx >0.\tag{1}$$
Define $\tau_0= 0$,
$$
\sigma_n = \min\{t\ge \tau_{n-1}: B_t = a\},\quad \tau_n = \min\{t\ge \sigma_n: B_t = b\}, \quad n\ge 1.
$$
From the recurrence it follows that, almost surely, $\sigma_n$ and $\tau_n$ are well defined for all $n\ge 1$.
Now $\int_0^\infty f(B_t) dt\ge \sum_{n=1}^\infty \int_{\sigma_n}^{\tau_n} f(B_t) dt=: \sum_{n=1}^\infty I_n$. From the strong Markov property of Brownian motion it follows that the random variables $I_n$ are iid, and from (1), that they are positive. Therefore, $\sum_{n=1}^\infty I_n=\infty$ a.s. (e.g. by SLLN).

