
A second way to solve this is to find the complete function $y(x)$ first, instead of only the area under the curve between $x=2$ and $x=3$.
From the plot, the four marked points $(0,1)$, $(1,2)$, $(2,3)$ and $(3,4)$ lie on one straight line, so:
\[ \frac{dy}{dx} = x + 1 \]Integrating both sides with respect to $x$ gives the general solution, with an unknown constant $C$:
\[ y = \int (x+1)\,dx = \frac{x^2}{2} + x + C \]Now use the given condition $y(2) = 5$ to pin down $C$:
\[ 5 = \frac{(2)^2}{2} + 2 + C = 2 + 2 + C = 4 + C \] \[ C = 1 \]So the complete function is:
\[ y(x) = \frac{x^2}{2} + x + 1 \]Now put $x = 3$ directly into this formula:
\[ y(3) = \frac{9}{2} + 3 + 1 = 4.5 + 3 + 1 = 8.5 \]Let's summarize:
Both routes agree: $y(3) = 8.5$.