I have a random variable X that is normally distributed and a function that takes values based on the range of X. I want to calculate the expected value of this function. The function is as follows
$$ G(X) \begin{cases} 0 , &\text{if } x\leqslant 0 \\ x , &\text{if } 0 \leqslant x \leqslant\ Q \\ Q , &\text{if } x>Q \end{cases}$$
I can write the integral for the expected value in parts as follows and solve for it.
$$ E[G(X)] = \int_{0}^Q xf(x)\,dx + \int_{Q}^\infty Qf(x) \,dx$$
where f(x) is the probability distribution function of X ~ N($\mu$,$\sigma$)
But the integral turns out to be quite lengthy and I was wondering if there was a shorter way to do it using special functions like delta function, because I am doing a course in operations and would have to use this frequently.