Assuming that $x$ follows a distribution with pdf $f$ and cdf $F$, the expected value of $x$ is
$$E[x] = \int_{-\infty}^{+ \infty} x f(x)dx$$
Assuming now that I have a variable $y = \min(x, c)$, where $c$ is a constant, what is the expected value of $y$?
My guess is that it would be
$$E[y] = \left(\int_{-\infty}^c x f(x)dx \right) + c \left(1 - F(x) \right)$$
but I can't prove it. Is my assumption correct, and how do I get the result?
Your are almost right.
Consider that: $$y = \begin{cases} x & \text{if}~x<c \\ c & \text{if}~x\geq c \end{cases} $$
Therefore:
$$\mathbb{E}[y] = \int_{-\infty}^c x f(x) dx + \int_{c}^{+\infty} c f(x) dx = \int_{-\infty}^c x f(x) dx + c (1 - F(c)),$$
since
$$\int_{c}^{+\infty} f(x) dx = \int_{-\infty}^{+\infty} f(x) dx - \int_{-\infty}^{c} f(x) dx = 1 - F(c).$$