In general, for a "nice" (continuous) function #f# whose graph is above the #x#-axis for #a <=x<=b#, the area under the graph can be computed using limits as #\int_{a}^{b}f(x)dx=lim_{n->infty}\sum_{k=1}^{n}f(x_{k})\Delta x#, where #Delta x=(b-a)/n# and #x_{k}=a+k*Delta x#.
For the given situation, #a=0# and #b=3# so that #Delta x=3/n# and #x_{k}=0+k*3/n=(3k)/n#. We then get #f(x_{k})=((3k)/n)^2-(3k)/n+1=(9k^2)/n^2-(3k)/n+1#.
This leads to #sum_{k=1}^{n}f(x_{k})\Delta x=sum_{k=1}^{n}((27k^2)/n^3-(9k)/n^2+3/n)#
#=27/n^3*sum_{k=1}^{n}k^2-9/n^2 * sum_{k=1}^{n}k+3/n * sum_{k=1}^{n}1#.
Now #sum_{k=1}^{n}1=n#, #sum_{k=1}^{n}k=(n(n+1))/2#, and
#sum_{k=1}^{n}k^2=(n(2n+1)(n+1))/6# (you can look these facts up...for example, see http://mathforum.org/library/drmath/view/56920.html ).
Thus, #sum_{k=1}^{n}f(x_{k})\Delta x#
#=(27n(2n+1)(n+1))/(6n^3)-(9n(n+1))/(2n^2)+3#
Therefore, the area is
#\int_{a}^{b}f(x)dx=lim_{n->infty}\sum_{k=1}^{n}f(x_{k})\Delta x#
#=54/6-9/2+3=15/2#