The following is a question present in the book High-Dimensional Probability, by Roman Vershynin. The exercise is the following: Let $g\sim N(0,1)$. Show that, for all $t\geq 1$ $$ E[g^2 \mathbb I_{\{g > t\}}] = t\frac{e^{-t^2/2}}{\sqrt{2\pi}}+P(g>t) \leq (1+1/t)\frac{e^{-t^2/2}}{\sqrt{2\pi}}$$
The inequality seems to be easily provable, since one can just use the Markov inequality. But, I've not been able to prove the expression for the expected value. The author gives a hint to use integration by parts, yet, I was still not able to solve it. Any help is welcomed.
Using the information provided in the comment I was able to solve the question. So here is the complete answer (also proving the inequality).
We use integration by parts making $u=x$ and $dv/dx = x \frac{e^{-x^2/2}}{\sqrt{2\pi}}$.
One can prove that $v = \int _t^\infty x\frac{e^{-x^2/2}}{\sqrt{2\pi}}dx = -\frac{e^{-t^2/2}}{\sqrt{2\pi}}$.
Therefore:
$$ uv \bigg\rvert^\infty_t = t\frac{e^{-t^2/2}}{\sqrt{2\pi}} \ ,\ \text{and } \ \int_t^\infty v du = \int_t^\infty \frac{e^{-t^2/2}}{\sqrt{2\pi}} dx = P(g>t) $$
We then showed that
$$ E[g^2 \mathbb I_{\{g>t\}}] = \int_t^\infty x^2\frac{e^{-x^2/2}}{\sqrt{2\pi}}dx= t\frac{e^{-t^2/2}}{\sqrt{2\pi}} +P(g>t) $$
Now, to prove the inequality, we can use the Markov inequality, hence: $$ P(g>t) = P(g\mathbb I_{\{g>t\}}) \leq \frac{E[g\mathbb I_{\{g>t\}}]}{t} = \frac{e^{-t^2/2}}{t\sqrt{2\pi}} $$