Yes, It is the partition sub-intervals that gives problem. I don't really knw how to go about the sub-intervals.
OK. Let's take this in very small steps. For our first approximation, let n = 2, and let's use the right side of rectangles. (We could use trapezoids, or mid-points of rectangles or left sides of rectangles: it will make no difference in the limit as n approaches infinity.)
The function to be integrated is f(x) = x^2.
Our first rectangle has a base from 0 to (a / 2). Along the right side, its height is (a / 2)^2 so the area of that rectangle is
\(\displaystyle A_1 = \left(\dfrac{a}{2} - 0\right) * \left(\dfrac{a}{2}\right)^2 = \dfrac{a}{2} * \dfrac{a^2}{4} = \dfrac{a^3}{8}.\)
If you do not understand that, I suggest you draw a sketch. Feel free to ask questions if you still do not get it.
Now the base of our second rectangle runs from (a / 2) to a, and the height is a^2, right?
\(\displaystyle A_2 = \left(a - \dfrac{a}{2}\right) * a^2 = \dfrac{a}{2} * a^2 = \dfrac{a^3}{2}.\)
So the approximate area under the curve is
\(\displaystyle A_1 + A_2 = \dfrac{a^3}{8} + \dfrac{a^3}{2} = \dfrac{a^3}{8} + \dfrac{4a^3}{8} = \dfrac{5a^3}{8} > \dfrac{a^3}{2}.\)
So that is not a super approximation, but it was very crude. Let's try three subintervals, which gives three rectangles.
\(\displaystyle A_1 = \left(\dfrac{a}{3} - 0\right) * \left(\dfrac{a}{3}\right)^2 = \dfrac{a}{3} * \dfrac{a^2}{9} = \dfrac{a^3}{27}.\)
\(\displaystyle A_2 = \left(\dfrac{2a}{3} - \dfrac{a}{3}\right) * \left(\dfrac{2a}{3}\right)^2 = \dfrac{a}{3} * \dfrac{4a^2}{9} = \dfrac{4a^3}{27}.\)
\(\displaystyle A_3 = \left(a - \dfrac{2a}{3}\right) * a^2 = \dfrac{a}{3} * a^2 = \dfrac{a^3}{3}.\)
So the approximate area under the curve is
\(\displaystyle A_1 + A_2 + A_3 = = \dfrac{a^3}{27} + \dfrac{4a^3}{27}+ \dfrac{a^3}{3} = \dfrac{5a^3}{27} + \dfrac{9a^3}{27} = \dfrac{14a^3}{27} > \dfrac{a^3}{2}.\)
That is actually a pretty decent approximation. Now if you had n rectangles and added up their areas, how would you express that in algebraic form?
What is the limit of that if you let n approach infinity?