We need to integrate the given expression to find the value of y. Integrating both sides with respect to x, we get:
∫dy = ∫(x + cos x)dx
y = 1/2 * x^2 + sin x + c
where c is the constant of integration.
Therefore, the correct answer is:
- x^2/2 + sin x + c