-1
$\begingroup$

I am not sure how to do this problem now since the book gives no examples of what to do for two different types of variables.

I have the integral $\int_{-2}^0(x^2+x)\,dx.$

I know that $\Delta x = \frac{2}{n}$.

So now I have $\frac{2}{n}\left(-2 +\frac{2k}{n}\right)$

Then I put that into the equation and I get $\frac{2}{n}\left(-2+\frac{2k}{n}\right)^2 + \left(-2+\frac{2k}{n}\right).$

Here is where I really get lost, I do not know how to work with a square and a not square, I have factored it many ways and it didn't really help.

2 Answers 2

3

In that last line you really want

$\frac{2}{n}\left(\left(-2+\frac{2k}{n}\right)^2 + \left(-2+\frac{2k}{n}\right)\right)\;,\tag{1}$

since the factor of $\dfrac2n$ applies to both terms. In fact, you really want a sum,

$\sum_{k=1}^n\frac{2}{n}\left(\left(-2+\frac{2k}{n}\right)^2 + \left(-2+\frac{2k}{n}\right)\right)\;,$

but let’s simplify $(1)$ a bit first.

$\begin{align*} \left(-2+\frac{2k}{n}\right)^2 + \left(-2+\frac{2k}{n}\right)&=\left(4-\frac{8k}n+\frac{4k^2}{n^2}\right)+\left(-2+\frac{2k}n\right)\\ &=2-\frac{6k}n+\frac{4k^2}{n^2}\;, \end{align*}$

so $(1)$ is

$\frac2n\left(2-\frac{6k}n+\frac{4k^2}{n^2}\right)\;,$ and we want to evaluate

$\sum_{k=1}^n\frac2n\left(2-\frac{6k}n+\frac{4k^2}{n^2}\right)\;.$

Now $\dfrac2n$ doesn’t depend on $k$, so you can factor it out of the summation to get $R_n=\frac2n\sum_{k=1}^n\left(2-\frac{6k}n+\frac{4k^2}{n^2}\right)\;.\tag{2}$ The trick now is to break up the summation into three simpler ones,

$\sum_{k=1}^n\left(2-\frac{6k}n+\frac{4k^2}{n^2}\right)=\sum_{k=1}^n2-\sum_{k=1}^n\frac{6k}n+\sum_{k=1}^n\frac{4k^k}{n^2}\;,\tag{3}$

and evaluate each of those separately. The first one is just $2+2+\ldots+2$, with $n$ terms, so it’s $2n$. The other two you can simplify as you’ve done before to $\frac6n\sum_{k=1}^nk\quad\text{and}\quad\frac4{n^2}\sum_{k=1}^nk^2\;.$ Now you want to evaluate these, substitute back into the righthand side of $(3)$, and plug that back into $(2)$ to get $R_n$. Then see if you can calculate $\lim\limits_{n\to\infty}R_n$.

Added: First,

$\frac6n\sum_{k=1}^nk=\frac6n\cdot\frac{n(n+1)}2=3(n+1)\;,$

and

$\frac4{n^2}\sum_{k=1}^nk^2=\frac4{n^2}\cdot\frac{n(n+1)(2n+1)}6=\frac{2(n+1)(2n+1)}{3n}\;,$

so $(3)$ is $2n-3(n+1)+\frac{2(n+1)(2n+1)}{3n}=-n-3+\frac{4n^2+6n+2}{3n}\;,$ and $\begin{align*}R_n&=\frac2n\left(-n-3+\frac{4n^2+6n+2}{3n}\right)\\ &=-2-\frac6n+\frac{8n^2+12n+4}{3n^2}\\ &=-2-\frac6n+\frac83+\frac4n+\frac4{3n}\;. \end{align*}$

Now just take the limit as $n\to\infty$.

  • 0
    I tried it again and got 7n + 5 which I am pretty sure I need to get rid of ns.2012-04-14
1

You seem to be trying to compute a Riemann sum for the integral in question. It's hard to tell because you don't really give enough information (and you complain about the book being unclear...). For example, you never say if you are trying to compute a left hand sum or a right hand sum or what.

Your function is $f(x) = x^2+x$; your interval is $[-2,0]$, You are dividing it into $n$ equal parts, so that the partition will be $x_0 = -2,\ x_1 = -2+\frac{2}{n},\ x_2 = -2+\frac{4}{n},\ldots,\ x_n = -2+\frac{2n}{n}=0.$ Then you want to compute either $\text{LEFT}(n) = \sum_{i=0}^{n-1} f(x_i)\Delta x$ or $\text{RIGHT}(n) = \sum_{i=1}^{n}f(x_i)\Delta x.$

Your formula above is incorrect, since your $\frac{2}{n}$ is only multiplying $x^2$, instead of the entire value $f(x)$.

One thing you can notice is that $\Delta x$ is the same for all $i$, so you can factor it out of your summation. Let me do the Left Hand Sum: $\begin{align*} \mathrm{LEFT}(n) &= \sum_{i=0}^{n-1}f(x_i)\Delta x\\ &= \sum_{i=0}^{n-1}\left(x_i^2 + x_i\right)\frac{2}{n}\\ &= \frac{2}{n}\sum_{i=0}^{n-1}(x_i^2+x_i)\\ &= \frac{2}{n}\sum_{i=0}^{n-1}\left( \left(-2+\frac{2i}{n}\right)^2 + \left(-2 + \frac{2i}{n}\right)\right)\\ &= \frac{2}{n}\sum_{i=0}^{n-1}\left( (-2)^2 +2(-2)\frac{2i}{n} + \frac{4i^2}{n^2} -2 + \frac{2i}{n}\right)\\ &= \frac{2}{n}\sum_{i=0}^{n-1}\left( 2 - \frac{8i}{n} + \frac{4i^2}{n^2} + \frac{2i}{n}\right)\\ &= \frac{2}{n}\sum_{i=0}^{n-1}\left( 2 - \frac{6i}{n} + \frac{4i^2}{n^2}\right)\\ &= \frac{2}{n}\sum_{i=0}^{n-1}\frac{2n^2 - 6in + 4i^2}{n^2}\\ &= \frac{2}{n^3}\sum_{i=0}^{n-1}\left(2n^2 - 6in + 4i^2\right)\\ &= \frac{2}{n^3}\left( \sum_{i=0}^{n-1}2n^2 - \sum_{i=0}^{n-1}6in + \sum_{i=0}^{n-1}4i^2\right)\\ &= \frac{2}{n^3}\left( 2n^2\sum_{i=0}^{n-1}1 - 6n\sum_{i=0}^{n-1}i + 4\sum_{i=0}^{n-1}i^2\right). \end{align*}$ Now, the first sum is $\underbrace{1+1+\cdots+1}_{n\text{ summands}} = n.$ The second sum is $0+1+2+\cdots+(n-1)$ and the third sum is $0^2 + 1^2 + 2^2+\cdots + (n-1)^2.$ There are well-known formulas to compute these sums: we have $0+1+2+\cdots+(n-1) = \frac{(n-1)n}{2}$ and $0^2 + 1^2+\cdots+(n-1)^2 = \frac{(n-1)n(2n-1)}{6}.$ So in the end we have $\begin{align*} \text{LEFT}(n) &= \frac{2}{n^3}\left( 2n^2\sum_{i=0}^{n-1}1 - 6n\sum_{i=0}^{n-1}i + 4\sum_{i=0}^{n-1}i^2\right)\\ &= \frac{2}{n^3}\left( 2n^2(n) - 6n\frac{(n-1)n}{2} + 4\frac{(n-1)n(2n-1)}{6}\right)\\ &= \frac{4n^3}{n^3} - \frac{6n^2(n-1)}{n^3} + \frac{8(n-1)n(2n-1)}{6n^3}\\ &= 4 - \frac{6n-6}{n} + \frac{4(n-1)(2n-1)}{3n^2}\\ &= 4 - 6 + \frac{6}{n} + \frac{4(2n^2-3n + 1)}{3n^2}\\ &= -2 + \frac{6}{n} + \frac{8n^2}{3n^2} - \frac{12n}{3n^2} + \frac{4}{3n^2}\\ &= -2 + \frac{6}{n} + \frac{8}{3} - \frac{4}{n} + \frac{4}{3n^2}. \end{align*}$

  • 2
    I'm not saying you are an idiot: I'm saying that you are not in a position to judge accurately what information is relevant and what information is not *because you are not doing well in this course*. **I** am in no position to tell you what information may or may not be relevant on the dashboard of an airplane, so if I wanted help interpreting the dashboard, I would not try to guess. Because you routinely fail to provide enough information, we have to guess, and so you often get answers that are not to the point and only confuse you more. Like this answer.2012-04-14