troublesome area problem Calculate the area of the region of the graph bounded by:
$$\begin{eqnarray}
y &=& x \\
y &=& x^2 + 1 \\
y &=& 2 \\
x &=& 0
\end{eqnarray}$$
My final result is $\displaystyle\frac 83.$
For the first function I trivially found $x = 2.$
For the second, I did the equation $x^2 + 1 = 2,$ which gave me $x = -1$ and $x = 1,$ but since the inferior limit is $0,$ $x = 1$ is the only solution. 
So I calculated the integral of $(x^2 + 1 - x)$ from $0$ to $1,$ and the integral of $(x^2 + 1 - x)$ from $1$ to $2,$ and the result was $\displaystyle\frac 83,$ but I'm not so sure I did everything right. Can you please tell me what I did wrong in this problem?

If you plot all functions involved, then the area is given by
$$\int_0^1(x^2+1-x)dx+\int_1^2(2-x)dx.$$

