as part of my effort to learn some functional analysis I'm trying to find an example to a function that is in $L^{2}$ $[0,\infty)$ but not in $L^{1}$ $[0,\infty)$ and also not in $L^{\infty}$ $[0,\infty)$.
I Thought of the following function: $\cfrac{1}{(t-1)}$ but this also not in $L_{2}$.
Would appreciate some help Thanks
Hint: if $f,g \geq 0$, $f \in L^{2}\setminus L^{1}$ and $g \in L^{2}\setminus L^{\infty}$ then $f+g$ would be such a function.