Convert Riemann sum to definite integral $ \lim_{n\to\infty}\sum_{i=1}^{n} \frac{21 \cdot \frac{3 i}{n} + 18}{n} $ The limit 

$\quad\quad \displaystyle \lim_{n\to\infty}\sum_{i=1}^{n} \frac{21 \cdot \frac{3 i}{n} + 18}{n} $

is the limit of a Riemann sum for a certain definite integral 

$\quad\quad \displaystyle \int_a^b f(x)\, dx $

a = ?

b = ?

f(x) = ?

Attempt at solution:

So I know:

$ \displaystyle \sum_{i=1}^{n} f(a + i dx) dx $ = $ \int_a^b f(x)\, dx $

and that $x_i = a + i \cdot \frac {b-a}{n}$

So I will try to rewrite my riemann sum as convenient:

$\frac {3}{n} (7 \cdot \frac {3i}{n} + 6) $

so my $dx$ is $\frac {3}{n}$

since +6 is supposed to be my a, b is therefore 9 because $dx = \frac {b-a}{n}$

but that 7 inside the parenthesis spoils everything... so I can't say what's inside the parenthesis is equal to $x_i$

So what's next?
Divide through by 63. We then find that $f(a)=\frac{18}{63}$ by plugging in $i=0$. But then $f(x)=\frac{18}{63}+x$ because $f(a+idx)=f(a)+idx$. Hence $a=0$ and $b=1$. Therefore our integral is $63\int_{0}^{1} x+\frac{18}{63}dx$
You don't need to adjust your boundaries for the integral. The easiest way is to choose arbitrarily $a=0$  and $b=1$  so that $\Delta x = 1/n$ and $x^{\ast}$ is $i/n$. See the picture: